Curriculum / Quantum Algorithms / Quantum Phase Estimation
Quantum Phase Estimation
Estimate eigenvalues of quantum operators.
Quantum Phase Estimation
Quantum Phase Estimation (QPE) is the engine behind many of quantum computing's most celebrated algorithms, including Shor's factoring algorithm and quantum simulation of chemistry.
The core problem: Given a unitary operator U and one of its eigenstates |ψ⟩, find the phase φ such that:
The phase φ is a real number between 0 and 1. QPE encodes it as a binary fraction to n bits of precision using n ancilla qubits.
Circuit structure:
QPE uses two registers:
- 1.Counting register: n ancilla qubits, all initialized to |0⟩, then put into superposition via Hadamard
- 2.Target register: the eigenstate |ψ⟩ of U
The algorithm applies controlled- for each counting qubit . Because |ψ⟩ is an eigenstate, each application picks up a phase: the -th ancilla accumulates . After all controlled operations, inverse QFT on the counting register extracts φ as a binary integer.
Phase kickback:
When a controlled-U gate is applied to an eigenstate, the control qubit picks up the eigenvalue's phase:
The eigenstate |ψ⟩ is unchanged. The phase ends up on the control qubit. This is phase kickback: the mechanism that makes QPE work.
After all controlled- operations, the counting register holds exactly the QFT encoding of φ's binary representation. Applying the inverse QFT (QFT†) recovers φ directly. QPE is using the quantum Fourier transform to read the phase out of the accumulated phase kickbacks: which is why the inverse QFT appears as the final step.
Precision and resources:
| Counting qubits n | Phase precision | Success probability (worst-case bound) |
|---|---|---|
| 3 | ±1/8 | ~81% |
| 4 | ±1/16 | ~81% |
| 8 | ±1/256 | ~81% |
When the phase is exactly representable in n bits (as in the T-gate example, φ=1/8 with n=3), the success probability is essentially 100%; the ~81% figure is the worst-case bound for general, non-representable phases. Adding extra qubits beyond the required precision boosts that bound toward 100%. The gate count scales as for the QFT and for the controlled-U applications, where is the cost of one U application.
This is the opening of the lesson. The full walkthrough, the interactive circuit, and the graded challenge continue inside myqubit.
How this lesson works
A guided reading lesson with interactive knowledge checks. Concepts are explained step by step with circuit diagrams and runnable examples, and you confirm understanding before moving on.
Part of: Quantum Algorithms
Learn the algorithms that make quantum computers powerful.
This lesson is part of Pro
Unlock Quantum Algorithms and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.