Quantum Phase Estimation Precision: How Many Qubits, How Many Queries
Quantum phase estimation (QPE) is the workhorse of quantum factoring, HHL, quantum chemistry, and more. The precision-resource tradeoff is exactly: t bits of phase precision require 2^t controlled-U queries. This tutorial covers the resource analysis, the Heisenberg limit, the iterative QPE variant that uses fewer ancilla qubits, and the modern QSVT-based replacement that beats QPE for many applications.
Prerequisites: Tutorial 11: QFT and Phase Estimation, Tutorial 30: Quantum Singular Value Transformation
Tutorial 11 introduced quantum phase estimation as a building block: given a unitary and an eigenstate with , QPE estimates the phase to bits of precision. The construction uses an ancilla register, controlled applications of for , and a final inverse QFT.
The precision-resource tradeoff is the heart of QPE: bits of phase precision require total queries to controlled-. This linear-in-precision scaling is fundamental — the Heisenberg limit of phase estimation — and it constrains every algorithm that uses QPE as a subroutine: Shor’s factoring (where the phase is the period), HHL (where the phase is the eigenvalue), quantum chemistry (where the phase is the energy), and many others.
For high-precision applications, this is expensive. Quantum-chemistry energy estimation to chemical accuracy ( Hartree, ~10 bits) needs controlled- queries per estimation. For each unitary application costing many gates, this compounds.
This tutorial covers the precision-resource analysis, the iterative phase estimation (IPE) variant that uses constant-many ancilla qubits at the cost of more measurements, and the modern QSVT-based replacement that matches the Heisenberg limit with much smaller resource overhead.
The standard QPE precision analysis
For QPE with ancilla qubits applied to an eigenstate :
- The output is a -bit estimate of .
- The probability of the most-likely outcome (the closest -bit binary fraction) is at infinity-precision input, for typical applications.
- The probability of being more than bit off scales as for a -bit error.
To estimate to accuracy with success probability :
For (10 bits = ~ accuracy) and (95% success): , so 14 ancilla qubits. The total controlled- queries: . Per phase estimation.
The Heisenberg limit says you cannot do better than controlled- queries for -accuracy. QPE saturates this limit: it gives optimal phase estimation, no algorithm can do exponentially better in queries.
Iterative phase estimation
The standard QPE uses ancilla qubits — one per bit of precision. For high-precision chemistry (, ), this means 20 ancilla qubits. On NISQ hardware, ancilla qubits are precious.
Iterative phase estimation (IPE) uses just one ancilla qubit at the cost of running the algorithm times sequentially. IPE works as follows:
- Apply controlled on the single ancilla, then measure. Get the most significant bit of the phase.
- Use the result to do classical feedback: apply with a phase-corrected ancilla initialization, measure for the next bit.
- Repeat for bits total.
The total controlled- queries is the same as standard QPE (). The ancilla cost is reduced from to , at the cost of sequential dependency (each bit depends on the previous, so the algorithm can’t be parallelized across bits).
IPE is the standard choice for NISQ-era phase-estimation experiments — fewer qubits, same query cost. For fault-tolerant computation, the parallelism of standard QPE is more attractive (the time savings are real even though the qubit count is higher).
Phase estimation in HHL
Tutorial 58 covered HHL’s phase-estimation step. The phase-estimation precision determines:
- The accuracy of the eigenvalue inversion.
- The success probability of the conditional rotation (smaller eigenvalues are harder to invert).
- The total runtime (precision squared by the conditional-rotation amplitude amplification).
For HHL with condition number , the phase estimation needs precision for output accuracy . So the phase-estimation queries scale as — the same factor that dominates HHL’s runtime. HHL’s -dependence comes mostly from phase-estimation precision.
The QSVT-based variant of HHL (modern era) replaces phase estimation with direct polynomial implementation of , which avoids the precision-resource tradeoff in this specific way. The total cost is similar but the constants are better.
QSVT-based phase estimation
A modern alternative to QPE: quantum singular value transformation (QSVT) based phase estimation (tutorial 30). Instead of a phase-estimation register, apply a polynomial of degree that “thresholds” the unitary’s spectrum, then measure.
Specifically, to determine whether the phase is in a specific range , apply a polynomial that approximates the indicator function on that range. The polynomial degree determines the resolution — same Heisenberg limit, but the polynomial-implementation cost can be much smaller than the QPE-equivalent.
For specific tasks (e.g., “is the eigenvalue above threshold ”), QSVT-based estimation uses block-encoding queries, exponentially better than QPE’s . This is the dominant phase-estimation method in 2026 for fault-tolerant resource estimates.
For full -bit phase estimation, QSVT and QPE have similar asymptotic costs — but QSVT’s constants are typically better.
A small QPE precision demonstration
Concrete code that runs QPE and measures the precision-vs-queries tradeoff:
import numpy as np
import pennylane as qml
n_data = 1
def make_qpe_circuit(t_ancilla, eigenphase):
"""Standard QPE with t_ancilla bits to estimate eigenphase."""
total_qubits = t_ancilla + n_data
dev = qml.device("default.qubit", wires=total_qubits, shots=1000)
@qml.qnode(dev)
def qpe():
# Initialize data register in eigenstate (here, just |1> for U = phase gate).
qml.PauliX(wires=t_ancilla)
# Apply Hadamards to ancilla register.
for j in range(t_ancilla):
qml.Hadamard(wires=j)
# Controlled-U^(2^j) operations. U = phase gate by `eigenphase`.
for j in range(t_ancilla):
angle = 2 * np.pi * eigenphase * (2 ** j)
qml.ctrl(qml.PhaseShift, control=j)(angle, wires=t_ancilla)
# Inverse QFT on ancilla register.
qml.adjoint(qml.QFT)(wires=range(t_ancilla))
return qml.sample(wires=range(t_ancilla))
return qpe
# True phase to estimate.
true_phase = 0.3142 # ~pi/10
for t in [3, 5, 7]:
qpe = make_qpe_circuit(t, true_phase)
samples = qpe()
# Convert binary samples to phase estimates.
estimates = np.array([sum(s[i] * 2**-(i+1) for i in range(t)) for s in samples.T.tolist() if hasattr(s, '__iter__')])
if len(estimates) == 0:
# Fallback: most-frequent integer outcome
flat = np.array([np.dot(s, 2**np.arange(t-1, -1, -1)) for s in samples.T])
most_common = np.bincount(flat).argmax()
est = most_common / 2**t
print(f"t={t}: estimate={est:.4f}, true={true_phase:.4f}, error={abs(est-true_phase):.4f}, queries={2**t-1}")
else:
mean_est = np.mean(estimates)
print(f"t={t}: mean estimate={mean_est:.4f}, true={true_phase:.4f}, error={abs(mean_est-true_phase):.4f}, queries={2**t-1}")
The relationship to verify: with ancilla qubits, the typical precision is , and the total queries is . Doubling the precision doubles the queries — the Heisenberg limit made concrete.
Common misconceptions
“More ancilla qubits in QPE always gives better precision.” Up to a point — beyond the input state’s actual phase precision (e.g., for a noisy state with effective phase uncertainty , no QPE bit beyond adds information). Ancillas need to match the input’s information content.
“Iterative QPE is strictly worse than standard QPE.” They use the same total number of queries. IPE uses fewer ancilla qubits at the cost of sequential dependency. For NISQ hardware, IPE is often better; for fault-tolerant, standard QPE is better.
“QSVT replaces QPE in all applications.” Not all. For tasks where you need the explicit phase as a classical number, QPE remains the right tool. QSVT is better for tasks where you only need to act on the phase (e.g., apply a polynomial of the phase to the state).
“The Heisenberg limit means QPE is optimal.” It means QPE saturates the optimal scaling. Constants matter — QSVT has better constants for many applications.
“QPE works with any unitary.” It works with any unitary that can be applied to the input state. Practically, the controlled- implementation is a constraint: implementing for large requires either repeated applications (cost ) or fast-forwarding tricks that may not exist for the specific .
Decision rule
For phase-estimation tasks:
- Standard QPE is the right choice when you need explicit -bit phase output and have ancilla qubits to spare.
- Iterative QPE is the NISQ choice — one ancilla, sequential dependency, same total queries.
- QSVT-based phase estimation is the right choice when you only need to act on the phase (apply a polynomial), not extract its classical value. Better constants, exponentially better for thresholding-style tasks.
- Bayesian QPE (not covered in detail here) is a NISQ-era variant that uses repeated short-time evolution and Bayesian classical post-processing. Useful when controlled- for large is too expensive on hardware.
For most fault-tolerant resource estimates in 2026, the QSVT-based approach is preferred for performance reasons, with explicit QPE used only when the application specifically requires classical phase output.
Exercises
1. QPE for chemistry to chemical accuracy
A molecular Hamiltonian energy needs to be estimated to chemical accuracy ( Hartree). The Hamiltonian is given as with Hartree. Compute the QPE ancilla count and total queries.
Show answer
Phase-to-energy conversion: phase = energy × time / . To resolve energy to Hartree at time : phase precision , so ancilla qubits. Total queries: . Each query is a controlled application of . With LCU-based simulation (tutorial 59), each costs gate-equivalents. Total QPE cost: gate-equivalents per energy estimate. For each chemistry molecule’s ground-state energy at chemical accuracy.
2. Heisenberg limit at the application level
A “Heisenberg-limited” sensor (e.g., NV-center magnetometry) requires measurements to achieve precision . A “shot-noise-limited” sensor requires measurements. What is the gain from Heisenberg-limited sensing?
Show answer
For : shot-noise-limited sensor needs measurements; Heisenberg-limited sensor needs . Six orders of magnitude difference. The Heisenberg limit is the fundamental quantum-mechanical limit on phase estimation precision; saturating it gives the maximum possible advantage over classical sensing. QPE is the algorithmic embodiment of Heisenberg-limited estimation in computer-style settings. For physical sensors using entangled states, the Heisenberg limit gives the fundamental advantage of quantum sensing over classical.
3. Iterative QPE qubit savings
For a 20-bit phase estimation, compare ancilla qubit cost between standard QPE and iterative QPE.
Show answer
Standard QPE: 20 ancilla qubits. Iterative QPE: 1 ancilla qubit. A factor of 20 reduction in qubit count. Both use controlled- queries total. For NISQ-era phase-estimation experiments where ancilla qubits are scarce, IPE is dramatically more practical. For fault-tolerant computation where ancilla qubits are cheaper (a fraction of the total qubit count), standard QPE is often preferred for the parallel-execution structure.
4. When to use QSVT instead of QPE
You need to determine whether a Hamiltonian’s ground-state energy is below a threshold to accuracy . Compare QPE and QSVT-based approaches.
Show answer
QPE approach: estimate the energy with 14-bit precision (, queries), compare to threshold. QSVT approach: implement a polynomial that thresholds at with resolution . The QSVT polynomial degree is for typical , so block-encoding queries. For threshold-only questions, QSVT’s matches QPE’s with similar gate-count scaling. Specific constants vary; for some tasks QSVT wins, for others QPE wins. The structural advantage of QSVT is in acting on the phase without measuring it, which is a different application class.
Where this goes next
This concludes the four-tutorial algorithms-track final-deepening (57-60). The track now has 13 tutorials covering: simple algorithms (8-12), block encoding (29), QSVT (30), Hamiltonian simulation (31), amplitude estimation (32), quantum walks (57), HHL (58), LCU (59), and phase estimation precision (60). This is comprehensive coverage of the modern quantum-algorithm toolkit. Future tutorials in this track may dig into specific applications (quantum optimization beyond QAOA, adiabatic algorithms, post-Trotter simulation methods) or specialized techniques (quantum signal processing in detail, randomized algorithms, fast-forwarding tricks).