← Atlas

Algorithms · Quantum query algorithm

Counterfeit coin problem by quantum queries

Given N coins of which exactly k are counterfeit, where the real coins all share one weight and the counterfeit coins all share another, and given a pan balance that can compare the weight of any pair of subsets of the coins but reports only whether they balance or tilt, identify all of the counterfeit coins in as few weighings as possible.

Attested & literatureUpdated

View frozen graph

  • Record typeLiterature reference
  • Speedup class (secondary source)Polynomial
  • Primary source on the speedupNot checked against the primary source yet
  • Reported costQ(k,N) = O(k^(1/4)) quantum queries to the balance oracle for any k and N with k < N/2, where Q(k,N) is the quantum query complexity of finding all k false coins among the N given coins; the classical query complexity is Ω(k log(N/k)), a bound that depends on N, so the paper reports a quartic speed-up. No matching lower bound is given: the paper shows only that any algorithm that satisfies certain properties, its own algorithm included, needs Ω(k^(1/4)) queries.
  • Papers1

A part this method uses, worked through

This page says Bernstein-Vazirani algorithm — here is a concrete, runnable instance of it.

Bernstein-Vazirani recovers a secret string

4 input qubits, secret string 1011, recovered in a single query.

q0q1q2q3q4XHadamard layer(5)BV oracle(1011)Hadamard layer(4)HX

Where it ends up

  • 01011100%

The four input qubits read 1011, the secret, recovered exactly, in one shot. The ancilla reads 0.

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 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

Quantum vs classical

Classical baseline

Compare Quantum query algorithm with the strongest classical method for the same instance, input budget, and output metric.

Quantum claim

This reference exposes a quantum circuit pattern; it does not imply an application-level speedup without a matched benchmark.

How to compare

Report input loading, circuit depth, repetitions, classical preprocessing, post-processing, and wall-clock time together.

References

  • Quantum Counterfeit Coin Problems

    Kazuo Iwama, Harumichi Nishimura, Rudy Raymond, Junichi Teruyama · 2010

    Primary source: it models the balance scale as an oracle giving only balanced or tilted information, takes the number of weighings as the cost measure, and gives the O(k^(1/4)) upper bound on the quantum query complexity Q(k,N) for k < N/2, against the classical Ω(k log(N/k)). Consult it for the properties an algorithm must satisfy for the accompanying Ω(k^(1/4)) tightness evidence to apply.

Attested & literature
  • Peer-reviewed paper
Method
Curation only. The problem statement was recorded from the literature; the speedup class is not yet checked against the record's own primary paper; the primary reference's title, authors and submission year were read from its arXiv abs page; the complexity claim was taken from a clause of that paper's abstract (abstract of arXiv:1009.0416, quoted verbatim except that TeX control sequences are rendered as Unicode while superscripts are left in TeX form: "Let Q(k,N) be the quantum query complexity of finding all k false coins from the N given coins. We show that for any k and N such that k < N/2, Q(k,N)=O(k^{1/4}), contrasting with the classical query complexity, Ω(k log(N/k)), that depends on N. So our quantum algorithm achieves a quartic speed-up for this problem", and, for the absence of a matching lower bound, "We do not have a matching lower bound, but we show some evidence that the upper bound is tight: any algorithm, including our algorithm, that satisfies certain properties needs Ω(k^{1/4}) queries." The Quantum Algorithm Zoo entry "Counterfeit Coins" states the same two figures, quoted here the same way: "Classically, we need Ω(k log(N/k)) weighings to identify all of the counterfeit coins", and, attributing the upper bound to Iwama et al., "on a quantum computer, one can identify all of the counterfeit coins using O(k^{1/4}) queries". Neither source states a constant factor or a gate count.). No circuit was constructed, simulated or run.
Result
Pass · the record's problem, speedup class and primary reference agree with the two sources named above.
Caveat
This is a literature record: no circuit was constructed, compiled, simulated, or run, and no set of coins was weighed. Every figure above is a count of queries to the balance oracle, so gate counts, qubit counts, circuit depth, and the cost of realizing that oracle for an actual pan balance all fall outside it, as do the constant factors hidden by O(·). The upper bound is stated under the condition k < N/2 and assumes the number k of counterfeit coins is known in advance, so it establishes nothing about instances where k is unknown or where k is at least N/2. Optimality is not settled: the paper says it has no matching lower bound, and the Ω(k^(1/4)) evidence it offers is restricted to algorithms satisfying certain properties, which the abstract does not spell out and which this record does not reproduce. The attribution of the speedup to amplitude amplification and the Bernstein-Vazirani algorithm is the Zoo's account of how the construction works, and the earlier Terhal and Smolin result the Zoo credits rests on a paper outside this record.
Quantum Counterfeit Coin Problems ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
Citation metadata only; source publication terms apply
counterfeit coinsquery complexityoracleamplitude amplificationbernstein-vazirani

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