Skip to main content
Sandbox Physics

Q046 · Phase clocks / finite precision

Quantum Phase Estimation

Turn a phase clock, choose the counting register and watch controlled evolutions write a pattern of phases. The inverse Fourier transform turns that pattern into a measurable number. Acquire a histogram, then compare precision with the evolution budget.

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

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.

Modal phase bin from 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 is periodic. Controlled evolution makes it relative to a counting register, where interference can reveal it. The source here is a declared diagonal unitary with two orthogonal eigenstates.

Why it mattersA histogram makes finite precision visible. Comparing bit depths also exposes the longer coherent evolution hidden inside higher controlled powers.

Start with the essentials

Focus question
Does doubling the number of bins merely require one additional elementary evolution?
One-sentence intuition
Each new counting bit doubles the largest evolution weight. Fourier interference concentrates probability near a phase bin; an off-grid phase still produces several possible answers.

Core mathematical model

Declared unitary and input

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. Counting-only observations cannot distinguish their relative phase 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. A common bias is added per unit evolution and is multiplied by the controlled power.

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. The circuit view counts controls from the least significant bit; 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

Orthogonal target states eliminate cross terms when their register is not observed. A second peak is not a single intermediate phase.

Resolution and evolution budget

Δθ=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

The budget counts repeated unit evolutions under a black-box model. A compiled high-power gate may have another implementation cost; no hardware timing is inferred.

A descriptive count estimate

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

The modal bin is computed only from reported outcomes. Tied modes remain tied. It is not a maximum-likelihood continuous phase fit or a phase confidence interval.

Common difficulties

One clock is not one particle

Typical misconceptionThe hands describe physical spinning qubits.

Better mental modelHands show phases in a mathematical representation. Each row represents an operation, not a trajectory.

Phase wraps

Typical misconceptionThe phases at zero and one turn are far apart.

Better mental modelThey represent the same eigenvalue. Near the boundary, support can occur in both the last and first bins.

Samples versus references

Typical misconceptionThe gray model curve is reconstructed from clicks.

Better mental modelThe gray reference uses the configured model. Colored bars and the modal estimate use only sampled records; errors on fractions do not bound 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: All outcomes agree at the default eigenphase. This is 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 grid refines, while unit-evolution cost grows. More trials at a fixed depth do not create finer bins.
  3. 03

    Prepare two eigenstates

    Choose Two eigenphases and change the first-state weight.

    What to observe: Peak weights change. The result samples the spectrum rather than returning its arithmetic average.
  4. 04

    Separate precision from bias

    Choose Systematic bias, then increase bit depth.

    What to observe: A narrower distribution can be centered on a biased phase. Extra bits do not calibrate the unitary.