Shor’s algorithm (chapter 8d) didn’t arrive from nowhere. Between the toy win of Deutsch–Jozsa and the world-shaking factoring algorithm sit two stepping stones — Simon’s and, above all, phase estimation: the engine that reads a hidden angle off a quantum gate.
A unitary gate has special states — its eigenstates — that it leaves alone except for a twist of phase, e2πiφ. That angle φ is invisible to a single measurement (chapter 16). Phase estimation is a clever circuit that stamps the phase onto a register of counting qubits, then runs the inverse Fourier transform to turn it into a number you can simply read in binary. Simon’s algorithm is the same trick aimed at a hidden XOR pattern — both find global structure by making amplitudes interfere.
Tuning an old radio, you don’t “see” a station’s frequency — you sweep the dial until the signal peaks, and the position of that peak is the frequency. The gate’s phase φ acts like a station broadcasting at one frequency; the inverse Fourier transform is the tuner that locks onto it and shows a sharp peak on the dial. Add more counting qubits and you simply get a finer dial — more decimal places on the frequency.
Set a true phase φ and a register size n. The Fourier transform concentrates the register’s amplitude into a peak at the integer closest to 2nφ. More counting qubits → finer bins → a sharper reading.
Each counting qubit controls a power of the gate, kicking its phase back onto the register. The register ends in a state whose frequency is exactly φ — and the inverse QFT (chapter 8d) reads that frequency out as a binary integer:
When 2nφ is a whole number the peak is perfect — one bin with probability 1. Otherwise the amplitude spreads, but stays sharply concentrated on the nearest bins, so a handful of repetitions nails the phase. Simon’s algorithm is the same interference idea on a hidden bit-string, and it was the direct clue that led Shor to factoring.
“Shor’s algorithm is a magic factoring spell.” It’s phase estimation wearing a disguise. Recast factoring as finding the period of modular multiplication, notice the period is the eigen-phase of a simple gate, and the quantum part is exactly the circuit you just drove. The famous result is a clean application of a reusable tool.
Phase estimation also powers quantum chemistry and simulation — reading energy levels is reading eigen-phases. One last frontier remains: using entanglement not to compute, but to measure the world more precisely than independent probes ever could.