About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
MaximumLikelihoodAmplitudeEstimation
class MaximumLikelihoodAmplitudeEstimation(evaluation_schedule, minimizer=None, quantum_instance=None, sampler=None)
Bases: qiskit.algorithms.amplitude_estimators.amplitude_estimator.AmplitudeEstimator
The Maximum Likelihood Amplitude Estimation algorithm.
This class implements the quantum amplitude estimation (QAE) algorithm without phase estimation, as introduced in [1]. In comparison to the original QAE algorithm [2], this implementation relies solely on different powers of the Grover operator and does not require additional evaluation qubits. Finally, the estimate is determined via a maximum likelihood estimation, which is why this class in named MaximumLikelihoodAmplitudeEstimation
.
References
[1]: Suzuki, Y., Uno, S., Raymond, R., Tanaka, T., Onodera, T., & Yamamoto, N. (2019).
Amplitude Estimation without Phase Estimation. arXiv:1904.10246.
[2]: Brassard, G., Hoyer, P., Mosca, M., & Tapp, A. (2000).
Quantum Amplitude Amplification and Estimation. arXiv:quant-ph/0005055.
Parameters
- evaluation_schedule – If a list, the powers applied to the Grover operator. The list element must be non-negative. If a non-negative integer, an exponential schedule is used where the highest power is 2 to the integer minus 1: [id, Q^2^0, …, Q^2^(evaluation_schedule-1)].
- minimizer – A minimizer used to find the minimum of the likelihood function. Defaults to a brute search where the number of evaluation points is determined according to
evaluation_schedule
. The minimizer takes a function as first argument and a list of (float, float) tuples (as bounds) as second argument and returns a single float which is the found minimum. - quantum_instance – Pending deprecation: Quantum Instance or Backend
- sampler – A sampler primitive to evaluate the circuits.
Raises
ValueError – If the number of oracle circuits is smaller than 1.
Methods
compute_confidence_interval
static MaximumLikelihoodAmplitudeEstimation.compute_confidence_interval(result, alpha, kind='fisher', apply_post_processing=False)
Compute the alpha confidence interval using the method kind.
The confidence level is (1 - alpha) and supported kinds are ‘fisher’, ‘likelihood_ratio’ and ‘observed_fisher’ with shorthand notations ‘fi’, ‘lr’ and ‘oi’, respectively.
Parameters
- result – A maximum likelihood amplitude estimation result.
- alpha – The confidence level.
- kind – The method to compute the confidence interval. Defaults to ‘fisher’, which computes the theoretical Fisher information.
- apply_post_processing – If True, apply post-processing to the confidence interval.
Returns
The specified confidence interval.
Raises
- AlgorithmError – If run() hasn’t been called yet.
- NotImplementedError – If the method kind is not supported.
compute_mle
MaximumLikelihoodAmplitudeEstimation.compute_mle(circuit_results, estimation_problem, num_state_qubits=None, return_counts=False)
Compute the MLE via a grid-search.
This is a stable approach if sufficient gridpoints are used.
Parameters
- circuit_results – A list of circuit outcomes. Can be counts or statevectors.
- estimation_problem – The estimation problem containing the evaluation schedule and the number of likelihood function evaluations used to find the minimum.
- num_state_qubits – The number of state qubits, required for statevector simulations.
- return_counts – If True, returns the good counts.
Returns
The MLE for the provided result object.
construct_circuits
MaximumLikelihoodAmplitudeEstimation.construct_circuits(estimation_problem, measurement=False)
Construct the Amplitude Estimation w/o QPE quantum circuits.
Parameters
- estimation_problem – The estimation problem for which to construct the QAE circuit.
- measurement – Boolean flag to indicate if measurement should be included in the circuits.
Returns
A list with the QuantumCircuit objects for the algorithm.
estimate
MaximumLikelihoodAmplitudeEstimation.estimate(estimation_problem)
Run the amplitude estimation algorithm on provided estimation problem.
Parameters
estimation_problem (EstimationProblem
) – The estimation problem.
Return type
MaximumLikelihoodAmplitudeEstimationResult
Returns
An amplitude estimation results object.
Raises
- ValueError – A quantum instance or Sampler must be provided.
- AlgorithmError – If state_preparation is not set in estimation_problem.
- AlgorithmError – Sampler job run error
Attributes
quantum_instance
Pending deprecation; Get the quantum instance.
Return type
QuantumInstance | None
Returns
The quantum instance used to run this algorithm.
sampler
Get the sampler primitive.
Return type
BaseSampler | None
Returns
The sampler primitive to evaluate the circuits.
Was this page helpful?
Report a bug or request content on GitHub.