• Algorithms
  • Also: QPE
  • Also: phase kickback algorithm

Quantum Phase Estimation

A quantum algorithm that estimates the eigenvalue phase of a unitary operator using the quantum Fourier transform and controlled-unitary operations, serving as a core subroutine in Shor's algorithm and quantum chemistry simulations.

Quantum Phase Estimation (QPE) solves the following problem: given a unitary operator UU and one of its eigenstates ψ|\psi\rangle, estimate the phase φ\varphi in the eigenvalue equation Uψ=e2πiφψU|\psi\rangle = e^{2\pi i \varphi}|\psi\rangle. The phase φ[0,1)\varphi \in [0, 1) is encoded as a binary fraction in a register of ancilla qubits, readable after a measurement. QPE underlies Shor’s algorithm, quantum chemistry ground-state energy estimation, and several quantum linear algebra routines.

The details

The circuit consists of two registers. The first is an ancilla register of tt qubits, initialized to 0t|0\rangle^{\otimes t}, which will hold the binary approximation of φ\varphi. The second register holds the eigenstate ψ|\psi\rangle.

Circuit structure:

  1. Apply Hadamard to each ancilla qubit to create a uniform superposition.
  2. Apply controlled-U2kU^{2^k} gates: ancilla qubit kk controls UU applied 2k2^k times to the eigenstate register.
  3. Apply the inverse Quantum Fourier Transform (QFT^\dagger) to the ancilla register.
  4. Measure the ancilla register. The result is the tt-bit binary approximation of φ\varphi.
|0⟩ ──[H]──●─────────────── ... ──[QFT†]──[M]
|0⟩ ──[H]──│──●──────────── ... ──[QFT†]──[M]
|0⟩ ──[H]──│──│──● ──────── ... ──[QFT†]──[M]
|ψ⟩ ───────U──U²─U⁴──────── ...

Precision. With tt ancilla qubits, QPE estimates φ\varphi to tt bits of precision, meaning the error is at most 2t2^{-t} with high probability. Adding one ancilla qubit halves the error. For a phase of φ=1/8=0.0012\varphi = 1/8 = 0.001_2, three ancilla qubits suffice to recover the exact answer.

QPE for the T gate. The T gate has eigenvalues 11 and eiπ/4e^{i\pi/4}. For the 1|1\rangle eigenstate, the phase is φ=1/8\varphi = 1/8. Three ancilla qubits suffice to recover this exactly:

from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.circuit.library import QFT
from qiskit_aer import AerSimulator

ancilla = QuantumRegister(3, 'anc')
target = QuantumRegister(1, 'tgt')
creg = ClassicalRegister(3, 'c')
qc = QuantumCircuit(ancilla, target, creg)

qc.x(target)        # eigenstate |1> of T gate
qc.h(ancilla)       # superposition on ancilla register

# Controlled-T^(2^k): T^1, T^2=S, T^4=Z
qc.cp(3.14159265 / 4, ancilla[0], target[0])
qc.cp(3.14159265 / 2, ancilla[1], target[0])
qc.cp(3.14159265,     ancilla[2], target[0])

iqft = QFT(3, inverse=True)
qc.compose(iqft, qubits=ancilla, inplace=True)
qc.measure(ancilla, creg)

result = AerSimulator().run(qc, shots=1024).result()
print(result.get_counts())  # '001' (= 1/8) with high probability

Role in Shor’s algorithm. The period-finding step in Shor’s algorithm is a direct application of QPE. The unitary is U:xaxmodNU:|x\rangle \mapsto |ax \bmod N\rangle; its eigenvalue phases encode the period rr, which QPE extracts via the QFT.

Role in quantum chemistry. QPE can extract exact ground-state energies of molecular Hamiltonians: prepare an approximate ground state, run QPE with the time-evolution operator U=eiHtU = e^{-iHt}, and read off the energy as a phase. VQE was developed as a near-term alternative that trades exactness for shallower circuits.

Hardware requirements. QPE circuits are deep. The controlled-U2kU^{2^k} gates become expensive as kk grows, and practical applications in chemistry or cryptography need fault-tolerant hardware with thousands to millions of logical qubits. QPE is primarily a fault-tolerant-era algorithm.

Why it matters for learners

QPE is the engine behind many of quantum computing’s most important algorithms. Understanding it builds fluency in three concepts: the QFT (which converts period information into measurable frequencies), controlled unitaries (the mechanism for imprinting phase information on the ancilla register), and phase kickback (why controlled-UU gates write phase onto the control qubit). QPE is the cleanest demonstration of how quantum algorithms extract useful information from exponentially large superpositions via a single measurement.

Common misconceptions

Misconception 1: QPE gives the eigenvalue directly. QPE outputs a binary approximation of φ\varphi, the fractional part of the eigenvalue’s argument. Recovering e2πiφe^{2\pi i \varphi} requires interpreting φ\varphi, and if the true phase is irrational, QPE can only approximate it up to tt-bit precision.

Misconception 2: QPE requires the exact eigenstate as input. If the input is a superposition of eigenstates, QPE returns phase estimates for each eigenstate with probability equal to the squared overlap. For chemistry, a good approximate ground state is sufficient; the correct phase dominates the measurement outcomes.

Misconception 3: VQE replaces QPE for quantum chemistry. VQE finds approximate ground-state energies using shallow circuits and classical optimization; QPE finds exact energies but requires fault-tolerant hardware. They are complementary tools targeting different hardware regimes.

See also