What is Quantum Phase Estimation?

Given a unitary operator U and one of its eigenstates |psi>, quantum phase estimation finds the phase theta such that:

U|psi> = e2*pi*i*theta |psi>

Here theta is a real number between 0 and 1. Classical computers cannot efficiently compute this phase for large unitary operators -- the problem is at least as hard as simulating the quantum system itself. QPE extracts theta using quantum parallelism: it encodes the phase into the measurement probabilities of an ancilla register and reads it out using the inverse quantum Fourier transform (QFT).

QPE is a subroutine, not a standalone algorithm. You use it as a component inside larger algorithms whenever you need to extract an eigenvalue. Its output is the phase theta to n bits of precision, where n is the number of ancilla qubits you allocate.

Understanding QPE requires understanding the quantum Fourier transform -- the QFT is the final decoding step that translates phase information from quantum amplitudes into classical measurement outcomes.

How QPE works

The QPE circuit has three stages. You do not need heavy mathematics to understand what each stage is doing.

1

Ancilla register in superposition

Prepare n ancilla qubits in the uniform superposition state by applying a Hadamard gate to each. These n qubits are your "measurement register" -- the bits that will ultimately encode the phase theta. The number n determines the precision: you recover theta to n binary decimal places, so the error is at most 1/2^n.

2

Controlled-U operations

Apply controlled-U^(2^k) for k = 0, 1, ..., n-1, where each ancilla qubit k controls the k-th power of U acting on the target register (the eigenstate |psi>). This step encodes the phase into the ancilla via a mechanism called phase kickback: applying a controlled-U to an eigenstate transfers the eigenvalue phase onto the control qubit's amplitude. After all n controlled operations, the ancilla register holds the phase encoded in its quantum state.

3

Inverse QFT and measurement

Apply the inverse quantum Fourier transform to the ancilla register. The QFT changes the basis so that the phase encoded in the amplitudes becomes readable as a standard computational-basis measurement outcome. Measuring the ancilla register now gives you the binary representation of theta directly. With n ancilla qubits, you read out n binary digits of the phase.

Where QPE is used

QPE appears as a component in several of the most significant quantum algorithms:

Shor's algorithm

Uses QPE to find the period of the modular exponentiation function f(x) = a^x mod N. The period, once found, reveals the factors of N via classical number theory. QPE is the quantum heart of Shor's -- the part that provides exponential speedup over classical factoring. See the Shor's algorithm guide.

Quantum chemistry

The ground state energy of a molecule equals the phase of the time-evolution operator e^(-iHt) acting on the ground state, where H is the molecular Hamiltonian. QPE extracts this phase directly, giving the ground state energy to high precision. This is the theoretically preferred method for quantum chemistry, though it requires fault-tolerant hardware.

HHL algorithm

The HHL algorithm for solving linear systems Ax = b uses QPE to estimate the eigenvalues of the matrix A. These eigenvalues are then used to construct the solution x = A^(-1)b in quantum superposition. QPE gives HHL its exponential speedup over classical direct solvers.

Quantum amplitude estimation

A generalization of Grover's algorithm that uses QPE to estimate the probability amplitude of a quantum state. Used in quantum finance for Monte Carlo estimation with quadratic speedup. Related to Grover's through the structure of the amplitude amplification operator.

QPE vs variational methods (VQE/QAOA)

QPE and variational algorithms like VQE and QAOA both target problems involving quantum operators, but they approach them from fundamentally different directions. The trade-off is precision versus hardware requirements.

QPE

  • Gives exact eigenvalue to n bits of precision
  • Requires deep circuits with many controlled-U applications
  • Needs fault-tolerant quantum hardware (millions of logical qubits)
  • Provably correct with polynomial overhead
  • The long-term goal for quantum chemistry and factoring

VQE / QAOA

  • Approximate -- gives an upper bound on the ground state energy
  • Uses shallow parameterized circuits (fewer gate operations)
  • Runs on today's NISQ hardware
  • Heuristic -- convergence and accuracy are not guaranteed
  • The practical near-term approach; will be superseded by QPE on fault-tolerant hardware

For quantum chemistry: VQE is what you implement today on real hardware. QPE is what fault-tolerant quantum computers will use to compute chemistry more accurately than classical computers can. See the VQE guide for the variational approach.

Courses covering QPE

Quantum computing courses that include quantum phase estimation in their curriculum.

QPE tutorials

Hands-on implementations of quantum phase estimation in Qiskit and other frameworks.

Frequently asked questions

What is quantum phase estimation used for?
Quantum phase estimation (QPE) is a subroutine used inside many important quantum algorithms. Its primary applications are: (1) Shor's algorithm, where QPE finds the period of a modular exponentiation function -- which is the key step in factoring large integers; (2) quantum chemistry simulation, where QPE extracts the ground state energy of a molecule by estimating the phase of the time-evolution operator; and (3) the HHL algorithm for linear systems, where QPE estimates eigenvalues of the system matrix. QPE is the 'engine' behind many quantum speedups -- whenever a quantum algorithm needs to extract a hidden eigenvalue, QPE is usually the mechanism.
How is QPE related to Shor's algorithm?
Shor's algorithm uses QPE as its central component. To factor a number N, Shor's needs to find the period r of the function f(x) = a^x mod N. Finding this period is equivalent to estimating the eigenvalue (phase) of the modular exponentiation operator U where U|x> = |ax mod N>. QPE applies controlled powers of U to an ancilla register, then uses the inverse quantum Fourier transform to read out the phase, which encodes the period. The factoring step then follows from the period using classical number theory. Without QPE, Shor's algorithm would not work.
How many qubits does QPE need?
QPE requires two registers. The ancilla (precision) register needs n qubits, where the precision of the phase estimate is 1/2^n -- that is, the estimate is accurate to n binary decimal places. For Shor's algorithm on RSA-2048, this requires roughly 2,048 ancilla qubits. The target register needs enough qubits to represent the eigenstate of the unitary operator being estimated. Total qubit requirements for QPE-based algorithms on practically relevant problems are millions of logical qubits -- well beyond current hardware. This is why QPE is a fault-tolerant algorithm, not a NISQ algorithm.
How is QPE different from VQE?
QPE and VQE both compute eigenvalues -- particularly ground state energies in quantum chemistry -- but they work very differently and target different hardware. QPE gives the exact phase to n bits of precision but requires a deep circuit with many controlled operations and full quantum error correction. It is the theoretically correct long-term approach. VQE is approximate: it uses a shallow parameterized circuit and a classical optimizer to find a low-energy state without ever estimating the phase directly. VQE runs on today's NISQ hardware; QPE requires fault-tolerant hardware that does not yet exist at the required scale. In the long run, QPE-based approaches will replace VQE for chemistry, but VQE is the practical tool available today.