Case Study: Choosing Between Standard and Iterative Phase Estimation

Executive Summary

A team needs 10 bits of precision on an eigenphase. Standard QPE requires 10 counting qubits plus the eigenstate register. Their device has 12 qubits total and the eigenstate needs 6, leaving 6 for counting — four bits short.

Iterative phase estimation solves this with one ancilla qubit reused ten times, at the cost of requiring mid-circuit measurement, reset, and classical feed-forward. This case study works the trade in both directions and shows that the choice is not merely about qubit count: the two variants fail differently under noise, and that determines which one you should actually run.

Skills applied

  • Implementing standard and iterative QPE (§16.6, §16.11).
  • Trading circuit width against measurement and feed-forward requirements.
  • Analyzing how each variant degrades under decoherence.
  • Selecting a variant from hardware capabilities rather than from qubit count alone.

Phase 1: Standard QPE

from qiskit import QuantumCircuit
import numpy as np

def standard_qpe(t, n_sys, controlled_U_powers, prep_eigenstate):
    qc = QuantumCircuit(t + n_sys, t)
    qc.compose(prep_eigenstate, qubits=range(t, t + n_sys), inplace=True)
    qc.h(range(t))
    for j in range(t):
        qc.compose(controlled_U_powers[j], qubits=[j] + list(range(t, t + n_sys)),
                   inplace=True)                       # controlled-U^(2^j)
    qc.compose(inverse_qft(t), qubits=range(t), inplace=True)
    qc.measure(range(t), range(t))
    return qc
Resource Cost
Qubits $t + n_{\text{sys}} = 10 + 6 = 16$
Applications of $U$ $2^{10} - 1 = 1{,}023$
Depth $O(2^t)$
Mid-circuit measurement Not required

Verdict: does not fit. 16 qubits on a 12-qubit device.

Phase 2: Iterative QPE

The key insight: the bits of $\varphi$ can be extracted one at a time, least significant first, with each measured bit used to correct the phase reference for the next.

def iterative_qpe(t, n_sys, controlled_U_powers, prep_eigenstate, backend):
    bits = []
    for j in reversed(range(t)):              # least significant first
        qc = QuantumCircuit(1 + n_sys, 1)
        qc.compose(prep_eigenstate, qubits=range(1, 1 + n_sys), inplace=True)
        qc.h(0)
        qc.compose(controlled_U_powers[j], qubits=[0] + list(range(1, 1 + n_sys)),
                   inplace=True)
        # feed-forward: undo the contribution of already-known lower bits
        angle = -2 * np.pi * sum(b * 2**(-(k + 2)) for k, b in enumerate(bits))
        qc.p(angle, 0)
        qc.h(0)
        qc.measure(0, 0)
        bits.insert(0, most_common_outcome(backend, qc))
    return sum(b * 2**-(i + 1) for i, b in enumerate(bits))
Resource Cost
Qubits $1 + n_{\text{sys}} = 7$
Applications of $U$ $2^{10} - 1 = 1{,}023$ — identical
Depth per circuit $O(2^j)$ for round $j$
Mid-circuit measurement Required (or separate jobs)

Verdict: fits comfortably. 7 qubits of 12, with room to spare.

Note what did not change. Both variants apply $U$ exactly $2^t - 1$ times. Iterative QPE saves width, never $U$ applications — the Heisenberg-limited cost is a property of the estimation problem, not of the circuit layout.

Phase 3: The noise comparison — where the real difference lies

Qubit count made the decision here, but on a larger device the deciding factor is usually noise behaviour, and the two variants differ sharply.

Standard QPE runs all $2^t - 1$ applications of $U$ in one coherent circuit. Total duration is the sum of all rounds, and the counting register must stay coherent throughout. Fidelity is roughly $(1-\epsilon)^{G_{\text{total}}}$ across the whole thing — a single long exposure.

Iterative QPE runs $t$ separate circuits, the longest of which contains $2^{t-1}$ applications. Each circuit is independently prepared and measured, so decoherence does not accumulate across rounds. The longest single circuit is roughly half the total work.

The consequence is subtle and important: iterative QPE's error is dominated by its longest round, not by the total. And errors in low-significance bits are cheap — they perturb the estimate slightly — while errors in the most significant bit (which is measured last, in the shallowest circuit) are catastrophic but occur in the least noisy round.

Finding. Iterative QPE has a favourable error hierarchy: the bits that matter most are measured in the shallowest circuits. Standard QPE exposes every bit to the full circuit depth equally.

Against this, iterative QPE requires mid-circuit measurement, active reset, and low-latency classical feed-forward — capabilities that not all hardware has, and whose latency adds idle time during which the system register dephases.

Phase 4: The decision matrix

Condition Choose
Qubits are scarce Iterative
No mid-circuit measurement available Standard
Feed-forward latency is large relative to $T_2$ of the system register Standard
Deep circuits are the binding constraint Iterative
You want a single-shot, single-job result Standard
Total $U$ applications are the binding cost Either — they are equal

For this team: iterative, because qubit count is decisive and their backend supports dynamic circuits.

A middle path worth knowing: if $t$ counting qubits are unavailable but feed-forward is also unavailable, split the difference — run standard QPE with $t' < t$ counting qubits to get the leading bits, then refine with a second, offset run. This is "semiclassical" or windowed QPE, and it needs neither many qubits nor feed-forward, at the cost of more total $U$ applications.

Phase 5: A verification you should always run

Both variants have the same failure mode: if the input state is not an eigenstate, the output is an eigenphase sampled by overlap, not an error. A run that returns a confident, precise, wrong answer looks identical to a correct one.

The check: repeat the estimation and histogram the results. A true eigenstate gives a sharply peaked distribution at one value. A superposition gives multiple peaks whose weights are the squared overlaps — which is itself useful information, since it tells you what your state-preparation circuit actually produced.

estimates = [iterative_qpe(...) for _ in range(200)]
plt.hist(estimates, bins=64)   # one peak = eigenstate; several = superposition

Skipping this step is how teams end up reporting an excited-state energy as a ground-state energy.

Discussion Questions

  1. Both variants apply $U$ exactly $2^t-1$ times. Why is that count irreducible?
  2. Iterative QPE measures the most significant bit last, in the shallowest circuit. Explain why that ordering is fortunate.
  3. Feed-forward latency causes the system register to idle. Under what conditions does that erase iterative QPE's advantage?
  4. A histogram of repeated estimates shows two peaks at 0.31 and 0.47 with weights 0.7 and 0.3. What does that tell you, and what would you do next?

Your Turn: Extensions

  • Implement both variants for $U = S$ (eigenphase 1/4) and confirm both return $0.010$ in binary.
  • Scale $t$ from 3 to 8 and compare fidelity of both variants under a depolarizing noise model.
  • Add feed-forward latency as an idle delay and find where iterative loses its advantage.
  • Implement the semiclassical middle path and compare its $U$ count against both.

Key Takeaways

  • Iterative QPE reuses one ancilla to reach the same precision, trading width for mid-circuit measurement and feed-forward.
  • Neither variant reduces applications of $U$: $2^t - 1$ is set by the Heisenberg limit, not by circuit design.
  • Iterative QPE's errors are bounded by its longest single round rather than the total, and its most significant bit is measured in the shallowest circuit.
  • The choice depends on hardware capability — dynamic circuits and feed-forward latency — more than on qubit count alone.
  • Always histogram repeated estimates: a non-eigenstate input yields a confident wrong answer that is otherwise indistinguishable from success.