Amplitude Estimation (Intro)
Amplitude amplification can boost a success probability, but it does not tell us what that probability is. Quantum amplitude estimation answers the "how much?" question: it extracts the value directly, with precision that improves quadratically faster than classical sampling.
From Phase to Amplitude
Recall the amplitude-amplification operator
where . This operator is a rotation by in the two-dimensional good/bad plane, so its eigenvalues are . Writing these as , the phases are
Quantum Phase Estimation (QPE) can estimate to bits of precision using counting qubits and controlled applications of . Once is in hand, the amplitude follows:
This is amplitude estimation: the circuit reads the phase of , and arithmetic converts it to the desired probability.
A Minimal Example
To keep the circuit small enough to run in a browser, we replace with the simpler phase gate on a single state qubit. has the same eigenvalue structure as :
With the estimated amplitude is
Circuit Layout
We use 3 qubits: qubits 0 and 1 form the 2-bit counting register (qubit 0 = most significant bit), and qubit 2 is the state qubit.
- Prepare qubit 2 in (the eigenstate of ): apply to qubit 2.
- Superpose the counting qubits: on qubits 0 and 1.
- Phase kickback — the core of QPE. Each counting qubit controls acting on the state qubit:
- Qubit 1 (LSB, weight ) controls : a controlled phase of .
- Qubit 0 (MSB, weight ) controls : a controlled phase of .
- Inverse QFT on qubits 0 and 1 decodes the phase into the computational basis.
- Measure all qubits.
Tracing the Arithmetic
After the phase kickbacks and before the inverse QFT, the counting-register state is
The inverse QFT collapses this exactly to . Combined with the state qubit remaining in , the full output is
Reading the counting register as a binary fraction: . Applying the formula recovers the amplitude exactly.
Try it
The starter code has the state preparation, Hadamards, and the inverse QFT already in place. Add the two controlled-phase gates that implement the phase kickback. The grader checks the distribution and expects probability 1 on the outcome .
Sign in on the full site to ask questions and join the discussion.