# AmplitudeEstimation¶

class AmplitudeEstimation(num_eval_qubits, phase_estimation_circuit=None, iqft=None, quantum_instance=None, sampler=None)[source]

The Quantum Phase Estimation-based Amplitude Estimation algorithm.

This class implements the original Quantum Amplitude Estimation (QAE) algorithm, introduced by [1]. This canonical version uses quantum phase estimation along with a set of $$m$$ additional evaluation qubits to find an estimate $$\tilde{a}$$, that is restricted to the grid

$\tilde{a} \in \{\sin^2(\pi y / 2^m) : y = 0, ..., 2^{m-1}\}$

More evaluation qubits produce a finer sampling grid, therefore the accuracy of the algorithm increases with $$m$$.

Using a maximum likelihood post processing, this grid constraint can be circumvented. This improved estimator is implemented as well, see [2] Appendix A for more detail.

References

[1]: Brassard, G., Hoyer, P., Mosca, M., & Tapp, A. (2000).

Quantum Amplitude Amplification and Estimation. arXiv:quant-ph/0005055.

[2]: Grinko, D., Gacon, J., Zoufal, C., & Woerner, S. (2019).

Iterative Quantum Amplitude Estimation. arXiv:1912.05559.

Parameters
• num_eval_qubits (int) – The number of evaluation qubits.

• phase_estimation_circuit (QuantumCircuit | None) – The phase estimation circuit used to run the algorithm. Defaults to the standard phase estimation circuit from the circuit library, qiskit.circuit.library.PhaseEstimation when None.

• iqft (QuantumCircuit | None) – The inverse quantum Fourier transform component, defaults to using a standard implementation from qiskit.circuit.library.QFT when None.

• quantum_instance (QuantumInstance | Backend | None) – Pending deprecation: The backend (or QuantumInstance) to execute the circuits on.

• sampler (BaseSampler | None) – A sampler primitive to evaluate the circuits.

Raises

ValueError – If the number of evaluation qubits is smaller than 1.

Methods

 compute_confidence_interval Compute the (1 - alpha) confidence interval. compute_mle Compute the Maximum Likelihood Estimator (MLE). construct_circuit Construct the Amplitude Estimation quantum circuit. estimate Run the amplitude estimation algorithm on provided estimation problem. evaluate_measurements Evaluate the results from the circuit simulation.

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.