phase estimation

The workhorse subroutine of quantum computing carries a guarantee: read the dial at the nearest tick and you are right at least 4/pi-squared of the time -- about forty percent -- no matter how fine the dial.

proved in corpus · proved here, no imported axiomsLean phase_estimation_lower_bound

In plain terms

Here is the problem. A quantum computation's answer often arrives as a phase -- an angle wound into the state, invisible to any direct look. You need to read an angle you cannot see, using a register with finitely many dial positions.

Phase estimation is the reading procedure: spread the phase across the register, run the Fourier transform backwards, and the amplitude concentrates at the dial position closest to the true angle. If the angle sits exactly on a tick, you read it with certainty.

Generically it sits between ticks -- and the textbook promise is that the nearest tick still comes up with probability at least 4/pi-squared, independent of the register size. That constant is the Dirichlet kernel talking, and it is what makes the subroutine composable: whatever consumes the reading can budget for a fixed success floor.

In CSD

Both halves are corpus theorems, in the CSD-free Cat-1 tree where an outside project can import them: the exact case (phase_estimation_exact, an inverse-QFT inversion) and the 4/pi-squared floor for an arbitrary real phase (phase_estimation_lower_bound).

The result was proved inside the Shor development and extracted in 2026 once it was noticed that the statements never mention orders or modular arithmetic -- the module is generic in the register size, and Shor's order-finding consumes it at phase s/r. The standing disclaimer applies: the algorithm layer consumes the unitary pillar, it does not support foundations.

Mathematically

On the T-level counting register, the phase state (1/sqrt T) sum over x of e^{2 pi i phi x} |x> read by the inverse QFT at index c has amplitude the Dirichlet sum (1/T) sum over x of e^{2 pi i (phi - c/T) x}; the geometric series closes it and the norm reduces to T^{-2} sin^2(pi delta T) / sin^2(pi delta) with delta = phi - c/T.

For |delta| <= 1/(2T), Jordan's inequality bounds the numerator below and |sin t| <= |t| the denominator above, giving probability at least 4/pi^2 at the closest index (Nielsen and Chuang section 5.2); on resonance the probability is one. Single-phase statement only: a consumer racing several eigenvalue branches must control its own cross-terms.

Module
CsdLean4/Mathlib/QuantumInfo/PhaseEstimation.lean
Background
Overview
Related
quantum fourier transform, shor algorithm
Referenced
Nielsen & Chuang, CUP, Wikipedia

Source links are pinned to a commit, so they do not drift. The anchors above are checked mechanically against the Lean tree on every build. The mathematics is not, and cannot be: that is a human responsibility and it rests with the author.

Part of Constraint-Surface Dynamics · Formalised in csd-lean4.

Privacy policy