You are viewing version 1 of this entry. View latest (v4)
Code
qcr:2604.00164.1

Quantum Amplitude Amplification and Estimation

Implementation of the original Quantum Amplitude Estimation (QAE) algorithm introduced by Brassard, Hoyer, Mosca, and Tapp in 2000. Given a unitary A that prepares a superposition with an unknown "good state" amplitude a, the algorithm estimates a with quadratic speedup over classical sampling. It works by applying Quantum Phase Estimation (QPE) to the Grover operator, whose eigenvalues encode the target amplitude. The raw QPE output lands on a discrete grid of 2^m points (where m is the number of evaluation qubits), so a Maximum Likelihood Estimation (MLE) post-processing step refines the result to a continuous value without additional quantum resources. This example demonstrates the algorithm on a Bernoulli model, the simplest amplitude estimation problem, estimating a target probability of 0.2 using 3 evaluation qubits. The implementation includes Fisher information confidence intervals and likelihood-ratio confidence intervals for statistical rigour.
Sampling
Qubit
Circuit-based
Uploaded 2 months ago
112
Views
Citing this entry? Use this QCR ID
Uploaded by
HQ
Hello QCR

Overview

Assembly

1 available
QCRepository/qcr-circuit-examples
40
README.md

Canonical Amplitude Estimation (Brassard et al.)

The original Quantum Amplitude Estimation algorithm, introduced by Brassard, Hoyer, Mosca, and Tapp in 2000, answers a deceptively simple question: given a quantum state, how large is the "good" component?

More precisely, given a unitary that prepares:

the algorithm estimates the amplitude — the probability of measuring the "good" state .

Why it matters

Amplitude estimation is one of the most versatile subroutines in quantum computing. It provides a quadratic speedup over classical sampling and serves as the backbone for quantum algorithms in Monte Carlo simulation, option pricing, risk analysis, and combinatorial optimization. If Grover's search is a hammer, amplitude estimation is the measuring tape that tells you how much you found.

How it works

The algorithm chains together two well-known building blocks:

  1. Grover operator () — reflects the quantum state to amplify the good component. The eigenvalues of encode the target amplitude .
  2. Quantum Phase Estimation (QPE) — extracts those eigenvalues using auxiliary "evaluation" qubits, producing an estimate on a discrete grid of points.

Because the grid is discrete, the raw QPE output snaps to the nearest grid point. A Maximum Likelihood Estimation (MLE) post-processing step then refines this to a continuous value, recovering much better precision without additional quantum resources.

This example uses a Bernoulli model — the simplest possible amplitude estimation problem — where represents the probability of a biased coin.

Project structure

├── amplitude_estimation.py            # Entry point
├── amplitude_estimation_class.py      # Core QAE algorithm (QPE + MLE)
├── lib/                               # Framework base classes
│   ├── algorithm_result.py
│   ├── amplitude_estimator.py
│   ├── estimation_problem.py
│   └── utils.py
└── assembly/
    └── openqasm3/
        └── amplitude_estimation.qasm  # Pre-exported OpenQASM 3.0 circuit

Getting started

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.lock
python amplitude_estimation.py

Expected output:

Target probability: 0.2
Estimated: 0.1464466
MLE estimate: 0.2

The grid-based estimate snaps to the nearest QPE grid point (0.146), while the MLE refines it back to the true value (0.2).

Key parameters

  • num_eval_qubits (default: 3) — controls grid resolution. With you get grid points. Increasing improves precision but deepens the circuit.
  • p (default: 0.2) — the target probability to estimate. Try changing this to see how the algorithm adapts.

Dependencies

  • Python 3.12
  • Qiskit (< 2.0)
  • NumPy, SciPy

References

  • Brassard, G., Hoyer, P., Mosca, M., & Tapp, A. (2000). Quantum Amplitude Amplification and Estimation. arXiv:quant-ph/0005055

License

Apache 2.0 — derived from Qiskit Algorithms (C) IBM 2018–2024.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!