Quantum phase estimation explained
Given a unitary U and one of its eigenvectors, phase estimation reads out the eigenvalue as a binary number. This guide builds the circuit, shows why it works and what happens when the phase does not fit the grid.
10 min read · reviewed December 2026
The problem
A unitary operation U multiplies certain special states, its eigenvectors, by a pure phase. If |ψ⟩ is an eigenvector, then U|ψ⟩ = e^(2πiφ)|ψ⟩ for some φ between 0 and 1, which we measure in full turns. The task is to find φ. This is the basic measurement behind the algorithms that find eigenvalues, the quantum simulation of molecules, and the order finding at the centre of Shor’s algorithm.
You are allowed to apply U, and controlled versions of U, to the eigenvector as many times as you like. You are not allowed to read the phase directly, because a global phase on a state cannot be measured. The trick is to use the control qubit’s phase, which can be measured by interference.
The circuit
In the lab the target qubit is the state |1⟩ of U = diag(1, e^(2πiφ)). Because it is an exact eigenvector, it is never changed by the controlled gates, so the simulator leaves it out and applies the kicked-back phase directly to the counting qubit. This is exact, not an approximation, and the tests compare it with the closed-form probabilities.
- Prepare t counting qubits in |0…0⟩ and the target register in the eigenvector |ψ⟩.
- Apply a Hadamard to every counting qubit. The counting register is now an equal superposition of all N = 2^t numbers k.
- For the counting qubit j, apply a controlled U raised to the power 2^j. The first counting qubit, the most significant one, controls U^(2^(t−1)); the last controls U^1.
- Apply the inverse quantum Fourier transform to the counting register.
- Measure the counting register. The result m, divided by N, is the estimate of φ.
Why it works: phase kickback
A controlled-U with the target in an eigenvector does not change the target. It multiplies the control qubit’s |1⟩ branch by e^(2πiφ). The effect lands on the control, which is why the effect is called phase kickback. With U^(2^j), the phase on that qubit is 2^j·φ turns.
After the Hadamards and all the controlled powers, the counting register holds a state in which every k from 0 to N − 1 has the same size of amplitude and a phase of k·φ turns:
(1/√N) Σ over k of e^(2πi·φ·k) |k⟩
Reading the phase with the inverse QFT
Compare that state with the output of the QFT on a basis state |m⟩, which is (1/√N) Σ e^(2πi·m·k/N)|k⟩. If φ equals m/N exactly, the two states are identical. So the inverse QFT sends the counting register to |m⟩, and the measurement returns m with certainty. The inverse QFT is therefore a decoder for a phase pattern. The earlier guide on the transform showed that a basis state is encoded as a winding speed, and here we are decoding the winding speed.
Try it in the lab with Snap φ to a t-bit fraction. The chance of the best outcome becomes 100 percent, and the simulated and closed-form probabilities agree to better than 1e-9.
When the phase does not fit the grid
If φ is not a multiple of 1/N, the register state is not any single basis state’s Fourier image. It is a mix, and measurement returns one of several outcomes. The probability of outcome m depends on the gap δ = φ − m/N between the true phase and the grid point:
P(m) = ( sin(π·N·δ) / ( N · sin(π·δ) ) )²
| Counting qubits t | Grid spacing 1/2^t | Best outcome | Chance of best | Chance within one step |
|---|---|---|---|---|
| 2 | 0.25000 | 1/4 = 0.25000 | 88.2% | 94.5% |
| 3 | 0.12500 | 2/8 = 0.25000 | 57.8% | 83.7% |
| 4 | 0.06250 | 5/16 = 0.31250 | 87.6% | 93.1% |
| 5 | 0.03125 | 10/32 = 0.31250 | 57.3% | 82.8% |
| 6 | 0.01563 | 19/64 = 0.29688 | 87.5% | 93.0% |
| 8 | 0.00391 | 77/256 = 0.30078 | 87.5% | 93.0% |
| 10 | 0.00098 | 307/1024 = 0.29980 | 87.5% | 93.0% |
What you are guaranteed
These two bounds are textbook results. In the lab you can slide φ over its whole range and watch the readings stay above them. The test suite behind the lab does the same for many phases and every size of counting register from 1 to 8 qubits.
- The most likely outcome is always one of the two grid points next to φ, and its chance is at least 4/π², about 40.5 percent.
- The chance that the outcome is within one grid step of φ is at least 8/π², about 81.1 percent.
- Adding counting qubits shrinks the grid and, together with a few extra qubits, pushes the success chance as close to 1 as you like. The next guide gives the rule.
What if the input is not an eigenvector?
Any state can be written as a sum of eigenvectors of U. Run the circuit on such a sum, and the register returns one eigenphase, picked with probability equal to the squared weight of that eigenvector in the input. That is the Two eigenvectors option in the lab: the bar chart is a weighted mix of two single-phase patterns. The practical consequence is that to find a particular eigenvalue you need an input with a good overlap with its eigenvector, and finding such an input is its own hard problem in applications such as chemistry.
Phase estimation reads one eigenvalue of U per run. Which one you get is random, with chances set by the overlap of your input with each eigenvector.
Try it
Questions
Who invented phase estimation?
Alexei Kitaev described the measurement in 1995, and the version with a counting register and an inverse QFT is usually credited to the 1998 paper by Cleve, Ekert, Macchiavello and Mosca. Check the original sources for exact credit.
Why is the target register unchanged?
Because it is an eigenvector. The gate multiplies it by a phase, and that phase is moved to the control by the way a controlled operation is defined.
Does the algorithm need to know φ?
No. It outputs an estimate of φ. It needs only the ability to apply controlled powers of U to an input with overlap on the eigenvector.
Read next
Sources and further reading
- P. Shor, “Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer” (1994, journal version 1997)
- A. Kitaev, “Quantum measurements and the Abelian stabilizer problem” (1995)
- R. Cleve, A. Ekert, C. Macchiavello and M. Mosca, “Quantum algorithms revisited” (1998)
- D. Coppersmith, “An approximate Fourier transform useful in quantum factoring” (1994, IBM research report)
- J. Cooley and J. Tukey, “An algorithm for the machine calculation of complex Fourier series” (1965)
- M. Nielsen and I. Chuang, Quantum Computation and Quantum Information, chapter 5
Check the original sources for exact citations.