# qiskit.algorithms.IterativeAmplitudeEstimation¶

class IterativeAmplitudeEstimation(epsilon_target, alpha, confint_method='beta', min_ratio=2, quantum_instance=None)[código fonte]

The Iterative Amplitude Estimation algorithm.

This class implements the Iterative Quantum Amplitude Estimation (IQAE) algorithm, proposed in [1]. 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 [2] in that it does not rely on Quantum Phase Estimation, but is only based on Grover’s algorithm. IQAE iteratively applies carefully selected Grover iterations to find an estimate for the target amplitude.

Referências

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

Iterative Quantum Amplitude Estimation. arXiv:1912.05559.

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

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

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).

Parâmetros
• epsilon_target (float) – Target precision for estimation target a, has values between 0 and 0.5

• alpha (float) – Confidence level, the target probability is 1 - alpha, has values between 0 and 1

• confint_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 FindNextK

• quantum_instance (Union[Backend, BaseBackend, QuantumInstance, None]) – Quantum Instance or Backend

Levanta
• AlgorithmError – if the method to compute the confidence intervals is not supported

• ValueError – If the target epsilon is not in (0, 0.5]

• ValueError – If alpha is not in (0, 1)

• ValueError – If confint_method is not supported

__init__(epsilon_target, alpha, confint_method='beta', min_ratio=2, quantum_instance=None)[código fonte]

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).

Parâmetros
• epsilon_target (float) – Target precision for estimation target a, has values between 0 and 0.5

• alpha (float) – Confidence level, the target probability is 1 - alpha, has values between 0 and 1

• confint_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 FindNextK

• quantum_instance (Union[Backend, BaseBackend, QuantumInstance, None]) – Quantum Instance or Backend

Levanta
• AlgorithmError – if the method to compute the confidence intervals is not supported

• ValueError – If the target epsilon is not in (0, 0.5]

• ValueError – If alpha is not in (0, 1)

• ValueError – If confint_method is not supported

Methods

 __init__(epsilon_target, alpha[, …]) The output of the algorithm is an estimate for the amplitude a, that with at least probability 1 - alpha has an error of epsilon. construct_circuit(estimation_problem[, k, …]) Construct the circuit $$\mathcal{Q}^k \mathcal{A} |0\rangle$$. estimate(estimation_problem) Run the amplitude estimation algorithm.

Attributes

 epsilon_target Returns the target precision epsilon_target of the algorithm. quantum_instance Get the quantum instance.
construct_circuit(estimation_problem, k=0, measurement=False)[código fonte]

Construct the circuit $$\mathcal{Q}^k \mathcal{A} |0\rangle$$.

The A operator is the unitary specifying the QAE problem and Q the associated Grover operator.

Parâmetros
• estimation_problem (EstimationProblem) – The estimation problem for which to construct the QAE circuit.

• k (int) – The power of the Q operator.

• measurement (bool) – Boolean flag to indicate if measurements should be included in the circuits.

Tipo de retorno

QuantumCircuit

Retorna

The circuit implementing $$\mathcal{Q}^k \mathcal{A} |0\rangle$$.

property epsilon_target

Returns the target precision epsilon_target of the algorithm.

Tipo de retorno

float

Retorna

The target precision (which is half the width of the confidence interval).

estimate(estimation_problem)[código fonte]

Run the amplitude estimation algorithm.

Parâmetros

estimation_problem (EstimationProblem) – An EstimationProblem containing all problem-relevant information such as the state preparation and the objective qubits.

Tipo de retorno

IterativeAmplitudeEstimationResult

property quantum_instance

Get the quantum instance.

Tipo de retorno

Optional[QuantumInstance]

Retorna

The quantum instance used to run this algorithm.