GLOBAL KNOWLEDGE ARK

Physics · Article

Quantum algorithms and simulation

Follow a marked amplitude, an unknown phase and a measured energy through explicit circuits. Calculate what appears in a detector, what remains inaccessible, and which resources must be counted before claiming an advantage.

Previous article: Qubits, gates, and quantum circuits

Back to Physics

After reading, you can

  • Derive amplitude amplification as two reflections and predict when another oracle call lowers the success probability.
  • Read an eigenphase from controlled powers and an inverse Fourier transform, including off-grid phases, aliasing and input-state overlap.
  • Construct first- and second-order digital simulations and choose observables that distinguish them.
  • Estimate a variational energy and its sampling uncertainty while keeping model, approximation and hardware errors separate.
  • State an algorithm’s input, output and access assumptions before comparing its resources with a classical method.
01

What must an algorithm deliver?

A quantum algorithm ends with an ordinary observation. It may return the label of a marked object, an interval containing an eigenvalue, or a sample of a spin at time t. These tasks ask for different information and can have very different costs. A circuit that prepares an n-qubit state has manipulated a vector with 2ⁿ amplitudes. Its final computational-basis measurement returns one length-n word. To claim that the circuit has computed something efficiently, specify a procedure for obtaining the requested answer from the samples, together with an accuracy and probability of success.

Suppose a reversible procedure recognizes whether a candidate x satisfies a condition. The Boolean function f(x) equals one for a marked item. A query may be defined as one coherent application of the specified unitary on an input that can be in superposition. A classical comparison under the same unstructured-access promise uses calls that test individual candidate labels. These assumptions make a query comparison meaningful. When a real implementation must build a coherent lookup circuit from an ordinary table, create a state from classical data or move a large output back to storage, those costs belong in an end-to-end comparison.

Interference acts on amplitudes leading to the same recorded outcome. A phase pattern alone changes no computational-basis probabilities. Additional gates bring the paths together and convert their phases into different magnitudes. A record left in a work register can distinguish two paths and prevent the intended interference. Reversing the work computation while retaining the desired phase restores the common work state when the record is still isolated. In a long algorithm, the ability to run a preparation or a predicate coherently in reverse is a concrete resource requirement.

Throughout this lesson one oracle query, one controlled evolution and one measurement shot denote different operations. A controlled evolution for twice as long may cost roughly twice as many primitive gates. A measurement repeated on freshly prepared copies costs preparation time in every shot. An efficiently estimated expectation of a local observable is a narrower output than a full classical description of a many-body state. Writing these distinctions beside a numerical example helps identify the physical reason for a speedup and the circumstances in which it could disappear.

02

Two reflections move probability toward a marked set

Let N = 2ⁿ candidate words include M marked ones. First take 0 < M < N. Denote by |G⟩ the normalized equal superposition of the marked words and by |B⟩ the corresponding unmarked superposition. The uniform input decomposes as |s⟩ = sin θ |G⟩ + cos θ |B⟩, where sin² θ = M/N and 0 < θ < π/2. Each marked word has amplitude 1/√N initially. Measuring immediately succeeds with probability M/N. The important simplification is symmetry within each set. In the ideal search circuit the state stays in the two-dimensional plane spanned by |G⟩ and |B⟩ even when there are many physical qubits.

A marking oracle O flips the sign of every marked amplitude. It leaves each unmarked one unchanged. The second operation is D = 2|s⟩⟨s| − I. If the amplitudes in the computational basis are aₓ and their average is ā, D replaces each aₓ by 2ā − aₓ. This follows by inserting ⟨s|ψ⟩ = √N ā into D|ψ⟩. The average may be complex. Both the oracle and the diffusion step preserve the norm. Their time order is O then D, so the total matrix for one iteration is DO. The first reflection changes phases and the second mixes the amplitudes.

Parametrize a state in this plane by sin α |G⟩ + cos α |B⟩. The oracle takes α to −α. The diffuser reflects about the line at θ and takes the resulting angle to 2θ + α. Beginning at α = θ, r iterations therefore give success probability sin²[(2r + 1)θ]. Choose a nonnegative integer r near π/(4θ) − 1/2 to approach the first peak when M is known. Further iterations can carry the state past it. For a small fraction M/N, θ is approximately √(M/N), so the first useful peak needs order √(N/M) queries. When M = 0 every measured word is unmarked, and when M = N every word is marked from the start. Apply the original operations in these cases without constructing a normalized vector for an empty set.

The same geometry applies to a preparation A with initial good probability p, even if its good component is far from uniform. A reflection about A|0⟩ can use A, a reflection about |0⟩, and A†. The good subspace must have a coherent marking operation. Verification of a measured candidate can be an additional evaluation of the predicate. When p is unknown, a fixed iteration count can overshoot. There are search schedules designed for unknown success probability. The familiar square-root query scaling depends on the coherent operations in this model and on what counts as a query.

Marking changes a sign before diffusion changes the probabilities

Marking changes a sign before diffusion changes the probabilitiesReal amplitude per word. Follow the signed amplitude of each individual word for one marked word among four. Marking changes +1/2 to −1/2, so every word still has probability 1/4 immediately after the query. The mean amplitude is now 1/4. Reflecting about this mean sends the marked amplitude to 1 and each of the other three amplitudes to 0.−0.500.51Real amplitude per wordPreparePrepare. Marked word = 1/2.Prepare. Each unmarked word = 1/2.MarkMark. Marked word = −1/2.Mark. Each unmarked word = 1/2.DiffuseDiffuse. Marked word = 1.Diffuse. Each unmarked word = 0.
  • Marked word
  • Each unmarked word
Follow the signed amplitude of each individual word for one marked word among four. Marking changes +1/2 to −1/2, so every word still has probability 1/4 immediately after the query. The mean amplitude is now 1/4. Reflecting about this mean sends the marked amplitude to 1 and each of the other three amplitudes to 0.
Exact values shown in the plot
Real amplitude per word
CategoryQuantity or frameExact valuePreparation
PrepareMarked word1/2four before query
PrepareEach unmarked word1/2four before query
MarkMarked word−1/2four after query
MarkEach unmarked word1/2four after query
DiffuseMarked word1four after diffusion
DiffuseEach unmarked word0four after diffusion

The best stopping point depends on the initial marked fraction

The best stopping point depends on the initial marked fractionMarked-set probability. The horizontal labels count complete oracle–diffuser iterations, starting at zero. For one marked word among 16, success rises to 63001/65536 at three iterations and drops to about 0.58170 after four. Four marked words have a first peak after one iteration. Each vertical value is the probability of measuring any marked word in a single ideal run.00.250.50.751Marked-set probability00. 1 marked among 16 = 1/16.0. 4 marked among 16 = 1/4.11. 1 marked among 16 = 121/256.1. 4 marked among 16 = 1.22. 1 marked among 16 = 3721/4096.2. 4 marked among 16 = 1/4.33. 1 marked among 16 = 63001/65536.3. 4 marked among 16 = 1/4.44. 1 marked among 16 = 609961/1048576.4. 4 marked among 16 = 1.55. 1 marked among 16 = 2105401/16777216.5. 4 marked among 16 = 1/4.66. 1 marked among 16 = 5470921/268435456.6. 4 marked among 16 = 1/4.77. 1 marked among 16 = 1567288921/4294967296.7. 4 marked among 16 = 1.88. 1 marked among 16 = 57455610601/68719476736.8. 4 marked among 16 = 1/4.
  • 1 marked among 16
  • 4 marked among 16
The horizontal labels count complete oracle–diffuser iterations, starting at zero. For one marked word among 16, success rises to 63001/65536 at three iterations and drops to about 0.58170 after four. Four marked words have a first peak after one iteration. Each vertical value is the probability of measuring any marked word in a single ideal run.
Exact values shown in the plot
Marked-set probability
CategoryQuantity or frameExact valuePreparation
01 marked among 161/16search after 0 iterations
04 marked among 161/4search after 0 iterations
11 marked among 16121/256search after 1 iterations
14 marked among 161search after 1 iterations
21 marked among 163721/4096search after 2 iterations
24 marked among 161/4search after 2 iterations
31 marked among 1663001/65536search after 3 iterations
34 marked among 161/4search after 3 iterations
41 marked among 16609961/1048576search after 4 iterations
44 marked among 161search after 4 iterations
51 marked among 162105401/16777216search after 5 iterations
54 marked among 161/4search after 5 iterations
61 marked among 165470921/268435456search after 6 iterations
64 marked among 161/4search after 6 iterations
71 marked among 161567288921/4294967296search after 7 iterations
74 marked among 161search after 7 iterations
81 marked among 1657455610601/68719476736search after 8 iterations
84 marked among 161/4search after 8 iterations
03

An eigenphase becomes a register of interference fringes

Suppose U|u⟩ = exp(2πiφ)|u⟩, with φ measured in cycles modulo one. Applying U repeatedly to this isolated eigenstate changes only its common phase. A control qubit supplies a reference branch. For a binary register with m qubits let L = 2ᵐ. Prepare a uniform superposition of integers j from 0 to L − 1. Controlled powers of U give each branch Uʲ, leaving the target in |u⟩ and placing the factor exp(2πijφ) on branch j. A register bit of value 2ˡ controls U raised to that power. A single diagrammatic box labeled U to a large power can hide a long coherent experiment.

The inverse discrete Fourier transform adds a factor exp(−2πijk/L) on the path from j to output k. Including the two normalization factors gives A(k) = (1/L) Σⱼ exp[2πij(φ − k/L)]. If φ = k₀/L, all terms for k₀ add in phase. For every other k the equally spaced phase factors sum to zero. An ideal measurement then returns k₀ exactly. If φ is between grid points the sum is a finite geometric series. With Δ = φ − k/L, its probability is P(k) = [sin(πLΔ) / (L sin(πΔ))]². At an integer Δ the expression means its continuous limit one. At a nonzero multiple of 1/L modulo one it is zero.

The distribution is periodic. An eigenphase near one can give some probability to k = 0, because phase one and phase zero are the same point. Increasing m narrows the bin spacing in cycles. If powers are realized by repeated applications of an elementary U, the largest power is 2^(m − 1) and one full coherent circuit uses L − 1 elementary evolutions for its powers. Structure in U can change this cost. Repeating the same m-bit experiment gives better statistics for its fixed distribution. Increasing coherent evolution time supplies additional phase resolution under a stable model. The two choices make different demands on a device.

For components with distinct eigenphases, the controlled evolution generally correlates the Fourier register with the target. If every populated eigenvector has the same eigenphase, the register factors from the unchanged target superposition. Ignoring the target gives a mixture of phase distributions weighted by the input populations in the eigenspaces. Degenerate eigenvectors with equal phase contribute to the same phase outcome. Thus a circuit cannot guarantee observation of a desired eigenphase when preparation has negligible overlap with that eigenspace. For U = exp(−iHτ/ℏ) the measured phase obeys φ = −Eτ/(2πℏ) modulo one. Turning the measured value into an energy requires the known evolution time τ and enough prior information to select an energy branch separated from its aliases by 2πℏ/τ.

The Fourier peaks wrap from bin seven back to bin zero

The Fourier peaks wrap from bin seven back to bin zeroFourier-bin probability. The three-bit register returns k = 0 through 7, with phase labels k/8 cycles. At φ = 7/16 the two nearest bins are 3 and 4. Shifting the phase to 15/16 moves the pair to 7 and 0. Each member of either pair has probability 1/[64 sin²(π/16)] ≈ 0.41053. The smaller side probabilities complete the distribution. A circular phase interval joins the last and first bins.00.10.20.30.4Fourier-bin probability00. φ = 7/16 cycle = 1 / [64 sin²(π × 7/16)] ≈ 0.01624322078.0. φ = 15/16 cycle = 1 / [64 sin²(π × 15/16)] ≈ 0.4105334745.11. φ = 7/16 cycle = 1 / [64 sin²(π × 5/16)] ≈ 0.02260097957.1. φ = 15/16 cycle = 1 / [64 sin²(π × 13/16)] ≈ 0.05062232514.22. φ = 7/16 cycle = 1 / [64 sin²(π × 3/16)] ≈ 0.05062232514.2. φ = 15/16 cycle = 1 / [64 sin²(π × 11/16)] ≈ 0.02260097957.33. φ = 7/16 cycle = 1 / [64 sin²(π × 1/16)] ≈ 0.4105334745.3. φ = 15/16 cycle = 1 / [64 sin²(π × 9/16)] ≈ 0.01624322078.44. φ = 7/16 cycle = 1 / [64 sin²(π × −1/16)] ≈ 0.4105334745.4. φ = 15/16 cycle = 1 / [64 sin²(π × 7/16)] ≈ 0.01624322078.55. φ = 7/16 cycle = 1 / [64 sin²(π × −3/16)] ≈ 0.05062232514.5. φ = 15/16 cycle = 1 / [64 sin²(π × 5/16)] ≈ 0.02260097957.66. φ = 7/16 cycle = 1 / [64 sin²(π × −5/16)] ≈ 0.02260097957.6. φ = 15/16 cycle = 1 / [64 sin²(π × 3/16)] ≈ 0.05062232514.77. φ = 7/16 cycle = 1 / [64 sin²(π × −7/16)] ≈ 0.01624322078.7. φ = 15/16 cycle = 1 / [64 sin²(π × 1/16)] ≈ 0.4105334745.
  • φ = 7/16 cycle
  • φ = 15/16 cycle
The three-bit register returns k = 0 through 7, with phase labels k/8 cycles. At φ = 7/16 the two nearest bins are 3 and 4. Shifting the phase to 15/16 moves the pair to 7 and 0. Each member of either pair has probability 1/[64 sin²(π/16)] ≈ 0.41053. The smaller side probabilities complete the distribution. A circular phase interval joins the last and first bins.
Exact values shown in the plot
Fourier-bin probability
CategoryQuantity or frameExact valuePreparation
0φ = 7/16 cycle1 / [64 sin²(π × 7/16)] ≈ 0.01624322078fourier bin 0
0φ = 15/16 cycle1 / [64 sin²(π × 15/16)] ≈ 0.4105334745fourier bin 0
1φ = 7/16 cycle1 / [64 sin²(π × 5/16)] ≈ 0.02260097957fourier bin 1
1φ = 15/16 cycle1 / [64 sin²(π × 13/16)] ≈ 0.05062232514fourier bin 1
2φ = 7/16 cycle1 / [64 sin²(π × 3/16)] ≈ 0.05062232514fourier bin 2
2φ = 15/16 cycle1 / [64 sin²(π × 11/16)] ≈ 0.02260097957fourier bin 2
3φ = 7/16 cycle1 / [64 sin²(π × 1/16)] ≈ 0.4105334745fourier bin 3
3φ = 15/16 cycle1 / [64 sin²(π × 9/16)] ≈ 0.01624322078fourier bin 3
4φ = 7/16 cycle1 / [64 sin²(π × −1/16)] ≈ 0.4105334745fourier bin 4
4φ = 15/16 cycle1 / [64 sin²(π × 7/16)] ≈ 0.01624322078fourier bin 4
5φ = 7/16 cycle1 / [64 sin²(π × −3/16)] ≈ 0.05062232514fourier bin 5
5φ = 15/16 cycle1 / [64 sin²(π × 5/16)] ≈ 0.02260097957fourier bin 5
6φ = 7/16 cycle1 / [64 sin²(π × −5/16)] ≈ 0.02260097957fourier bin 6
6φ = 15/16 cycle1 / [64 sin²(π × 3/16)] ≈ 0.05062232514fourier bin 6
7φ = 7/16 cycle1 / [64 sin²(π × −7/16)] ≈ 0.01624322078fourier bin 7
7φ = 15/16 cycle1 / [64 sin²(π × 1/16)] ≈ 0.4105334745fourier bin 7

The register measures populations of distinct eigenphases

The register measures populations of distinct eigenphasesRegister probability. The two plotted outputs correspond to exact phases 3/8 and 1/2. A single 3/8 eigenstate gives bin 3 with certainty. Two components with distinct phases and populations 3/4 and 1/4 give the same two readout probabilities. If their phases coincide at 3/8, both contribute to bin 3 and the target superposition factors from the register. All other bins have zero probability for these preparations.00.250.50.751Register probabilitySingleSingle. Bin 3 (011) = 1.Single. Bin 4 (100) = 0.DistinctDistinct. Bin 3 (011) = 3/4.Distinct. Bin 4 (100) = 1/4.EqualEqual. Bin 3 (011) = 1.Equal. Bin 4 (100) = 0.
  • Bin 3 (011)
  • Bin 4 (100)
The two plotted outputs correspond to exact phases 3/8 and 1/2. A single 3/8 eigenstate gives bin 3 with certainty. Two components with distinct phases and populations 3/4 and 1/4 give the same two readout probabilities. If their phases coincide at 3/8, both contribute to bin 3 and the target superposition factors from the register. All other bins have zero probability for these preparations.
Exact values shown in the plot
Register probability
CategoryQuantity or frameExact valuePreparation
SingleBin 3 (011)1one phase eigenstate
SingleBin 4 (100)0one phase eigenstate
DistinctBin 3 (011)3/4distinct phase sectors
DistinctBin 4 (100)1/4distinct phase sectors
EqualBin 3 (011)1equal phase sectors
EqualBin 4 (100)0equal phase sectors

Changing the interrogation time can separate two energy aliases

Changing the interrogation time can separate two energy aliasesEigenphase (cycles). The vertical coordinate is the underlying eigenphase in cycles, φ = −(E/h)τ modulo one. At 2 μs both candidate energies give 3/8. At 1 μs their phases are 3/16 and 11/16, whereas at 4 μs both give 3/4. The plotted phases are continuous quantities. The case tables describe the resulting three-bit register outcomes.00.250.50.751Eigenphase (cycles)1 μs1 μs. E/h = −187.5 kHz = 3/16 cycle.1 μs. E/h = 312.5 kHz = 11/16 cycle.2 μs2 μs. E/h = −187.5 kHz = 3/8 cycle.2 μs. E/h = 312.5 kHz = 3/8 cycle.4 μs4 μs. E/h = −187.5 kHz = 3/4 cycle.4 μs. E/h = 312.5 kHz = 3/4 cycle.
  • E/h = −187.5 kHz
  • E/h = 312.5 kHz
The vertical coordinate is the underlying eigenphase in cycles, φ = −(E/h)τ modulo one. At 2 μs both candidate energies give 3/8. At 1 μs their phases are 3/16 and 11/16, whereas at 4 μs both give 3/4. The plotted phases are continuous quantities. The case tables describe the resulting three-bit register outcomes.
Exact values shown in the plot
Eigenphase (cycles)
CategoryQuantity or frameExact valuePreparation
1 μsE/h = −187.5 kHz3/16 cycleenergy alias 1 microseconds
1 μsE/h = 312.5 kHz11/16 cycleenergy alias 1 microseconds
2 μsE/h = −187.5 kHz3/8 cycleenergy alias 2 microseconds
2 μsE/h = 312.5 kHz3/8 cycleenergy alias 2 microseconds
4 μsE/h = −187.5 kHz3/4 cycleenergy alias 4 microseconds
4 μsE/h = 312.5 kHz3/4 cycleenergy alias 4 microseconds
04

Replace a single hard evolution by short accessible ones

To simulate a system, first specify what represents its states and operators on the processor. An analogue simulator engineers a physical Hamiltonian whose dynamics represent the model. A digital simulator composes elementary gates to approximate the unitary generated by a target Hamiltonian. Suppose H = A + B and that evolution under A and B separately is available. If the operators commute, the two exponentials for time t multiply to the exact combined evolution. When they fail to commute, one can divide t into r slices of width Δt = t/r and apply the two short evolutions in each slice. Local interactions in a many-body Hamiltonian make such a decomposition physically meaningful.

Expand one exact short evolution and the ordered product in powers of Δt. At first order each contains −i(A + B)Δt/ℏ. At second order the exact cross term is proportional to (AB + BA)/2. A product that applies A first and then B instead contains BA. Their difference at this order is a commutator term. For bounded generators and fixed t, a first-order product has local error of order Δt² and a typical guaranteed global bound of order t²/r times a suitable commutator norm divided by ℏ². A commuting pair makes that term vanish. A bound on an operator norm and a particular observed population error need not be numerically close.

A time-symmetric slice applies B for half a slice, A for a full slice, and B for half a slice. Here these are factors of the target time in each term, and the processor pulse durations may differ from the simulated time. Reversing the sign of the step produces the inverse slice. This symmetry cancels the leading commutator error in the generator of a slice. For bounded terms the local error is of order Δt³ and the fixed-time global error is of order 1/r², with constants set by nested commutators and the total time. Adjacent half-steps about the same axis can combine. These formulas require accurately implemented, coherent component evolutions and remain subject to noise. Ancilla-controlled evolution is needed if a larger protocol, such as phase estimation, explicitly conditions the simulation on a control wire.

Take H = ℏ(Ωx X + Ωz Z)/2 and prepare a Z-up qubit. Ωx and Ωz are angular frequencies in radians per second. Write the dimensionless pulse areas a = Ωxt and b = Ωzt. The exact Bloch rotation has angle √(a² + b²) around a direction proportional to (a,0,b). The two elementary evolutions are Rx(a/r) and Rz(b/r). A positive x rotation of a Z-up state initially tips the Bloch vector toward negative Y, fixing a sign that a Z population cannot reveal. The same one-qubit example can therefore check time ordering, an approximation formula and which measurement actually distinguishes them.

Two pulse orders shift the Y expectation in opposite directions

Two pulse orders shift the Y expectation in opposite directionsSigned error in ⟨Y⟩. At fixed simulated time, increase the number r of slices. The signed difference is the approximate Y expectation minus the exact value −0.8 sin(1) ≈ −0.673177. For r = 1 the first-order and symmetric formulas give +0.08112 and −0.01214 on this scale. Both give the same Z excitation probability, about 0.151647. A Y analyser reveals their different phases.−0.0100.020.040.060.08Signed error in ⟨Y⟩11. First order = ⟨Y⟩approx − ⟨Y⟩exact ≈ 0.08111725745.1. Symmetric = ⟨Y⟩approx − ⟨Y⟩exact ≈ −0.01213966149.22. First order = ⟨Y⟩approx − ⟨Y⟩exact ≈ 0.03717341551.2. Symmetric = ⟨Y⟩approx − ⟨Y⟩exact ≈ −0.003086743873.44. First order = ⟨Y⟩approx − ⟨Y⟩exact ≈ 0.01761542805.4. Symmetric = ⟨Y⟩approx − ⟨Y⟩exact ≈ −0.0007746852846.88. First order = ⟨Y⟩approx − ⟨Y⟩exact ≈ 0.008547422712.8. Symmetric = ⟨Y⟩approx − ⟨Y⟩exact ≈ −0.0001938551117.1616. First order = ⟨Y⟩approx − ⟨Y⟩exact ≈ 0.004206305197.16. Symmetric = ⟨Y⟩approx − ⟨Y⟩exact ≈ −4.847520786e−05.3232. First order = ⟨Y⟩approx − ⟨Y⟩exact ≈ 0.00208599893.32. Symmetric = ⟨Y⟩approx − ⟨Y⟩exact ≈ −1.211951545e−05.
  • First order
  • Symmetric
At fixed simulated time, increase the number r of slices. The signed difference is the approximate Y expectation minus the exact value −0.8 sin(1) ≈ −0.673177. For r = 1 the first-order and symmetric formulas give +0.08112 and −0.01214 on this scale. Both give the same Z excitation probability, about 0.151647. A Y analyser reveals their different phases.
Exact values shown in the plot
Signed error in ⟨Y⟩
CategoryQuantity or frameExact valuePreparation
1First order⟨Y⟩approx − ⟨Y⟩exact ≈ 0.08111725745read y after 1 slices
1Symmetric⟨Y⟩approx − ⟨Y⟩exact ≈ −0.01213966149read y after 1 slices
2First order⟨Y⟩approx − ⟨Y⟩exact ≈ 0.03717341551read y after 2 slices
2Symmetric⟨Y⟩approx − ⟨Y⟩exact ≈ −0.003086743873read y after 2 slices
4First order⟨Y⟩approx − ⟨Y⟩exact ≈ 0.01761542805read y after 4 slices
4Symmetric⟨Y⟩approx − ⟨Y⟩exact ≈ −0.0007746852846read y after 4 slices
8First order⟨Y⟩approx − ⟨Y⟩exact ≈ 0.008547422712read y after 8 slices
8Symmetric⟨Y⟩approx − ⟨Y⟩exact ≈ −0.0001938551117read y after 8 slices
16First order⟨Y⟩approx − ⟨Y⟩exact ≈ 0.004206305197read y after 16 slices
16Symmetric⟨Y⟩approx − ⟨Y⟩exact ≈ −4.847520786e−05read y after 16 slices
32First order⟨Y⟩approx − ⟨Y⟩exact ≈ 0.00208599893read y after 32 slices
32Symmetric⟨Y⟩approx − ⟨Y⟩exact ≈ −1.211951545e−05read y after 32 slices
05

Measure a trial energy one term at a time

An alternative to long coherent phase estimation uses the variational principle. For a normalized state expanded in eigenstates of H, its energy expectation is a weighted mean of the eigenvalues. Therefore ⟨H⟩ is at least the lowest eigenvalue. The argument also applies to any normalized physical density matrix. Prepare a family of trial states parameterized by controllable angles, estimate the expectation for each, and let a classical optimizer choose the next parameters. The smallest exact trial expectation gives an upper bound to the true ground energy. A limited family can miss the ground state entirely.

Many observables are represented as sums H = Σⱼ hⱼPⱼ of Pauli products Pⱼ. Linearity gives ⟨H⟩ = Σⱼ hⱼ⟨Pⱼ⟩ even when the Pⱼ do not commute. Estimate different incompatible observables on independently prepared copies of the same trial state. If the measurement settings are independent and Nⱼ shots are used for term j, the variance of the energy estimate from sampling is Σⱼ hⱼ²[1 − ⟨Pⱼ⟩²]/Nⱼ. Correlations in a jointly measured set require covariance terms. The coefficients carry the energy unit. A Hamiltonian sign error biases an energy estimate even if each individual detector functions perfectly.

For an explicit example let K = E₀(3Z + 4X)/5 with E₀ > 0. Since X and Z anticommute, (K/E₀)² = I and its eigenvalues are ±1. A trial state Rᵧ(θ)|0⟩ has X expectation sin θ and Z expectation cos θ. Thus E(θ)/E₀ = [3 cos θ + 4 sin θ]/5. At sin θ = −4/5 and cos θ = −3/5 the Bloch vector points opposite the Hamiltonian axis and gives the ground energy −E₀. Starting at θ = 0 gives +0.6 E₀. Scanning just the eight multiples of 45° tests a discrete trial set and can leave a positive variational error even on ideal hardware.

Sampling a noncommuting sum can give an estimate below the known ground energy in a finite run. At the exact ground state the separate X and Z results still fluctuate, although an ideal direct projective measurement of K would give −E₀ every time. Reusing a downward statistical fluctuation to select the best of many trial angles also biases the reported minimum. An independent final measurement of the selected state can assess that selection effect. Calibration bias, finite shots, imperfect trial preparation and a restricted choice of trial states enter a claim by different routes.

A coarse angle scan misses the exact ground direction

A coarse angle scan misses the exact ground directionEnergy / E₀. Read each category as a separate trial setting. Circles give [3 cos θ + 4 sin θ]/5 and squares mark the exact ground value −1, both in units of E₀. The best of the eight multiples of 45° is 225°, at −7/(5√2) ≈ −0.98995. The added θg category, about 233.13°, reaches −1. Equal spacing on the page denotes categories.−1−0.500.51Energy / E₀0°0°. Trial-state mean = 3/5.0°. Ground-energy bound = −1.45°45°. Trial-state mean = 7/(5√2).45°. Ground-energy bound = −1.90°90°. Trial-state mean = 4/5.90°. Ground-energy bound = −1.135°135°. Trial-state mean = 1/(5√2).135°. Ground-energy bound = −1.180°180°. Trial-state mean = −3/5.180°. Ground-energy bound = −1.225°225°. Trial-state mean = −7/(5√2).225°. Ground-energy bound = −1.θgθg. Trial-state mean = −1.θg. Ground-energy bound = −1.270°270°. Trial-state mean = −4/5.270°. Ground-energy bound = −1.315°315°. Trial-state mean = −1/(5√2).315°. Ground-energy bound = −1.
  • Trial-state mean
  • Ground-energy bound
Read each category as a separate trial setting. Circles give [3 cos θ + 4 sin θ]/5 and squares mark the exact ground value −1, both in units of E₀. The best of the eight multiples of 45° is 225°, at −7/(5√2) ≈ −0.98995. The added θg category, about 233.13°, reaches −1. Equal spacing on the page denotes categories.
Exact values shown in the plot
Energy / E₀
CategoryQuantity or frameExact valuePreparation
0°Trial-state mean3/5trial energy 0
0°Ground-energy bound−1trial energy 0
45°Trial-state mean7/(5√2)trial energy 45
45°Ground-energy bound−1trial energy 45
90°Trial-state mean4/5trial energy 90
90°Ground-energy bound−1trial energy 90
135°Trial-state mean1/(5√2)trial energy 135
135°Ground-energy bound−1trial energy 135
180°Trial-state mean−3/5trial energy 180
180°Ground-energy bound−1trial energy 180
225°Trial-state mean−7/(5√2)trial energy 225
225°Ground-energy bound−1trial energy 225
θgTrial-state mean−1trial energy ground
θgGround-energy bound−1trial energy ground
270°Trial-state mean−4/5trial energy 270
270°Ground-energy bound−1trial energy 270
315°Trial-state mean−1/(5√2)trial energy 315
315°Ground-energy bound−1trial energy 315

A ground state can still give a noisy sum of separate Pauli measurements

A ground state can still give a noisy sum of separate Pauli measurementsTerm spread / E₀. Each mark gives one weighted term’s contribution to the standard deviation, expressed in units of E₀. At the ground direction θg each contributes 0.024 E₀. The standard deviation of the sum is √(0.024² + 0.024²) E₀ ≈ 0.03394 E₀ for 400 independent shots per setting. An ideal measurement directly in the energy eigenbasis would have zero spread on this state.00.010.020.030.04Term spread / E₀0°0°. Standard deviation of weighted X sample mean / E₀ = (4/5)√[(1 − ⟨X⟩²)/400] ≈ 0.04.0°. Standard deviation of weighted Z sample mean / E₀ = (3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0.90°90°. Standard deviation of weighted X sample mean / E₀ = (4/5)√[(1 − ⟨X⟩²)/400] ≈ 0.90°. Standard deviation of weighted Z sample mean / E₀ = (3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0.03.225°225°. Standard deviation of weighted X sample mean / E₀ = (4/5)√[(1 − ⟨X⟩²)/400] ≈ 0.02828427125.225°. Standard deviation of weighted Z sample mean / E₀ = (3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0.02121320344.θgθg. Standard deviation of weighted X sample mean / E₀ = (4/5)√[(1 − ⟨X⟩²)/400] ≈ 0.024.θg. Standard deviation of weighted Z sample mean / E₀ = (3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0.024.
  • Standard deviation of weighted X sample mean / E₀
  • Standard deviation of weighted Z sample mean / E₀
Each mark gives one weighted term’s contribution to the standard deviation, expressed in units of E₀. At the ground direction θg each contributes 0.024 E₀. The standard deviation of the sum is √(0.024² + 0.024²) E₀ ≈ 0.03394 E₀ for 400 independent shots per setting. An ideal measurement directly in the energy eigenbasis would have zero spread on this state.
Exact values shown in the plot
Term spread / E₀
CategoryQuantity or frameExact valuePreparation
0°Standard deviation of weighted X sample mean / E₀(4/5)√[(1 − ⟨X⟩²)/400] ≈ 0.04sampling components 0
0°Standard deviation of weighted Z sample mean / E₀(3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0sampling components 0
90°Standard deviation of weighted X sample mean / E₀(4/5)√[(1 − ⟨X⟩²)/400] ≈ 0sampling components 90
90°Standard deviation of weighted Z sample mean / E₀(3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0.03sampling components 90
225°Standard deviation of weighted X sample mean / E₀(4/5)√[(1 − ⟨X⟩²)/400] ≈ 0.02828427125sampling components 225
225°Standard deviation of weighted Z sample mean / E₀(3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0.02121320344sampling components 225
θgStandard deviation of weighted X sample mean / E₀(4/5)√[(1 − ⟨X⟩²)/400] ≈ 0.024sampling components ground
θgStandard deviation of weighted Z sample mean / E₀(3/5)√[(1 − ⟨Z⟩²)/400] ≈ 0.024sampling components ground
06

Decide what counts as an accurate simulation

Return to the single-qubit evolution with a = 0.8 and b = 0.6. Their resultant angle is exactly one radian. An ideal Z-up state gives excitation probability about 0.147103 and Y expectation about −0.673177. Both one-slice product formulas give excitation probability about 0.151647. For this input a Z rotation before the x pulse changes only a common phase, and a final Z rotation has no effect on a Z detector. The equality of this one-slice population therefore has a simple symmetry explanation. The same two one-slice formulas give Y expectations about −0.592060 and −0.685316. A Y measurement can tell them apart.

A useful accuracy specification states the initial states, the evolution times, the needed observables and acceptable error. If two output pure states have overlap fidelity F, their trace distance is √(1 − F). For any one measurement event their probabilities differ by at most that trace distance. A match in one probability gives no converse guarantee for an arbitrary output state. For a Pauli observable with eigenvalues ±1 the expectation difference can be up to twice that bound. A small exact test system with several noncommuting readout axes can validate the implementation before a larger problem is attempted.

Refining time slices reduces the discretization error only within its regime of validity. On a processor, more slices generally mean more gates and longer coherent control. A coherent systematic rotation can accumulate with depth, while independent shot uncertainty falls only as the inverse square root of the number of repetitions. Vary r at fixed simulated t to study the product-formula error. Vary the number of preparations at fixed r to study sampling. Independent calibration and a tractable classical reference help isolate the part due to control noise. The best measured r for one noisy observable need not be the mathematical optimum in an ideal unitary model.

A method that samples one local spin at one time can answer a physical question without reconstructing a long amplitude vector. It cannot, from that one setting alone, give every many-body correlation or identify which Hamiltonian generated the data. Conversely, a classical baseline may exploit symmetries, weak entanglement, integrability, low-energy structure or limited evolution time. Compare it with the quantum procedure on the same Hamiltonian, input, observable, precision and confidence. An advantage for the query count of one idealized task is compatible with a particular small simulation being easier on a classical computer.

State infidelity compares the full pure output with the exact evolution

State infidelity compares the full pure output with the exact evolutionlog₁₀(1 − F). Each horizontal category is a slice count r for the same initial state and total rotation. A vertical value of −4 means infidelity 10⁻⁴. More negative values give higher overlap. At 32 slices, the first-order value is about 1.10 × 10⁻⁵ and the symmetric value about 7.30 × 10⁻¹¹ before taking the logarithm. These are discrepancies for this input in ideal dynamics.−10−8−6−4−20log₁₀(1 − F)11. First order = log₁₀(0.0101660075) ≈ −1.992849574.1. Symmetric = log₁₀(7.624132077e−05) ≈ −4.117809589.22. First order = log₁₀(0.002677048602) ≈ −2.572343744.2. Symmetric = log₁₀(4.780942792e−06) ≈ −5.320486453.44. First order = log₁₀(0.0006870519968) ≈ −3.163010394.4. Symmetric = log₁₀(2.989790621e−07) ≈ −6.524359225.88. First order = log₁₀(0.0001740671171) ≈ −3.759283263.8. Symmetric = log₁₀(1.868855105e−08) ≈ −7.728424369.1616. First order = log₁₀(4.381054669e−05) ≈ −4.358421327.16. Symmetric = log₁₀(1.168070148e−09) ≈ −8.932531075.3232. First order = log₁₀(1.098973783e−05) ≈ −4.959012668.32. Symmetric = log₁₀(7.300493767e−11) ≈ −10.13664777.
  • First order
  • Symmetric
Each horizontal category is a slice count r for the same initial state and total rotation. A vertical value of −4 means infidelity 10⁻⁴. More negative values give higher overlap. At 32 slices, the first-order value is about 1.10 × 10⁻⁵ and the symmetric value about 7.30 × 10⁻¹¹ before taking the logarithm. These are discrepancies for this input in ideal dynamics.
Exact values shown in the plot
log₁₀(1 − F)
CategoryQuantity or frameExact valuePreparation
1First orderlog₁₀(0.0101660075) ≈ −1.992849574state infidelity 1 slices
1Symmetriclog₁₀(7.624132077e−05) ≈ −4.117809589state infidelity 1 slices
2First orderlog₁₀(0.002677048602) ≈ −2.572343744state infidelity 2 slices
2Symmetriclog₁₀(4.780942792e−06) ≈ −5.320486453state infidelity 2 slices
4First orderlog₁₀(0.0006870519968) ≈ −3.163010394state infidelity 4 slices
4Symmetriclog₁₀(2.989790621e−07) ≈ −6.524359225state infidelity 4 slices
8First orderlog₁₀(0.0001740671171) ≈ −3.759283263state infidelity 8 slices
8Symmetriclog₁₀(1.868855105e−08) ≈ −7.728424369state infidelity 8 slices
16First orderlog₁₀(4.381054669e−05) ≈ −4.358421327state infidelity 16 slices
16Symmetriclog₁₀(1.168070148e−09) ≈ −8.932531075state infidelity 16 slices
32First orderlog₁₀(1.098973783e−05) ≈ −4.959012668state infidelity 32 slices
32Symmetriclog₁₀(7.300493767e−11) ≈ −10.13664777state infidelity 32 slices
07

Budget the whole experiment

A complete resource statement begins with an input contract. In search, who implements the reversible predicate and how expensive is its inverse or uncomputation? In phase estimation, is U supplied as a primitive, as a circuit one may control, or as physical evolution over a calibrated interval? In digital simulation, how many local terms are there and how are their coefficients specified? In a variational calculation, how many distinct measurement settings and separately prepared states are needed? Answers can be different even when two papers use a similar-looking gate diagram.

Then specify an output contract. A verified marked word is a discrete witness and an ordinary predicate evaluation can certify it. An estimated eigenphase is an interval on a circle and needs a convention for its endpoints, resolution and confidence. A trial energy is a real number with units and uncertainty, as well as possible ansatz error. A time trace may demand many different experiments because measurements disturb the state. The distinction between one successful shot, mean error, worst-case error and confidence over repeated experiments changes the resource bill.

The failure budget can be split among coherent approximation, input preparation, calibration, measurement and statistical inference. For example a measured energy using simulated terms and a finite number of shots may inherit bias from an approximate Hamiltonian, a control error, and an independently estimated sampling spread. Some errors have a sign and can cancel for a particular state. Counting on that cancellation across a whole family of inputs requires a physical justification. Reporting an upper bound separately from the actual measured discrepancy avoids interpreting a conservative bound as a failed simulation.

All three methods turn structure into information visible at a detector. Search uses two reflections to redirect amplitude into a chosen subspace. Phase estimation uses a controlled range of coherent times to expose a periodic phase. Simulation approximates physical evolution or evaluates an energy without reading out every amplitude. In each case it is possible to name a measurement or resource that limits the conclusion. That discipline is what lets a small solvable example guide the design of a genuinely larger experiment.

Exact preparations and results

Four real amplitudes after the prepare stage

Prepare four words equally. Use the real, positive input phase convention and list the marked word first. For one full iteration, apply the sign oracle, then reflect each amplitude about the post-oracle mean.

Inputs
Stage included
Prepare
Number of marked and unmarked words
1 and 3
Results
Amplitude tuple
(1/2, 1/2, 1/2, 1/2)
Mean amplitude at this stage
1/2
Marked-word probability
1/4
Total probability on the three unmarked words
3/4
Four real amplitudes after the mark stage

Prepare four words equally. Use the real, positive input phase convention and list the marked word first. For one full iteration, apply the sign oracle, then reflect each amplitude about the post-oracle mean.

Inputs
Stage included
Mark
Number of marked and unmarked words
1 and 3
Results
Amplitude tuple
(−1/2, 1/2, 1/2, 1/2)
Mean amplitude at this stage
1/4
Marked-word probability
1/4
Total probability on the three unmarked words
3/4
Four real amplitudes after the diffuse stage

Prepare four words equally. Use the real, positive input phase convention and list the marked word first. For one full iteration, apply the sign oracle, then reflect each amplitude about the post-oracle mean.

Inputs
Stage included
Diffuse
Number of marked and unmarked words
1 and 3
Results
Amplitude tuple
(1, 0, 0, 0)
Mean amplitude at this stage
1/4
Marked-word probability
1
Total probability on the three unmarked words
0
Measure after 0 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
0
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
1/16 (0.0625 in decimal form).
Success with 4 marked
1/4 (0.25 in decimal form).
Failure probability with one marked word
15/16
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 1 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
1
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
121/256 (0.47265625 in decimal form).
Success with 4 marked
1 (1 in decimal form).
Failure probability with one marked word
135/256
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 2 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
2
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
3721/4096 (0.9084472656 in decimal form).
Success with 4 marked
1/4 (0.25 in decimal form).
Failure probability with one marked word
375/4096
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 3 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
3
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
63001/65536 (0.9613189697 in decimal form).
Success with 4 marked
1/4 (0.25 in decimal form).
Failure probability with one marked word
2535/65536
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 4 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
4
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
609961/1048576 (0.5817041397 in decimal form).
Success with 4 marked
1 (1 in decimal form).
Failure probability with one marked word
438615/1048576
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 5 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
5
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
2105401/16777216 (0.1254916787 in decimal form).
Success with 4 marked
1/4 (0.25 in decimal form).
Failure probability with one marked word
14671815/16777216
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 6 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
6
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
5470921/268435456 (0.02038076892 in decimal form).
Success with 4 marked
1/4 (0.25 in decimal form).
Failure probability with one marked word
262964535/268435456
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 7 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
7
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
1567288921/4294967296 (0.3649128883 in decimal form).
Success with 4 marked
1 (1 in decimal form).
Failure probability with one marked word
2727678375/4294967296
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Measure after 8 complete search iterations

Start with a uniform four-qubit register. For each iteration apply the coherent marking oracle and then the diffuser. Read one candidate word in the computational basis at the end.

Inputs
Complete iterations and marking queries
8
Tested marked-set sizes
1 and 4 out of 16
Results
Success with 1 marked
57455610601/68719476736 (0.8360891749 in decimal form).
Success with 4 marked
1/4 (0.25 in decimal form).
Failure probability with one marked word
11263866135/68719476736
Extreme preparations
If no word is marked the success probability is 0. If all 16 are marked it is 1. No normalized vector for an empty sector is needed.
Output and checking cost
The shot returns one word. Independently verifying that candidate is an additional predicate evaluation if the task requires it.
Three-bit Fourier output 0 (word 000)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
0 and 0 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × 7/16)] ≈ 0.01624322078
P(k) at φ = 15/16
1 / [64 sin²(π × 15/16)] ≈ 0.4105334745
Exact on-grid comparison, φ = 3/8
P(k) = 0
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Three-bit Fourier output 1 (word 001)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
1 and 1/8 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × 5/16)] ≈ 0.02260097957
P(k) at φ = 15/16
1 / [64 sin²(π × 13/16)] ≈ 0.05062232514
Exact on-grid comparison, φ = 3/8
P(k) = 0
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Three-bit Fourier output 2 (word 010)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
2 and 1/4 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × 3/16)] ≈ 0.05062232514
P(k) at φ = 15/16
1 / [64 sin²(π × 11/16)] ≈ 0.02260097957
Exact on-grid comparison, φ = 3/8
P(k) = 0
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Three-bit Fourier output 3 (word 011)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
3 and 3/8 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × 1/16)] ≈ 0.4105334745
P(k) at φ = 15/16
1 / [64 sin²(π × 9/16)] ≈ 0.01624322078
Exact on-grid comparison, φ = 3/8
P(k) = 1
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Three-bit Fourier output 4 (word 100)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
4 and 1/2 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × −1/16)] ≈ 0.4105334745
P(k) at φ = 15/16
1 / [64 sin²(π × 7/16)] ≈ 0.01624322078
Exact on-grid comparison, φ = 3/8
P(k) = 0
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Three-bit Fourier output 5 (word 101)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
5 and 5/8 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × −3/16)] ≈ 0.05062232514
P(k) at φ = 15/16
1 / [64 sin²(π × 5/16)] ≈ 0.02260097957
Exact on-grid comparison, φ = 3/8
P(k) = 0
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Three-bit Fourier output 6 (word 110)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
6 and 3/4 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × −5/16)] ≈ 0.02260097957
P(k) at φ = 15/16
1 / [64 sin²(π × 3/16)] ≈ 0.05062232514
Exact on-grid comparison, φ = 3/8
P(k) = 0
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Three-bit Fourier output 7 (word 111)

Supply a single eigenstate of U with eigenvalue exp(2πiφ). Apply controlled U, U² and U⁴ on the corresponding register bits and finish with the inverse Fourier transform. Record the word most significant bit first.

Inputs
Bin index k and phase label k/8
7 and 7/8 cycles
Fourier register size
3 bits, 8 outcomes
Results
P(k) at φ = 7/16
1 / [64 sin²(π × −7/16)] ≈ 0.01624322078
P(k) at φ = 15/16
1 / [64 sin²(π × 1/16)] ≈ 0.4105334745
Exact on-grid comparison, φ = 3/8
P(k) = 0
Power cost under literal repetition
Three controlled powers use 1 + 2 + 4 = 7 applications of the base evolution in a shot.
Single eigenphase preparation on an exact grid

Prepare one eigenvector with phase 3/8. Run ideal three-bit phase estimation and measure the Fourier register alone.

Inputs
Component eigenphases in cycles
3/8
Input populations
1
Results
P(bin 3), P(bin 4)
1, 0
Probability of every other bin
0
Joint target and register before readout
The register factors from the target. The prepared target is preserved up to a common phase.
Distinct eigenphase preparation on an exact grid

Prepare orthogonal eigenvectors with amplitudes √(3/4) and i√(1/4), in the stated phase order. Run ideal three-bit phase estimation and measure the Fourier register alone.

Inputs
Component eigenphases in cycles
3/8 and 1/2
Input populations
3/4 and 1/4
Results
P(bin 3), P(bin 4)
3/4, 1/4
Probability of every other bin
0
Joint target and register before readout
Each occupied target sector labels a different orthogonal register word for these exact phases.
Equal eigenphase preparation on an exact grid

Prepare the same two orthogonal components, both with eigenphase 3/8. The controlled powers phase the entire target identically in a given register branch. Run ideal three-bit phase estimation and measure the Fourier register alone.

Inputs
Component eigenphases in cycles
3/8 and 3/8
Input populations
3/4 and 1/4
Results
P(bin 3), P(bin 4)
1, 0
Probability of every other bin
0
Joint target and register before readout
The register factors from the target. The prepared target is preserved up to a common phase.
Interrogate the two candidate energies for 1 μs

Evolve an energy eigenstate with U = exp(−iHτ/ℏ). For each candidate E/h in hertz multiply by the delay in seconds and reverse the sign. Reduce modulo one to report the eigenphase in cycles.

Inputs
Interrogation time τ
1 μs
First and second candidate E/h
−187.5 kHz and +312.5 kHz
Results
Signed accumulated cycles, first and second
3/16, −5/16
Phases modulo one, first and second
3/16, 11/16
Three-bit register
The distributions are separated by four bins, with nonzero side probabilities for these off-grid phases.
Interrogate the two candidate energies for 2 μs

Evolve an energy eigenstate with U = exp(−iHτ/ℏ). For each candidate E/h in hertz multiply by the delay in seconds and reverse the sign. Reduce modulo one to report the eigenphase in cycles.

Inputs
Interrogation time τ
2 μs
First and second candidate E/h
−187.5 kHz and +312.5 kHz
Results
Signed accumulated cycles, first and second
3/8, −5/8
Phases modulo one, first and second
3/8, 3/8
Three-bit register
Both give bin 3 with certainty in the ideal model.
Interrogate the two candidate energies for 4 μs

Evolve an energy eigenstate with U = exp(−iHτ/ℏ). For each candidate E/h in hertz multiply by the delay in seconds and reverse the sign. Reduce modulo one to report the eigenphase in cycles.

Inputs
Interrogation time τ
4 μs
First and second candidate E/h
−187.5 kHz and +312.5 kHz
Results
Signed accumulated cycles, first and second
3/4, −5/4
Phases modulo one, first and second
3/4, 3/4
Three-bit register
Both give bin 6 with certainty in the ideal model.
Compare the computed Y readout at r = 1 slices

Start with |0⟩. Keep the total x and z rotation areas fixed at 0.8 and 0.6 rad. One first-order slice applies x then z. The symmetric slice applies half of z, all of x and then half of z.

Inputs
First-order angles per slice in time order, rad
0.8 x, 0.6 z
Symmetric angles per slice in time order, rad
0.3 z, 0.8 x, 0.3 z
Results
Exact simultaneous ⟨Y⟩ and P(1 in Z)
−0.6731767878 and 0.1471032621
First order ⟨Y⟩
−0.5920595304
First order signed Y discrepancy
0.08111725745
First order P(1 in Z)
0.1516466453
Symmetric ⟨Y⟩
−0.6853164493
Symmetric signed Y discrepancy
−0.01213966149
Symmetric P(1 in Z)
0.1516466453
Compare the computed Y readout at r = 2 slices

Start with |0⟩. Keep the total x and z rotation areas fixed at 0.8 and 0.6 rad. One first-order slice applies x then z. The symmetric slice applies half of z, all of x and then half of z.

Inputs
First-order angles per slice in time order, rad
0.4 x, 0.3 z
Symmetric angles per slice in time order, rad
0.15 z, 0.4 x, 0.15 z
Results
Exact simultaneous ⟨Y⟩ and P(1 in Z)
−0.6731767878 and 0.1471032621
First order ⟨Y⟩
−0.6360033723
First order signed Y discrepancy
0.03717341551
First order P(1 in Z)
0.1482601095
Symmetric ⟨Y⟩
−0.6762635317
Symmetric signed Y discrepancy
−0.003086743873
Symmetric P(1 in Z)
0.1482601095
Compare the computed Y readout at r = 4 slices

Start with |0⟩. Keep the total x and z rotation areas fixed at 0.8 and 0.6 rad. One first-order slice applies x then z. The symmetric slice applies half of z, all of x and then half of z.

Inputs
First-order angles per slice in time order, rad
0.2 x, 0.15 z
Symmetric angles per slice in time order, rad
0.075 z, 0.2 x, 0.075 z
Results
Exact simultaneous ⟨Y⟩ and P(1 in Z)
−0.6731767878 and 0.1471032621
First order ⟨Y⟩
−0.6555613598
First order signed Y discrepancy
0.01761542805
First order P(1 in Z)
0.1473936585
Symmetric ⟨Y⟩
−0.6739514731
Symmetric signed Y discrepancy
−0.0007746852846
Symmetric P(1 in Z)
0.1473936585
Compare the computed Y readout at r = 8 slices

Start with |0⟩. Keep the total x and z rotation areas fixed at 0.8 and 0.6 rad. One first-order slice applies x then z. The symmetric slice applies half of z, all of x and then half of z.

Inputs
First-order angles per slice in time order, rad
0.1 x, 0.075 z
Symmetric angles per slice in time order, rad
0.0375 z, 0.1 x, 0.0375 z
Results
Exact simultaneous ⟨Y⟩ and P(1 in Z)
−0.6731767878 and 0.1471032621
First order ⟨Y⟩
−0.6646293651
First order signed Y discrepancy
0.008547422712
First order P(1 in Z)
0.1471759333
Symmetric ⟨Y⟩
−0.673370643
Symmetric signed Y discrepancy
−0.0001938551117
Symmetric P(1 in Z)
0.1471759333
Compare the computed Y readout at r = 16 slices

Start with |0⟩. Keep the total x and z rotation areas fixed at 0.8 and 0.6 rad. One first-order slice applies x then z. The symmetric slice applies half of z, all of x and then half of z.

Inputs
First-order angles per slice in time order, rad
0.05 x, 0.0375 z
Symmetric angles per slice in time order, rad
0.01875 z, 0.05 x, 0.01875 z
Results
Exact simultaneous ⟨Y⟩ and P(1 in Z)
−0.6731767878 and 0.1471032621
First order ⟨Y⟩
−0.6689704826
First order signed Y discrepancy
0.004206305197
First order P(1 in Z)
0.1471214344
Symmetric ⟨Y⟩
−0.6732252631
Symmetric signed Y discrepancy
−4.847520786e−05
Symmetric P(1 in Z)
0.1471214344
Compare the computed Y readout at r = 32 slices

Start with |0⟩. Keep the total x and z rotation areas fixed at 0.8 and 0.6 rad. One first-order slice applies x then z. The symmetric slice applies half of z, all of x and then half of z.

Inputs
First-order angles per slice in time order, rad
0.025 x, 0.01875 z
Symmetric angles per slice in time order, rad
0.009375 z, 0.025 x, 0.009375 z
Results
Exact simultaneous ⟨Y⟩ and P(1 in Z)
−0.6731767878 and 0.1471032621
First order ⟨Y⟩
−0.6710907889
First order signed Y discrepancy
0.00208599893
First order P(1 in Z)
0.1471078055
Symmetric ⟨Y⟩
−0.6731889074
Symmetric signed Y discrepancy
−1.211951545e−05
Symmetric P(1 in Z)
0.1471078055
Compare complete pure output states at r = 1

Begin with Z-up. Test each final product state against the exact simultaneous evolution of the same initial state for the same total time. Here F is their squared overlap.

Inputs
Rotation areas a and b
0.8 rad and 0.6 rad
Elementary rotations after merging adjacent z half-slices
First order uses 1 x and 1 z. The symmetric sequence uses 1 x and 2 z.
Results
First order pure-state infidelity 1 − F
0.0101660075
First order trace distance √(1 − F)
0.100826621
Symmetric pure-state infidelity 1 − F
7.624132077e−05
Symmetric trace distance √(1 − F)
0.008731627613
Event probability error bound
For any one event its absolute probability discrepancy is at most the trace distance. A ±1 Pauli-mean discrepancy is bounded by twice the distance.
Compare complete pure output states at r = 2

Begin with Z-up. Test each final product state against the exact simultaneous evolution of the same initial state for the same total time. Here F is their squared overlap.

Inputs
Rotation areas a and b
0.8 rad and 0.6 rad
Elementary rotations after merging adjacent z half-slices
First order uses 2 x and 2 z. The symmetric sequence uses 2 x and 3 z.
Results
First order pure-state infidelity 1 − F
0.002677048602
First order trace distance √(1 − F)
0.05174020295
Symmetric pure-state infidelity 1 − F
4.780942792e−06
Symmetric trace distance √(1 − F)
0.002186536712
Event probability error bound
For any one event its absolute probability discrepancy is at most the trace distance. A ±1 Pauli-mean discrepancy is bounded by twice the distance.
Compare complete pure output states at r = 4

Begin with Z-up. Test each final product state against the exact simultaneous evolution of the same initial state for the same total time. Here F is their squared overlap.

Inputs
Rotation areas a and b
0.8 rad and 0.6 rad
Elementary rotations after merging adjacent z half-slices
First order uses 4 x and 4 z. The symmetric sequence uses 4 x and 5 z.
Results
First order pure-state infidelity 1 − F
0.0006870519968
First order trace distance √(1 − F)
0.02621167673
Symmetric pure-state infidelity 1 − F
2.989790621e−07
Symmetric trace distance √(1 − F)
0.0005467897787
Event probability error bound
For any one event its absolute probability discrepancy is at most the trace distance. A ±1 Pauli-mean discrepancy is bounded by twice the distance.
Compare complete pure output states at r = 8

Begin with Z-up. Test each final product state against the exact simultaneous evolution of the same initial state for the same total time. Here F is their squared overlap.

Inputs
Rotation areas a and b
0.8 rad and 0.6 rad
Elementary rotations after merging adjacent z half-slices
First order uses 8 x and 8 z. The symmetric sequence uses 8 x and 9 z.
Results
First order pure-state infidelity 1 − F
0.0001740671171
First order trace distance √(1 − F)
0.01319344978
Symmetric pure-state infidelity 1 − F
1.868855105e−08
Symmetric trace distance √(1 − F)
0.0001367060754
Event probability error bound
For any one event its absolute probability discrepancy is at most the trace distance. A ±1 Pauli-mean discrepancy is bounded by twice the distance.
Compare complete pure output states at r = 16

Begin with Z-up. Test each final product state against the exact simultaneous evolution of the same initial state for the same total time. Here F is their squared overlap.

Inputs
Rotation areas a and b
0.8 rad and 0.6 rad
Elementary rotations after merging adjacent z half-slices
First order uses 16 x and 16 z. The symmetric sequence uses 16 x and 17 z.
Results
First order pure-state infidelity 1 − F
4.381054669e−05
First order trace distance √(1 − F)
0.006618953595
Symmetric pure-state infidelity 1 − F
1.168070148e−09
Symmetric trace distance √(1 − F)
3.417704125e−05
Event probability error bound
For any one event its absolute probability discrepancy is at most the trace distance. A ±1 Pauli-mean discrepancy is bounded by twice the distance.
Compare complete pure output states at r = 32

Begin with Z-up. Test each final product state against the exact simultaneous evolution of the same initial state for the same total time. Here F is their squared overlap.

Inputs
Rotation areas a and b
0.8 rad and 0.6 rad
Elementary rotations after merging adjacent z half-slices
First order uses 32 x and 32 z. The symmetric sequence uses 32 x and 33 z.
Results
First order pure-state infidelity 1 − F
1.098973783e−05
First order trace distance √(1 − F)
0.003315077349
Symmetric pure-state infidelity 1 − F
7.300493767e−11
Symmetric trace distance √(1 − F)
8.544292696e−06
Event probability error bound
For any one event its absolute probability discrepancy is at most the trace distance. A ±1 Pauli-mean discrepancy is bounded by twice the distance.
Energy of the trial state at 0°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
0°
Trial ⟨X⟩ and ⟨Z⟩
0 and 1
Results
Exact mean in E₀ units
3/5 ≈ 0.6
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
1.6
Energy of the trial state at 45°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
45°
Trial ⟨X⟩ and ⟨Z⟩
0.7071067812 and 0.7071067812
Results
Exact mean in E₀ units
7/(5√2) ≈ 0.9899494937
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
1.989949494
Energy of the trial state at 90°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
90°
Trial ⟨X⟩ and ⟨Z⟩
1 and 0
Results
Exact mean in E₀ units
4/5 ≈ 0.8
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
1.8
Energy of the trial state at 135°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
135°
Trial ⟨X⟩ and ⟨Z⟩
0.7071067812 and −0.7071067812
Results
Exact mean in E₀ units
1/(5√2) ≈ 0.1414213562
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
1.141421356
Energy of the trial state at 180°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
180°
Trial ⟨X⟩ and ⟨Z⟩
0 and −1
Results
Exact mean in E₀ units
−3/5 ≈ −0.6
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
0.4
Energy of the trial state at 225°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
225°
Trial ⟨X⟩ and ⟨Z⟩
−0.7071067812 and −0.7071067812
Results
Exact mean in E₀ units
−7/(5√2) ≈ −0.9899494937
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
0.01005050634
Energy of the trial state at θg

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
θg with cos θg = −3/5 and sin θg = −4/5
Trial ⟨X⟩ and ⟨Z⟩
−0.8 and −0.6
Results
Exact mean in E₀ units
−1 ≈ −1
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
0
Energy of the trial state at 270°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
270°
Trial ⟨X⟩ and ⟨Z⟩
−1 and 0
Results
Exact mean in E₀ units
−4/5 ≈ −0.8
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
0.2
Energy of the trial state at 315°

Prepare Rᵧ(θ)|0⟩. The horizontal categories identify individual settings, including the exact minimizing angle θg, approximately 233.13°. The Hamiltonian is K = E₀(3Z + 4X)/5, with E₀ positive.

Inputs
Trial angle
315°
Trial ⟨X⟩ and ⟨Z⟩
−0.7071067812 and 0.7071067812
Results
Exact mean in E₀ units
−1/(5√2) ≈ −0.1414213562
Exact minimum in E₀ units
−1
Excess above the minimum in E₀ units
0.8585786438
Estimate the trial energy from independently sampled X and Z at 0°

Use 400 new preparations for X and another 400 for Z. Form (4X̄ + 3Z̄)E₀/5 from the two independently measured means. Statistical standard deviations combine in quadrature.

Inputs
Trial setting
0°
Shots per independently measured term
400
Results
Weighted X and Z standard deviations in E₀ units
0.04 and 0
Combined standard deviation in E₀ units
0.04
For 1,600 independent shots per term
0.02 E₀.
True mean in E₀ units
3/5
Estimate the trial energy from independently sampled X and Z at 90°

Use 400 new preparations for X and another 400 for Z. Form (4X̄ + 3Z̄)E₀/5 from the two independently measured means. Statistical standard deviations combine in quadrature.

Inputs
Trial setting
90°
Shots per independently measured term
400
Results
Weighted X and Z standard deviations in E₀ units
0 and 0.03
Combined standard deviation in E₀ units
0.03
For 1,600 independent shots per term
0.015 E₀.
True mean in E₀ units
4/5
Estimate the trial energy from independently sampled X and Z at 225°

Use 400 new preparations for X and another 400 for Z. Form (4X̄ + 3Z̄)E₀/5 from the two independently measured means. Statistical standard deviations combine in quadrature.

Inputs
Trial setting
225°
Shots per independently measured term
400
Results
Weighted X and Z standard deviations in E₀ units
0.02828427125 and 0.02121320344
Combined standard deviation in E₀ units
0.03535533906
For 1,600 independent shots per term
0.01767766953 E₀.
True mean in E₀ units
−7/(5√2)
Estimate the trial energy from independently sampled X and Z at θg

Use 400 new preparations for X and another 400 for Z. Form (4X̄ + 3Z̄)E₀/5 from the two independently measured means. Statistical standard deviations combine in quadrature.

Inputs
Trial setting
Exact ground direction with ⟨X⟩ = −4/5 and ⟨Z⟩ = −3/5
Shots per independently measured term
400
Results
Weighted X and Z standard deviations in E₀ units
0.024 and 0.024
Combined standard deviation in E₀ units
0.0339411255
For 1,600 independent shots per term
0.01697056275 E₀.
True mean in E₀ units
−1
Limits on the inputs
Query and gate counts
A coherent predicate call, its reversible implementation, data preparation, diffusion, final checking and the number of fresh shots are distinct costs. The plotted ideal search probabilities use the stated marked fraction.
Clock and energy conventions
A Fourier phase is in cycles modulo one. U = exp(−iHτ/ℏ) gives φ = −(E/h)τ modulo one. Finite-bin sampling, input eigenphase weights and the choice of energy branch each affect the interpretation.
Time slices and measurement settings
The pulse products act on one initially Z-up qubit at fixed simulated time and ideal calibration. Gate calibration, decoherence and sampling can also affect a measured discrepancy on hardware.
Variational and sampling error
The bound applies to the exact expectation on a normalized physical state. A finite estimate can fluctuate below −E₀. Sampling spreads here assume independently prepared ensembles, known Hamiltonian coefficients and calibrated measurement axes.

Worked examples

Follow all four amplitudes

One of four possible words is marked, the uniform input has amplitude 1/2 on every word, and the oracle reverses the marked sign. What does one iteration do?

  1. After marking, the amplitudes in an order with the marked word first are −1/2, +1/2, +1/2, +1/2. Their sum is one and their arithmetic mean is 1/4. Despite the sign change, every immediate measurement probability would still be 1/4.
  2. Diffusion replaces each amplitude by twice the mean minus its old value. The marked amplitude becomes 1/2 − (−1/2) = 1 and the unmarked amplitudes become 1/2 − 1/2 = 0. Their squared magnitudes still sum to one.
  3. Here sin θ = 1/2, so θ = π/6. After one iteration the good amplitude is sin(3θ) = 1. A second iteration gives sin(5θ) = 1/2 and reduces the success probability back to 1/4. Stopping the coherent circuit at the appropriate point is part of the algorithm.

One query and one diffusion step make the marked word certain in the ideal experiment. The query count excludes preparation, diffusion gates, readout and any final classical verification.

Choose a stopping point

For one marked word among sixteen, compare the success probabilities after two, three and four ideal Grover iterations. Does the largest tested count help?

  1. The initial angle is θ = arcsin(1/4) ≈ 0.25268 radians. The first peak in the continuous formula occurs near r = π/(4θ) − 1/2 ≈ 2.61. Only an integer number of complete iterations is available.
  2. At r = 2, 3, 4, evaluate sin²(5θ), sin²(7θ), sin²(9θ). The probabilities are about 0.90845, 0.96132 and 0.58170. The exact reflection recurrence in the computational basis gives the same results.
  3. A successful shot still provides just one word. For example measuring after three iterations has a failure probability of about 0.03868. If the predicate can be checked classically, independent preparation and a verified repeat can reduce the overall failure probability, with its associated cost.

Three iterations are best among these three choices. Executing a fourth overshoots the first peak.

Read an eigenphase between ticks

An exact eigenstate is supplied and an ideal three-qubit phase register is used. Compare phases 3/8 and 7/16. How should bins 3 and 4 be interpreted?

  1. There are eight register outcomes. For φ = 3/8 the phase factors for k = 3 add with the same phase and the seven other sums vanish. The output word is 011 when written most significant bit first.
  2. For φ = 7/16 the nearest bins have k/L = 3/8 and 4/8. Their detunings are ±1/16. Each probability is 1 / [64 sin²(π/16)] ≈ 0.41053. The two together account for about 0.82107. The other six outcomes carry the remaining probability.
  3. If the phase were 15/16, the two nearest bins would be 7 and 0 around the periodic boundary. An ordinary arithmetic average of labels 7 and 0 gives 3.5, which is far from the cluster on a circle. State the phase interval or use a circular inference model before taking an average.

An on-grid eigenphase gives one exact bin. A half-grid phase gives a distribution with two equally likely nearest bins and smaller side probabilities.

Convert a measured phase to an energy

Let U = exp(−iHτ/ℏ) with τ = 2.00 μs. An ideal phase measurement gives φ = 3/8 exactly. The energy is known independently to lie in −h/(2τ) < E < h/(2τ), where h = 2πℏ. Find E/h in cycles per second.

  1. The measured equation is φ = −Eτ/h modulo one. Hence E/h = (n − 3/8)/τ for an integer n. The separation between aliases in frequency units is 1/τ = 500 kHz.
  2. The prior interval becomes −250 kHz < E/h < 250 kHz. Choosing n = 0 gives −187.5 kHz, within the interval. Choosing n = 1 gives +312.5 kHz, which would yield the same phase but is outside the stated interval.
  3. The negative sign follows from the Schrödinger time-evolution convention. An oscillator’s cyclic frequency and its angular frequency differ by 2π. Reporting E/ℏ in radians per second requires multiplying the result for E/h by 2π.

The selected branch gives E/h = −187.5 kHz. The given range selects this branch. A second delay can distinguish candidate energies if it gives them different phases. At 1.00 μs the two candidates −187.5 and +312.5 kHz give 3/16 and 11/16 of a cycle. At 4.00 μs both give 3/4 of a cycle and remain indistinguishable.

Look beyond a matched population

Use a = 0.8, b = 0.6 and initial Z-up. Compare one first-order slice with one symmetric slice using both P(1 in Z) and the Y expectation.

  1. Both procedures rotate about x by 0.8 rad. A z pulse before that rotation leaves the initial Z eigenstate unchanged up to phase, and a final z pulse cannot change its Z populations. Thus both one-step approximations give P(1) = sin²(0.4) ≈ 0.151647.
  2. For exact simultaneous evolution the rotation axis is (0.8,0,0.6), with unit length. The excitation probability is 0.8² sin²(0.5) ≈ 0.147103 and the exact Y expectation is −0.8 sin(1) ≈ −0.673177. Their units are dimensionless.
  3. The ordered full z rotation after x gives Y = −sin(0.8) cos(0.6) ≈ −0.592060. Splitting the z pulse leaves only half of it after x, giving Y = −sin(0.8) cos(0.3) ≈ −0.685316. Two methods that look equally accurate in Z give different signed Y errors, about +0.08112 and −0.01214.

The Y measurement distinguishes the formulas. In the specified state and at this time the symmetric step gives the smaller Y error.

Find the lowest energy accessible to a trial state

For K = E₀(3Z + 4X)/5 and a real one-qubit trial state Rᵧ(θ)|0⟩, minimize the energy over all θ and compare it with the trial angle 225°.

  1. The trial Bloch vector in the xz plane is (sin θ, cos θ). Its dot product with the Hamiltonian’s unit vector (4/5, 3/5) is bounded below by −1. Equality requires sin θ = −4/5 and cos θ = −3/5.
  2. These components place θ in the third quadrant, at about 233.13°. The exact energy is −E₀. The trial angle 225° gives both components −1/√2 and energy −7E₀/(5√2) ≈ −0.98995 E₀.
  3. The excess of about 0.01005 E₀ at 225° comes from choosing that angle. It exists without shot noise or a faulty gate. This ansatz covers the exact ground direction. A smaller ansatz restricted to Z eigenstates would have lowest trial energy −0.6 E₀.

The family reaches −E₀ at about 233.13°. Restricting the scan to a finite angle grid can leave a visible energy error.

Estimate energy noise even in an eigenstate

Prepare the exact ground state from the previous example. Use 400 independent shots for X and another 400 for Z. What sampling spread should a direct sum of the two measured means have?

  1. The Pauli variances are 1 − (−4/5)² = 9/25 for X and 1 − (−3/5)² = 16/25 for Z. Divide by 400 for the sample means. The preparations used for the two settings are independent.
  2. Multiply the mean variances by the squared Hamiltonian coefficients. In E₀² units each term contributes (16/25)(9/25)/400 = 0.000576. The sum is 0.001152 and its square root is about 0.03394.
  3. Changing both shot counts from 400 to 1,600 halves this standard error because variance scales inversely with the number of shots. It does not change the prepared state or shift its true energy. Optimizer selection and erroneous measurement axes fall outside this fixed-setting variance calculation.

The measured sum has standard deviation about 0.03394 E₀. A direct ideal projective measurement in the energy eigenbasis would instead have zero variance on the exact ground state.

Try it yourself

  1. Does measuring immediately after a marking oracle help distinguish marked labels in a uniform input?

    Show the answer and reasoning

    Every word still has probability 1/N.

    An oracle phase reversal changes a complex amplitude by a sign and preserves its squared magnitude. A subsequent mixing step turns signs into differing probabilities.

  2. Exactly half the words are marked. What success probability does ordinary amplitude amplification give after any whole number of standard iterations?

    Show the answer and reasoning

    One half.

    θ = π/4 and (2r + 1)θ is an odd multiple of π/4. Its sine squared is 1/2. The standard iteration does not improve an already one-half success chance in this example.

  3. What does measuring a word after Grover iterations certify when there are no marked items?

    Show the answer and reasoning

    It gives an unmarked word. A single failed check cannot certify that the whole marked set is empty.

    The oracle is the identity if no word is marked. Search guarantees and decision guarantees require explicit promises or a protocol that bounds the probability of missing existing solutions.

  4. A predicate writes a workspace label |wₓ⟩ and leaves it entangled with x. What can go wrong if diffusion is applied to the search register alone?

    Show the answer and reasoning

    Different search paths can remain distinguishable and fail to interfere as required.

    The standard derivation assumes the same auxiliary state for the paths whose amplitudes are combined. A reversible implementation can compute the predicate, imprint the phase and uncompute the workspace.

  5. With five control qubits, how many base evolutions are required by the controlled powers if U raised to a power is implemented literally by repetitions?

    Show the answer and reasoning

    31 base evolutions with the corresponding controls.

    The powers are 1, 2, 4, 8 and 16. Additional register preparation, inverse Fourier gates, controls and measurement still have costs.

  6. Weights in two orthogonal eigenspaces are 3/4 and 1/4 and both phases are distinct exact grid points. What are the two phase probabilities?

    Show the answer and reasoning

    3/4 and 1/4.

    The orthogonal eigenspaces mark the Fourier outcomes. On ignoring the target, the cross terms vanish. Each stated weight is already a squared norm, so it directly gives that sector’s output probability.

  7. For fixed base time τ, halving the phase-bin spacing from 1/8 to 1/16 requires what change to the largest coherent time in the standard controlled-power circuit?

    Show the answer and reasoning

    It doubles from 4τ to 8τ.

    A three-bit register uses powers 1, 2, 4 and a four-bit register adds power 8. A new bit improves resolution while increasing the longest conditional evolution.

  8. Suppose both terms of the simulated Hamiltonian are proportional to Z. What product-formula error remains in the ideal dynamics?

    Show the answer and reasoning

    Zero for any positive number of slices.

    Two rotations about the same axis commute and their angles add. Noise, coefficient uncertainty and sampling uncertainty could still affect a real experiment.

  9. How many z-axis pulses and x-axis pulses are needed for r symmetric slices after combining adjacent z half-pulses?

    Show the answer and reasoning

    r + 1 z pulses and r x pulses, for both nonzero terms and no further simplification.

    There is a half z pulse at each end and r − 1 full z pulses in the interior. This is a gate inventory, distinct from the number of times the full experiment must be repeated for readout.

  10. If Ωx = 4.0 × 10⁵ rad/s and t = 2.0 μs, what value of a belongs in the elementary x rotation?

    Show the answer and reasoning

    a = 0.8 radians.

    Multiplying angular frequency by seconds cancels the time unit. An input specified in cycles per second would need conversion by 2π before this multiplication.

  11. Why can reporting the smallest noisy energy among many trial angles make the final number too low even if each angle estimate is unbiased?

    Show the answer and reasoning

    The selection tends to favor negative sampling fluctuations.

    The minimum is a nonlinear operation on noisy estimates. Independently preparing and measuring the selected trial state gives a final estimate without reusing the fluctuations that selected it.

  12. One study reports a sample of one local spin at one time, and another reports every coefficient of a many-body wavefunction. Can the ratio of run times establish quantum advantage?

    Show the answer and reasoning

    The two reported tasks ask for different outputs.

    An appropriate comparison fixes the input access, desired observable, accuracy, confidence and output format. It should include preparation, evolution, repetitions and the classical work that makes the result usable.

What to carry forward

  • A query comparison must specify how the input is accessed and what result the experiment returns. Two reflections can amplify success, but running past the peak can sharply reduce it.
  • Controlled powers turn a relative phase into a probability distribution over Fourier bins. Finite resolution, circular aliasing, evolution time and eigenstate overlap determine what can be inferred.
  • Digital product formulas approximate simultaneous dynamics through accessible substeps. Noncommuting terms generate error, and a choice of observable can either reveal or conceal that error.
  • A variational energy is bounded below by the ground energy when evaluated exactly on a normalized state. Finite shot counts, the trial family, control errors and optimization all affect an experimental estimate.

References

Sources for the concepts and teaching approaches in this article.

  1. A fast quantum mechanical algorithm for database searchLov K. GroverResearch paperarxiv.orgRead source
  2. Quantum Amplitude Amplification and EstimationGilles Brassard, Peter Høyer, Michele Mosca, Alain TappResearch paperarxiv.orgRead source
  3. Quantum Algorithms RevisitedRichard Cleve, Artur Ekert, Chiara Macchiavello, Michele MoscaResearch paperarxiv.orgRead source
  4. Universal Quantum SimulatorsSeth LloydResearch paper · PDFfab.cba.mit.eduRead source
  5. A Theory of Trotter ErrorAndrew M. Childs, Yuan Su, Minh C. Tran, Nathan Wiebe, Shuchen ZhuResearch paperarxiv.orgRead source
  6. A variational eigenvalue solver on a quantum processorAlberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J. Love, Alán Aspuru-Guzik, Jeremy L. O’BrienResearch paperarxiv.orgRead source

Sources and conventions

  • A fast quantum mechanical algorithm for database search. Lov K. Grover, ACM Symposium on Theory of Computing.

    Derives the query reduction of unstructured search with a coherent marking oracle.

    Sections Proceedings of STOC 1996, pp. 212–219, phase inversion and inversion about the average.

  • Quantum Amplitude Amplification and Estimation. Gilles Brassard, Peter Høyer, Michele Mosca, Alain Tapp, American Mathematical Society.

    Relates the prepared success probability to a rotation, the inverse preparation and controlled powers.

    Sections Contemporary Mathematics 305, 53–74 (2002), good and bad subspaces and amplitude estimation.

  • Quantum Algorithms Revisited. Richard Cleve, Artur Ekert, Chiara Macchiavello, Michele Mosca, Proceedings of the Royal Society A.

    Connects a register of controlled evolution times to Fourier measurement of an eigenphase.

    Sections 454, 339–354 (1998), phase estimation and interference.

  • Universal Quantum Simulators. Seth Lloyd, Science.

    Shows how bounded local interactions can be combined in time steps to approximate joint evolution.

    Sections 273, 1073–1078 (1996), digital simulation of sums of local terms.

  • A Theory of Trotter Error. Andrew M. Childs, Yuan Su, Minh C. Tran, Nathan Wiebe, Shuchen Zhu, Physical Review X.

    Explains why the terms that fail to commute govern product-formula error and distinguishes an upper bound from a measured deviation.

    Sections 11, 011020 (2021), local error and commutators.

  • A variational eigenvalue solver on a quantum processor. Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J. Love, Alán Aspuru-Guzik, Jeremy L. O’Brien, Nature Communications.

    Supports the hybrid method of estimating an energy expectation and optimizing a prepared trial state.

    Sections 5, 4213 (2014), evaluating trial-state energies with separately measured terms.