Precision and Qubit Count
Every run of quantum phase estimation (QPE) returns a bit string of length , where is the number of counting qubits. More counting qubits produce a longer bit string, which means a finer-resolution estimate of the phase.
Phases as binary fractions
QPE treats the unknown phase as a binary fraction with digits. The register can hold any integer , and the algorithm outputs the integer nearest to :
The spacing between representable values is , so the absolute precision is
Each additional counting qubit halves the representable spacing, adding one more binary digit to the output. This is the quantum analogue of extending a fixed-point number with an extra bit:
| | Precision | Distinct representable phases | |-----|------------------------|-------------------------------| | 1 | 1/2 | 2 | | 2 | 1/4 | 4 | | 3 | 1/8 | 8 | | 4 | 1/16 | 16 | | | | |
Exact vs approximate phases
When is an exact -bit binary fraction — that is, is an integer — QPE returns with probability 1. If falls between two representable values, the probability spreads across the two nearest integers. For the closest integer the success probability is at least ; the tail falls off rapidly for the others. Adding more counting qubits concentrates probability on the correct outcome.
How the circuit encodes precision
After the initial Hadamard layer, each counting qubit (where ) interacts with the target register via a controlled- gate. Because the target is an eigenstate with eigenvalue , the only effect is a phase kick onto the counting qubit:
After all kicks, the register holds the state where . Applying the inverse QFT decodes this back to , making the phase readable by measurement.
Each additional qubit doubles the spacing of the Fourier frequencies it can resolve, halving .
Try it
The starter code builds the 3-qubit QPE register for phase . The superposition step and the inverse QFT are provided. Qubit 2 still needs its phase-kick gate.
When your circuit is correct, the distribution grader will show all probability on outcome (decimal 3), confirming that 3 counting qubits resolve exactly to 3 bits of precision.
Sign in on the full site to ask questions and join the discussion.