The Machinery · Topic 12 of 20 · The Fourier transform

Quantum phase estimation

Given a unitary and one of its eigenstates, how do you read out the eigenvalue?

  1. 01
  2. 02
  3. 03
  4. 04
  5. 05
  6. 06
  7. 07
  8. 08
  9. 09
  10. 10
  11. 11
  12. 12
  13. 13
  14. 16
  15. 17
  16. 14
  17. 15
  18. 18
  19. 19
  20. 20
About this section: The Fourier transform

Simon's algorithm (topic 10) found a hidden XOR-period using n Hadamard gates and ordinary linear algebra, because XOR-periods live in the group (ℤ/2ℤ)ⁿ and the Hadamard transform is exactly the Fourier transform over that group. Real periods (the ones behind factoring) live in ℤ/2tℤ instead, a bigger, different group, and finding them needs the Fourier transform for that group: the quantum Fourier transform. These three topics build it, use it to read out an unknown phase, and use that to recover a period: the exact chain Shor's algorithm runs, derived here instead of asserted there.

See it

|0⟩ H |0⟩ H ⋮ t qubits QFT† eigenstate |u⟩ U¹ U² U⁴ measure → θ
Each counting qubit controls one power of U, doubling each time: the same phase-kickback trick from topics 08–10, run t times at t different "resolutions." The inverse QFT is what turns that ladder of kicked-back phases into an actual number.

The intuition

Suppose U is a unitary and |u⟩ one of its eigenstates: U|u⟩ = e2πiθ|u⟩ for some unknown θ ∈ [0,1). Phase estimation reads θ out, to t bits of precision, using t extra "counting" qubits and t controlled applications of increasing powers of U.

Each counting qubit, prepared in |+⟩ and used to control U2k applied to |u⟩, gets a phase (−1)-style kickback exactly like topics 08–10: except here the kicked-back phase is e2πiθ·2k, a continuous phase rather than just a sign, because θ isn't restricted to {0,1}. Doing this for k=0,1,..., t−1 writes successive doublings of θ across the t counting qubits: a phase-domain analogue of writing θ's binary digits one at a time. The inverse QFT is exactly the tool that reads a phase ladder like this back out as an ordinary number, the same way topic 11's periodic signal reappeared as sparse peaks.

The honest limit: if θ happens to be exactly representable in t bits, phase estimation returns it with certainty. If not (which is the generic case) the outcome is a random t-bit string, but one whose distribution is sharply peaked around the nearest t-bit approximation to θ, not spread out uselessly. That "sharply peaked, not exact" behaviour is precisely what topic 13 needs and gets.

The mathematics

After the t controlled-U2k operations, the counting register holds:

(1/√2ᵗ) Σⱼ₌₀^(2ᵗ−1) exp(2πi θ j) |j⟩

Applying the inverse QFT (topic 11, run backwards: also unitary, since QFT is) gives the amplitude of measuring outcome k:

amplitude(k) = (1/2ᵗ) Σⱼ exp(2πi j(θ − k/2ᵗ))

If θ = m/2t exactly for some integer m, every term in the sum has the same phase when k=m, so the amplitude has magnitude 1 and outcome m is measured with probability exactly 1. Otherwise, the standard bound (Nielsen & Chuang, §5.2.1) guarantees the probability of measuring within 1 of the nearest t-bit estimate of θ·2t exceeds 4/π² ≈ 0.405: a guaranteed floor, not a typical case. Verified numerically: all 2t exactly-representable phases at t=3,4,5 measured with probability 1.000000 at the correct outcome; 200 random non-exact phases at t=8 gave a minimum near-estimate probability of 0.8558: comfortably above the 4/π² guarantee, as expected since that bound is a worst-case floor.

Where it actually matters

The general-purpose eigenvalue reader Phase estimation is the subroutine inside more than just factoring: it's also the standard way to estimate ground-state energies in quantum chemistry simulation and the formal core of the HHL linear-systems algorithm referenced on the AI ↔ quantum page. Topic 13 is the one specific choice of U (modular multiplication) that turns "read out an eigenvalue" into "find a hidden period," which is the step Shor's algorithm actually needs.