Skip to main content
Sandbox Physics

Q046 · Phase clocks / finite precision

Quantum Phase Estimation

In quantum phase estimation, how much more evolution does each extra bit of precision need? Twice as much. Each extra counting qubit doubles the longest controlled evolution. The inverse Fourier transform then piles the probability onto the phase bin nearest the true value; a phase that falls between bins still spreads over a few neighboring answers.

Set the phase on a clock, choose the size of the counting register and watch controlled evolutions write a pattern of phases onto it. The inverse Fourier transform turns that pattern into a number you can measure. Collect a histogram, then compare the precision you get with the total evolution it costs.

Interactive modelQuantum Phase Estimation
Phase grid spacing (turns)—\text{—}
Unit evolutions per trial—\text{—}
Evidence and query counts

Simulated measurement record

Numbers from repeated readout

Acquire a record to begin.

Colored bars and points come from records; thin gray marks are the model with the configured errors. Whiskers are pointwise 95% Wilson intervals for output or success fractions. They are not phase confidence intervals, simultaneous bands or guarantees after optional stopping.

Most frequent phase bin in the current records

—\text{—}

Trials at current bit depth

—\text{—}

All recorded unit evolutions

—\text{—}

The modal bin uses counts only. More samples stabilize frequencies but do not change the register grid. A bias cannot be distinguished from the eigenphase without separate calibration; a two-eigenstate input can produce two peaks.

Recomputed from the exported trials
BitsTrialsModal integer(s)Unit evolutions
Latest 12 trials; CSV retains all trials
TrialSettingReported bitsIntegerCircuit queries

Physics tutorial

From phase patterns to measured integers

BackgroundA phase repeats after every full turn. Controlled evolution turns an eigenphase into a relative phase on a counting register, where interference can reveal it. Here the unitary is a given diagonal matrix with two orthogonal eigenstates.

Why it mattersA histogram shows the finite precision directly. Comparing different numbers of counting bits also shows how much longer the coherent evolution gets inside the higher controlled powers.

Start with the essentials

Focus question
Does doubling the number of bins require only one more elementary evolution?
One-sentence intuition
Each extra counting bit doubles the longest controlled evolution. Fourier interference piles up probability in the bins near the phase, but a phase that falls between bins still gives several possible answers.

Core mathematical model

The unitary and the input state

U=diag⁡(e2πiθ0,e2πiθ1),∣ψ⟩=w∣0⟩+1−w∣1⟩U=\operatorname{diag}(e^{2\pi i\theta_0},e^{2\pi i\theta_1}),\quad |\psi\rangle=\sqrt w|0\rangle+\sqrt{1-w}|1\rangle

The two input amplitudes are coherent. Measuring only the counting register cannot tell this superposition apart from an incoherent mixture with the same weights.

Controlled powers

∣x⟩∣j⟩⟼e2πix(θj+δ)∣x⟩∣j⟩|x\rangle|j\rangle\longmapsto e^{2\pi ix(\theta_j+\delta)}|x\rangle|j\rangle

The integer labels the counting basis state. The same bias is added for every unit evolution, so a higher controlled power multiplies it.

Inverse Fourier amplitude

ay(θ)=1L∑x=0L−1e2πix(θ−y/L),L=2ma_y(\theta)=\frac{1}{L}\sum_{x=0}^{L-1}e^{2\pi ix(\theta-y/L)},\quad L=2^m

An exact finite Fourier transform is applied to each target branch. In the circuit diagram the controls are counted from the least significant bit, while output strings print the most significant bit first.

Trace out the target

P(y)=w∣ay(θ0+δ)∣2+(1−w)∣ay(θ1+δ)∣2P(y)=w|a_y(\theta_0+\delta)|^2+(1-w)|a_y(\theta_1+\delta)|^2

The target states are orthogonal and their register is not measured, so the cross terms vanish. Two peaks come from two separate phases, not from a single phase in between.

Resolution and total evolution

Δθ=2−m,CU=∑j=0m−12j=2m−1\Delta\theta=2^{-m},\qquad C_U=\sum_{j=0}^{m-1}2^j=2^m-1

This count treats the unitary as a black box and adds up how many times the unit evolution is repeated. A compiled gate for a high power may cost a different amount, and nothing here estimates hardware time.

Estimate from the most frequent outcome

y^∈arg max⁡yNy,θ^=y^/2m\widehat y\in\operatorname*{arg\,max}_y N_y,\quad\widehat\theta=\widehat y/2^m

The most frequent bin is found from the reported outcomes alone, and ties stay tied. This is not a maximum-likelihood fit of a continuous phase, and it gives no confidence interval for the phase.

Common difficulties

The clocks are not spinning particles

Typical misconceptionThe clock hands show qubits physically spinning.

Better mental modelThe hands show phases in a mathematical picture. Each row is an operation, not a path through space.

Phase wraps around

Typical misconceptionA phase of zero and a phase of one full turn are far apart.

Better mental modelThey give the same eigenvalue. When the phase is near this boundary, probability can show up in both the last bin and the first bin.

Model curve versus samples

Typical misconceptionThe gray model curve is rebuilt from the detector clicks.

Better mental modelThe gray curve comes from the model with the current settings. The colored bars and the most-frequent-bin estimate use only the sampled outcomes. Error bars on the fractions do not set limits on the unknown phase.

Run the experiment

  1. 01

    Land on a grid point

    Acquire Exactly on a bin, with no readout error.

    What to observe: At the default eigenphase every outcome is the same, because the phase has an exact binary representation.
  2. 02

    Move between bins

    Choose Between two bins, then compare 2–6 bits.

    What to observe: The peak narrows as the bins get finer, but the number of unit evolutions grows. More trials with the same number of bits do not make the bins finer.
  3. 03

    Prepare two eigenstates

    Choose Two eigenphases and change the first-state weight.

    What to observe: The heights of the two peaks change. Each measurement samples one eigenphase from the spectrum; it does not return their average.
  4. 04

    Separate precision from bias

    Choose Systematic bias, then increase bit depth.

    What to observe: A narrower distribution can still be centered on the biased phase. Adding bits does not calibrate the unitary.
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy