Quantum Phase Estimation
Statement
Given a unitary \(U\) and one of its eigenstates \(|u\rangle\) satisfying \(U|u\rangle = e^{2\pi i \varphi}|u\rangle\) with unknown eigenphase \(\varphi \in [0,1)\), the quantum phase estimation circuit prepares an \(n\)-qubit counting register in a uniform superposition, applies the controlled powers \(U^{2^{0}}, U^{2^{1}}, \dots, U^{2^{n-1}}\) each conditioned on one counting qubit, applies the inverse quantum Fourier transform, and on measurement returns an integer \(b\) whose reading \(\tilde\varphi = b/2^{n}\) is the best \(n\)-bit approximation to \(\varphi\), exact when \(2^{n}\varphi \in \mathbb{Z}\) and otherwise correct to \(n\) bits with probability at least \(4/\pi^{2}\).
Why it matters
Phase estimation is the computational heart of quantum algorithms that achieve super-polynomial speedups. Shor's factoring algorithm is order-finding, which is phase estimation of the modular-multiplication operator; quantum simulation reads energy eigenvalues by estimating the phase of the evolution operator \(e^{-iHt}\); the HHL linear-systems algorithm inverts eigenvalues obtained the same way. In every case the primitive being invoked is exactly this circuit.
Conceptually it is where three physics threads meet: waves, because eigenphases are read out by Fourier analysis of an interference pattern; symmetry, because \(U\) is diagonalised by its eigenbasis and the phase is the invariant label of an eigenspace; and chance, because a non-representable phase collapses onto a probability distribution sharply peaked at its nearest binary fraction.
Assumptions
Derivation
Result
Reading. Running the circuit and measuring the counting register returns an \(n\)-bit integer \(b\); dividing by \(2^{n}\) gives an estimate of the eigenphase. If \(\varphi\) is exactly representable in \(n\) bits the answer is deterministic; otherwise the output distribution is a sharp interference comb peaked at the nearest binary fraction, and a single shot lands within \(2^{-n}\) of the true phase with probability at least \(4/\pi^{2}\). To guarantee \(m\) correct bits with success probability \(1-\epsilon\), run with \(n=m+\lceil\log_2(2+\tfrac{1}{2\epsilon})\rceil\) counting qubits.
Units check. Every quantity is dimensionless: \(\varphi\) is a fraction of a full turn (radians of phase divided by \(2\pi\)), \(b\) and \(2^{n}\) are pure counts, and \(P(b)\) is a probability. The argument of every exponential and sine is a dimensionless phase in radians, and \(\sum_b P(b)=1\) as required for a normalised measurement distribution.
Limiting cases
- Exact phase, \(2^{n}\varphi\in\mathbb{Z}\): \(\delta=0\) gives \(P(b)=1\); the reading is deterministic and error-free.
- Worst case, \(\delta=\pm 2^{-(n+1)}\): the peak flattens to its minimum, \(P(b)=4/\pi^{2}\approx 0.405\), the floor of the success guarantee.
- \(n=1\): the circuit reduces to a Hadamard test, distinguishing \(\varphi\) near \(0\) from \(\varphi\) near \(1/2\) — one bit of phase.
- \(n\to\infty\): the comb narrows without bound; the estimate converges to \(\varphi\) and the transform approaches the continuous Fourier limit.
- Add one extra qubit (\(n\to n+1\)): precision doubles, \(2^{-n}\to 2^{-(n+1)}\), the exponential resolution scaling.
Breaks when
- The input is not an eigenstate. For a superposition \(\sum_u c_u|u\rangle\) there is no single \(\varphi\) to report; the circuit samples eigenphases with weights \(|c_u|^{2}\), so the deterministic reading fails and must be reinterpreted as a measurement over the eigenspectrum.
- Controlled powers are inexact or decohere. Gate error \(\varepsilon\) per controlled-\(U^{2^{j}}\) accumulates over the \(\sum_j 2^{j}\approx 2^{n}\) applications; once the total error is order one the interference comb washes out and the \(4/\pi^{2}\) floor no longer holds.
- The phase is degenerate to the target resolution. Two eigenphases separated by less than \(2^{-n}\) cannot be resolved into distinct output bins; the peaks overlap and the readout cannot tell them apart without more qubits.
- \(U\) cannot be efficiently exponentiated. If \(U^{2^{j}}\) must be built by \(2^{j}\) repetitions of \(U\), the gate count grows as \(2^{n}\) and the exponential-precision advantage over classical estimation disappears.
Failure modes
- Bit-order inversion: confusing the little-endian control assignment (qubit \(j\) drives \(U^{2^{j}}\)) with the big-endian output of a naively-wired QFT\(^{-1}\); this reverses the bit string and reports \(1-\tilde\varphi\) or a scrambled value.
- Forgetting the target register is entangled during sampling: assuming a superposition input yields the average phase \(\sum_u|c_u|^2\varphi_u\); it does not — each shot returns one eigenphase.
- Using QFT instead of QFT\(^{-1}\): applying the forward transform produces the complex conjugate reading and estimates \(-\varphi \bmod 1\).
- Treating \(4/\pi^{2}\) as the typical rather than worst-case probability: the floor applies only at the most unfavourable \(\delta\); for most phases the success probability is much higher, so pessimistically over-provisioning qubits wastes resources.
- Normalisation slip: writing the uniform superposition with \(1/2^{n}\) instead of \(1/2^{n/2}\), which breaks unitarity of the state and every downstream probability.
- Assuming eigenstate preparation is free: in practice \(|u\rangle\) is often unknown, and preparing it can be as hard as the problem being solved.
Discussion
The mechanism is best read as controlled interference. The Hadamard layer opens \(2^{n}\) coherent "paths" indexed by \(k\); the controlled powers imprint a linear phase ramp \(e^{2\pi i\varphi k}\) along those paths; and the inverse QFT is a diffraction grating that focuses the ramp onto the single output bin whose frequency matches \(\varphi\). The whole circuit is a quantum spectrometer, and its resolving power \(2^{-n}\) scales exactly like the reciprocal of the "aperture" \(2^{n}\) — the same Fourier-limited resolution that governs a diffraction grating with \(2^{n}\) slits.
The phase-kickback step is where the physics is most economical. Because \(|u\rangle\) is an eigenstate, the controlled operation never disturbs the target register — it only stamps a number onto the control. This is why one copy of \(|u\rangle\) suffices to answer a question about a \(2^{n}\)-dimensional interference pattern, and why the target and counting registers factorise at step 5. Symmetry is doing the work: the eigenbasis of \(U\) is a set of invariant one-dimensional subspaces, each carrying a single conserved label \(\varphi\).
The success probability is a manifestation of the Fejér/Dirichlet kernel that appears whenever a finite phase ramp is Fourier-analysed. The \(4/\pi^{2}\) floor is the minimum of \(\operatorname{sinc}^2\)-type leakage at the half-bin offset, identical in structure to scalloping loss in a classical FFT and to the central-fringe visibility of an \(N\)-slit interference pattern. The tail of \(P(b)\) decays only as \(1/\delta^{2}\), which is why guaranteeing many correct bits with high confidence requires a logarithmic number of extra qubits rather than a constant — the same trade between spectral leakage and window length familiar from signal processing.
Common misconceptions. Phase estimation does not "measure the phase of a state"; global phase is unobservable. It measures the relative eigenphase of a unitary, converted into an observable relative phase between the branches of the counting register by kickback. Nor does it give unbounded precision for free: each additional bit doubles the number of applications of \(U\), so precision is bought with circuit depth, and on noisy hardware that depth is the binding constraint.
Worked examples
Reading. Measurement is deterministic: outcome \(b=1\), reading \(\varphi=1/8\), no error. Units: dimensionless phase.
Reading. The nearest 3-bit estimate \(0.375\) (true value \(0.333\)) is returned with probability about 69% in a single shot, comfortably above the \(4/\pi^{2}\approx0.405\) worst-case floor; the remaining probability leaks mostly to the adjacent bin \(b=2\). Units: all dimensionless.
Problems
- Show explicitly that applying controlled-\(U\) to \(\tfrac{1}{\sqrt2}(|0\rangle+|1\rangle)\otimes|u\rangle\), where \(U|u\rangle=e^{2\pi i\varphi}|u\rangle\), produces \(\tfrac{1}{\sqrt2}(|0\rangle+e^{2\pi i\varphi}|1\rangle)\otimes|u\rangle\), and state in one sentence why the target register is unchanged.
Solution
Controlled-\(U\) acts as \(|0\rangle\langle0|\otimes I+|1\rangle\langle1|\otimes U\). On \(|0\rangle|u\rangle\) it gives \(|0\rangle|u\rangle\); on \(|1\rangle|u\rangle\) it gives \(|1\rangle U|u\rangle = e^{2\pi i\varphi}|1\rangle|u\rangle\). By linearity \(\tfrac{1}{\sqrt2}(|0\rangle+|1\rangle)|u\rangle \mapsto \tfrac{1}{\sqrt2}(|0\rangle+e^{2\pi i\varphi}|1\rangle)|u\rangle\). The target is unchanged because \(|u\rangle\) is an eigenstate, so \(U\) acts as a scalar and factors out — the phase is kicked back onto the control. - To estimate an eigenphase to \(m=6\) bits of accuracy with success probability at least \(1-\epsilon=0.99\), how many counting qubits \(n\) are required? Use \(n=m+\lceil\log_2(2+\tfrac{1}{2\epsilon})\rceil\).
Solution
With \(\epsilon=0.01\): \(2+\tfrac{1}{2\epsilon}=2+\tfrac{1}{0.02}=2+50=52\). Then \(\log_2 52 = 5.70\), so \(\lceil 5.70\rceil = 6\). Therefore \(n = 6+6 = \boxed{12}\) counting qubits. The six extra qubits buy the confidence margin against spectral leakage into neighbouring bins. - An operator has eigenphase \(\varphi=5/16\). With \(n=4\) counting qubits, what outcome is measured and with what probability?
Solution
\(2^{n}\varphi = 16\cdot\tfrac{5}{16}=5\in\mathbb{Z}\), so the phase is exactly 4-bit representable: \(5=(0101)_2\), i.e. \(\varphi=0.0101_2\). Here \(\delta=0\), the interference comb collapses to a single spike, and the inverse QFT deposits \(|0101\rangle\) deterministically. Outcome \(b=5\), reading \(\tilde\varphi=5/16=0.3125\), with probability \(P=1\). - For \(\varphi=1/5\) and \(n=3\), identify the most probable outcome \(b\) and compute \(P(b)\) from \(P(b)=\dfrac{\sin^{2}(\pi 2^{n}\delta)}{2^{2n}\sin^{2}(\pi\delta)}\).
Solution
\(2^{n}\varphi = 8\cdot 0.2 = 1.6\), nearest integer \(b=2\), so \(\tilde\varphi=2/8=0.25\) and \(\delta=0.2-0.25=-0.05\). Then \(2^{n}\delta = 8(-0.05)=-0.4\), giving numerator \(\sin^{2}(\pi\cdot(-0.4))=\sin^{2}(72^\circ)=0.90451\). Denominator: \(\sin(\pi\cdot(-0.05))=\sin(-9^\circ)=-0.15643\), squared \(=0.024472\), times \(2^{2n}=64\) gives \(1.5662\). Thus \(P(2)=0.90451/1.5662=\boxed{0.578}\), about 58% — still above the \(4/\pi^{2}\) floor, with most of the remainder in bin \(b=1\). - Suppose the target register is prepared in \(|\phi\rangle=c_1|u_1\rangle+c_2|u_2\rangle\), a superposition of two eigenstates with phases \(\varphi_1,\varphi_2\) and \(|c_1|^2+|c_2|^2=1\). Describe the joint state before measurement and the statistics of the counting-register readout.
Solution
The circuit is linear, so it processes each eigenstate branch independently. After the inverse QFT the joint state is \(c_1|\tilde\varphi_1\rangle|u_1\rangle + c_2|\tilde\varphi_2\rangle|u_2\rangle\) (taking the exact-phase case for clarity), an entangled state correlating each estimate with its eigenstate. Measuring the counting register returns \(\tilde\varphi_1\) with probability \(|c_1|^2\) and \(\tilde\varphi_2\) with probability \(|c_2|^2\), and collapses the target register onto the corresponding \(|u_k\rangle\). The circuit thus samples the eigenphase spectrum weighted by the input overlaps — this is exactly the mechanism exploited in order-finding, where the required uniform superposition of eigenstates is prepared implicitly by starting from a computational-basis state.