Single-Qubit Phase Estimation
The full Quantum Phase Estimation (QPE) circuit can use many ancilla qubits to achieve high precision, but the essential ideas are already present when the counting register contains just one qubit. In that simplest case the entire algorithm fits in two qubits and four gates, yet it already demonstrates phase kickback and the inverse QFT working together to extract an eigenphase.
The two-qubit QPE circuit
Let be a unitary with eigenvector satisfying
We allocate two qubits:
- Qubit 0 — the single counting (ancilla) qubit, initialised to .
- Qubit 1 — the eigenstate register, initialised to .
The circuit has three stages.
Stage 1 — Superpose the counting qubit.
The full state is now .
Stage 2 — Controlled- (phase kickback).
Apply to the eigenstate register only when the counting qubit is . Because is an eigenstate, this does not entangle the two registers in amplitude — it merely multiplies the amplitude of the counting qubit by the eigenvalue :
The eigenstate register is unchanged; the phase has been kicked back into the counting qubit.
Stage 3 — Inverse QFT on 1 qubit.
The 1-qubit QFT is just , so the inverse QFT is also . Applying to the counting qubit:
Measuring the counting qubit now yields:
A worked example: the gate
The gate acts on its eigenstate as
so . Plugging into the formula above:
The counting qubit is measured as 1 with certainty, encoding the 1-bit binary
fraction exactly. Because is representable in one
bit there is no approximation error.
In the circuit this means:
c.x(1)— prepare the eigenstate on qubit 1.c.h(0)— put the counting qubit into superposition.c.cz(0, 1)— controlled- performs the phase kickback (CZ multiplies by , which is exactly controlled- acting on the eigenstate of ).c.h(0)— inverse QFT undoes the superposition and converts the phase to a basis state.c.measure(0)— read out the estimated phase bit.
Try it
Complete the circuit below. The eigenstate is already prepared and the
first Hadamard is in place. Your task is to add the controlled-Z (the controlled-
step) and the second Hadamard (the inverse QFT), then measure the counting qubit.
The grader checks the output distribution: all probability should land on bitstring 11
(counting qubit = 1, eigenstate qubit = 1, with qubit 0 most significant).
Sign in on the full site to ask questions and join the discussion.