IterativeAmplitudeEstimation¶
- class IterativeAmplitudeEstimation(epsilon, alpha, confint_method='beta', min_ratio=2, a_factory=None, q_factory=None, i_objective=None, quantum_instance=None)[source]¶
The Iterative Amplitude Estimation algorithm.
This class implements the Iterative Quantum Amplitude Estimation (QAE) algorithm, proposed in https://arxiv.org/abs/1912.05559. The output of the algorithm is an estimate that, with at least probability 1 - alpha, differs by epsilon to the target value, where both alpha and epsilon can be specified.
It differs from the original QAE algorithm proposed by Brassard (https://arxiv.org/abs/quant-ph/0005055) in that it does not rely on Quantum Phase Estimation, but is only based on Grover’s algorithm. Iterative IQAE iteratively applies carefully selected Grover iterations to find an estimate for the target amplitude.
The output of the algorithm is an estimate for the amplitude a, that with at least probability 1 - alpha has an error of epsilon. The number of A operator calls scales linearly in 1/epsilon (up to a logarithmic factor).
- Parameters
epsilon (
float
) – Target precision for estimation target a, has values between 0 and 0.5alpha (
float
) – Confidence level, the target probability is 1 - alpha, has values between 0 and 1confint_method (
str
) – Statistical method used to estimate the confidence intervals in each iteration, can be ‘chernoff’ for the Chernoff intervals or ‘beta’ for the Clopper-Pearson intervals (default)min_ratio (
float
) – Minimal q-ratio (K_{i+1} / K_i) for FindNextKa_factory (
Optional
[CircuitFactory
]) – The A operator, specifying the QAE problemq_factory (
Optional
[CircuitFactory
]) – The Q operator (Grover operator), constructed from the A operatori_objective (
Optional
[int
]) – Index of the objective qubit, that marks the ‘good/bad’ statesquantum_instance (
Union
[QuantumInstance
,BaseBackend
,None
]) – Quantum Instance or Backend
- Raises
AquaError – if the method to compute the confidence intervals is not supported
Attributes
Get the A operator encoding the amplitude a that’s approximated, i.e.
Returns backend.
Get the index of the objective qubit.
Returns the target precision epsilon of the algorithm.
Get the Q operator, or Grover-operator for the Amplitude Estimation algorithm, i.e.
Returns quantum instance.
Return a numpy random.
Methods
Construct the circuit Q^k A |0>.
Execute the algorithm with selected backend.
Sets backend with configuration.