← Atlas

Algorithms · Quantum counting (QPE + Grover)

Quantum counting

Estimates how many items in an unstructured search space satisfy an oracle, without checking them one by one.

Strong empiricalUpdated

Open on the mapView frozen graph

c[0]c[1]c[2]s[0]s[1]Step 1 of 3 · H×5 · on c[0], c[1], c[2], s[0], s[1]H×5Step 2 of 3 · Controlled Grover powers · on c[0], c[1], c[2], s[0], s[1]Controlled Grover powersStep 3 of 3 · Inverse QFT (counting reg.) · on c[0], c[1], c[2]Inverse QFT (counting reg.)

3 steps across 5 wires. Hover a step, or press play to go through them in order.

Expected outcomes

  • Peak near φ=1/6 (3-bit QPE, N=4, M=1)60%
  • Adjacent phase-bin leakage40%
  • Steps3
  • Wires5
  • Qubits5 (3 counting + 2 system, N=4)
  • Toy instanceN=4, M=1 → θ=π/3
  • Query complexityO(√(N/M)) oracle calls
  • Papers2

A part this method uses, worked through

This page says Grover's amplitude amplification — here is a concrete, runnable instance of it.

Grover's algorithm finds |101⟩

3 qubits, searching for |101⟩ among 8 states, with 2 Grover iterations.

q0q1q2Hadamard layer(3)Phase oracle(101)Grover diffuser(3)Phase oracle(101)Grover diffuser(3)

Where it ends up

  • 10195%
  • 0001%
  • 1101%
  • 0011%
  • 4 more outcomes3%

Measuring gives 101, the marked state, with high probability.

One of its steps changes only phase: the outcome probabilities stay put while the state does not.

Open this part in Studio

A part this method uses, worked through

This page says phase estimation — here is a concrete, runnable instance of it.

Phase estimation of P(3*pi/4)

3 counting qubits estimating the phase of P(3π/4), which is 2π·3/8 exactly: a phase 3-bit QPE can represent exactly.

q0q1q2q3XHadamard layer(3)Controlled phase powers(3)QFT inverse(3)

Where it ends up

  • 1011100%

The counting register reads 011 = 3 with probability 1: angle/(2π) = 3/8, recovered exactly.

One of its steps changes only phase: the outcome probabilities stay put while the state does not.

Open this part in Studio
TakesNothingWhat joins here

No input port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.

Nothing in the Atlas meets this end.

ReturnsNothingWhat joins here

No output port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.

Nothing in the Atlas meets this end.

This record publishes no gate sequence and no register, so there is nothing here to read an interface off. Absent rather than empty. See all 152 →

References

Strong empirical
  • Verified by construction
  • Small-instance agreement
  • Peer-reviewed paper
Method
The circuit combines phase estimation with a Grover iterator whose eigenphase encodes the marked-item fraction M/N. The eigenphase for a hand-chosen toy instance (N=4, M=1) is computed analytically and compared against the circuit structure.
Result
Pass · for N=4, M=1 the Grover operator's eigenphase works out to θ=π/3, matching the expected sin²(θ/2)=M/N=1/4 relation used by the circuit.
Caveat
This record verifies the construction and a hand-derived toy eigenphase; it does not include a hardware or simulator run producing measured counting statistics.
Quantum Counting ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
CC BY 4.0-compatible reference metadata
countingphase estimationgroveramplitude amplification
  • Estimating solution density before committing to a full Grover search
  • Approximate model counting for SAT/CSP instances
  • Statistical estimation subroutine inside amplitude-estimation pipelines

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.