|q⟩ Bad Qubits

intermediate · Programming · Quantum Phase Estimation

Applications of QPE

Quantum Phase Estimation (QPE) is not an end in itself. It is the engine that drives most of the celebrated polynomial and exponential speedups in quantum computing. Once you can extract the eigenphase φ\varphi of a unitary UU from the interference pattern of a quantum circuit, a surprising number of hard computational problems become tractable. This lesson surveys the most important use-cases.

1. Shor's factoring algorithm

Factoring a large integer NN classically takes time that grows faster than any polynomial in the number of digits of NN — the best known classical algorithm (the general number field sieve) runs in roughly exp ⁣(c(logN)1/3(loglogN)2/3)\exp\!\bigl(c\,(\log N)^{1/3}(\log\log N)^{2/3}\bigr) steps (with c=(64/9)1/31.923c=(64/9)^{1/3}\approx 1.923). Shor's algorithm (1994) reduces factoring to order finding: given aa coprime to NN, find the smallest positive integer rr such that ar1(modN)a^r \equiv 1 \pmod{N}.

The reduction works because any non-trivial solution to x21(modN)x^2 \equiv 1 \pmod{N} yields a factor of NN by computing gcd(x±1,N)\gcd(x \pm 1,\, N). Order finding is then used to produce such an xx with constant probability.

QPE enters through the unitary

Uay=aymodN,U_a |y\rangle = |ay \bmod N\rangle,

whose eigenstates are

us=1rk=0r1e2πisk/rakmodN,s=0,1,,r1,|u_s\rangle = \frac{1}{\sqrt{r}} \sum_{k=0}^{r-1} e^{-2\pi i s k / r} |a^k \bmod N\rangle, \qquad s = 0, 1, \ldots, r-1,

each carrying eigenphase φs=s/r\varphi_s = s/r. Running QPE on UaU_a yields a binary approximation to s/rs/r; applying the continued-fractions algorithm to that approximation recovers rr exactly. The whole procedure runs in O ⁣((logN)3)O\!\bigl((\log N)^3\bigr) gate operations — an exponential speedup over the best classical approach.

2. Quantum chemistry: molecular energy estimation

Simulating quantum chemistry on a classical computer is exponentially hard because the Hilbert space of nn interacting electrons grows as O(2n)O(2^n). For molecules of biological or industrial interest (n50n \sim 50-100100 electrons), exact classical simulation is out of reach.

The quantum-chemistry approach encodes the molecular Hamiltonian HH as a sum of Pauli operators on qubits and constructs the time-evolution unitary U=eiHtU = e^{-iHt} for a short time tt. This unitary has eigenvalues eiEkte^{-iE_k t}, where the EkE_k are the energy levels of the molecule. Applying QPE with nn ancilla qubits to an approximation of the ground state E0|E_0\rangle yields a binary approximation to E0t/(2π)E_0 t / (2\pi); dividing by tt recovers E0E_0 to nn-bit precision.

The key steps are:

  1. State preparation — create a trial state ψtrial|\psi_{\text{trial}}\rangle with significant overlap with E0|E_0\rangle.
  2. Hamiltonian simulation — implement controlled-U2kU^{2^k} using Trotter or qubitization techniques.
  3. QPE readout — measure the ancilla register and apply classical post-processing.

For molecules such as FeMoco (the active site of nitrogenase, relevant to nitrogen fixation) and cytochrome P450 (drug metabolism), resource estimates suggest that fault-tolerant quantum computers with O(103)O(10^3)-O(104)O(10^4) logical qubits could outperform any feasible classical simulation, yielding chemically accurate energies that matter for drug discovery and materials science.

3. Quantum linear-algebra speedups

The HHL algorithm (Harrow, Hassidim, Lloyd 2009) solves the linear system Ax=bA\mathbf{x} = \mathbf{b} for sparse, well-conditioned matrices AA in time O(logNκ2/ϵ)O(\log N \cdot \kappa^2 / \epsilon), compared to the classical O(Nκ)O(N \kappa) or better for sparse solvers. The speedup comes from QPE applied to the unitary eiAte^{iAt}: once the eigenvalues of AA are loaded into an ancilla register, the algorithm applies controlled rotations proportional to 1/λk1/\lambda_k to invert the matrix in the eigenvalue basis.

The caveats are important: the speedup is measured against state-preparation cost and output readout, so the practical advantage depends heavily on the problem structure. Nevertheless, HHL-style subroutines appear in proposed quantum machine-learning and optimization algorithms.

4. Quantum counting and amplitude estimation

Quantum counting asks: given an oracle that marks some subset MM of an NN-element search space, how many marked items are there? Classically, an exact count requires inspecting every item. Quantum counting uses QPE applied to the Grover iterate GG (whose eigenphases are ±θM\pm\theta_M where sin2θM=M/N\sin^2\theta_M = M/N) to read off M|M| in O(N/M)O(\sqrt{N/M}) oracle calls.

More generally, amplitude estimation is a QPE variant that estimates sin2θ\sin^2\theta for any unitary AA acting on a target state. It provides a quadratic speedup for Monte Carlo integration and is used in quantum finance and risk analysis for tasks such as option pricing and portfolio optimization.

5. Topological and condensed-matter physics

QPE is used in research-level quantum simulation to probe properties of lattice models. For the toric code and other topological phases, controlled evolution under the Hamiltonian encodes anyonic excitation energies as eigenphases. QPE then reads out the energy gap that protects topological qubits from decoherence — a theoretical tool for designing more robust hardware.

Summary: QPE as a universal subroutine

The common thread across all these applications is the same three-step pattern you learned in this module:

| Step | Role | |---|---| | HnH^{\otimes n} on ancillas | Create a superposition of all possible phase labels | | Controlled-U2kU^{2^k} kick-back | Imprint the eigenphase onto the ancilla amplitudes | | Inverse QFT | Convert phase information into a readable binary string |

What changes between applications is only the unitary UU:

Mastering the QPE circuit therefore unlocks a large fraction of the known landscape of quantum algorithmic speedups. The next module applies QPE to the Quantum Fourier Transform and to Shor's algorithm in detail.

Sign in on the full site to ask questions and join the discussion.