Simon’s Algorithm
Simon’s problem hides an XOR period in a promised many-bit function and asks for the complete word . A quantum value query creates a coset state; a Hadamard transform returns one random linear equation orthogonal to ; and repeated equations recover a candidate that two further value queries can verify.
For any fixed error below , the quantum query complexity is while the matched classical query complexity is . This is an exponential black-box separation in the address length , not a one-query algorithm, an end-to-end runtime theorem, a factoring lower bound, or a proof that BQP differs from BPP.
Required background. Quantum Oracles supplies the complete coherent interface and its construction boundary. Algorithmic Primitives supplies the access–processing–interference–readout vocabulary and multi-currency resource ledger used below.
Helpful background. The Quantum Algorithms and Complexity guide supplies the common claim record; Query Complexity fixes query and error conventions; Deutsch–Jozsa shows a neighboring Boolean decision problem; and Bernstein–Vazirani shows exact recovery of one hidden linear character.
The Hidden XOR-Period Promise
Section titled “The Hidden XOR-Period Promise”Let
where addition in is bitwise XOR. Define . The oracle is selected from the family of functions satisfying
The biconditional is the promise. It says not merely that is a period but that there are no other collisions. The required search output is the complete word ; the associated decision problem asks whether .
The promise includes two branches. If , then and is injective. If , the fibers are exactly the two-element cosets
so is exactly two-to-one. The mask is unique: the fiber of is , and equality of two promised functions’ collision relations would force their fibers at zero, hence their masks, to agree.
Some textbook presentations promise from the outset. That restricted problem is useful for deriving the sampling pattern, but it omits the injective branch and cannot by itself justify an injective-versus-two-to-one decision claim. This page retains the unified promise throughout.
The Ten-Field Simon Claim Record
Section titled “The Ten-Field Simon Claim Record”The complete record keeps the oracle theorem separate from implementation claims and from historical interpretation.
- Problem family and size. is a search family with address length and domain size ; its output is one -bit mask.
- Promise and instance. A unique determines the collision relation exactly when . The branch is injective.
- Access and encoding. One quantum query is the full -qubit XOR action . A matched classical query returns the complete -bit value at one selected address.
- Output and use. The output is the full word , which identifies the promised XOR period. It neither reconstructs the truth table nor tests an arbitrary function for the promise.
- Success and error. , , and fixed-constant are each ; deterministic exact and fixed-constant randomized classical costs are each under the conventions below.
- Algorithmic idea. A value query entangles each address coset with one output value. Fourier sampling over cancels characters outside and returns random linear constraints on .
- Executable procedure. Reinitialize two registers, create a uniform address state, query , optionally measure or discard the output, Hadamard-transform and measure the address, row-reduce retained samples, and verify a candidate with and under a declared stopping rule.
- Resource ledger. Each sample uses one abstract query, visible logical qubits plus hidden workspace, Hadamards, and measured data bits. Sampling, verifier calls, binary elimination, memory, oracle realization, and physical costs remain separate.
- Classical comparator. Exact difference covers and randomized birthday search use matched value queries; pairwise-difference and Yao arguments give the corresponding lower bounds.
- Evidence and limits. The query separation is a proved oracle theorem, with exact finite audits below. It is not a total-runtime or hardware result, a factoring lower bound, an unrelativized class separation, or an attack through classical-only API access.
The remaining sections prove the distribution, recovery rule, guarantee regimes, and matched lower bounds recorded here.
The Complete Many-Bit Value Oracle
Section titled “The Complete Many-Bit Value Oracle”Let be an -qubit address register and an -qubit value register, in tensor order . The licensed query acts on every computational-basis state as
This map permutes the computational basis and is therefore unitary. It is also self-inverse:
Defining only would not specify a coherent full-space operation. Conversely, knowing the complete XOR action does not reveal how is constructed, grant controlled access, or make its hidden workspace and physical realization free.
One ordinary sample executes:
- prepare ;
- apply to ;
- call once;
- optionally measure , or leave it unmeasured and later discard it;
- apply to ; and
- measure to obtain one word .
Unlike the Boolean routines on the neighboring pages, the standard Simon kernel does not prepare a one-qubit minus state. Its interference arises from entanglement with a many-bit value register and cancellation between addresses in the same fiber. Phase kickback is therefore a useful contrast, not the operative mechanism.
Coset States from One Quantum Query
Section titled “Coset States from One Quantum Query”After address preparation and one value query, the joint state is
For , measuring and obtaining the value leaves
in the address register. The probability of each distinct oracle value is , and the representative is irrelevant up to its coset. In the injective branch, measuring leaves a single basis state .
The output measurement is optional. If is ignored, the probability of measuring after the final Hadamards is
Only equal-output pairs survive the partial trace. For a nonzero mask, each contributes the two differences and , giving
This equals when and zero otherwise. For , only survives, so for every . Measuring the value register reveals a convenient conditional coset state; it does not create the period relation or change the address marginal.
Fourier Samples in the Orthogonal Subspace
Section titled “Fourier Samples in the Orthogonal Subspace”The -fold Hadamard transform is the Fourier transform over the product group :
Applying it to a nontrivial coset state gives
Character cancellation removes every with . Define the annihilator
Both promise branches are then summarized by
For , has dimension and contains words, each with probability . For , it is all of and each word has probability . Each sample supplies one homogeneous binary equation ; it does not normally determine by itself.
The transform here is not the cyclic circuit used in number-theoretic phase and period estimation. The distinction is structural: has binary characters implemented by independent Hadamards.
Binary Rank Recovery and Candidate Verification
Section titled “Binary Rank Recovery and Candidate Verification”Place retained samples into a binary matrix
For a nonzero mask, every row lies in . Once , the nullspace is the two-element set for a unique nonzero word . Under the nonzero branch alone, . Under the unified promise, the injective branch can also happen to produce a rank- matrix, so the candidate must be checked:
The biconditional promise makes this decisive. Equality for nonzero means ; inequality rules out and therefore identifies the injective branch once the sample span has codimension at most one.
If vectors are sampled independently and uniformly from a -dimensional binary space, the probability of spanning it is
One way to see this is to transpose the samples into a matrix. Its first row must avoid the zero span, its second must avoid a one-dimensional span, and so on. The failure probability obeys
When the current span has rank , a fresh sample increases the rank with probability . Summing the corresponding geometric waiting times gives
These are exact sampling laws. Row reduction must still be performed over , not over the real numbers, and a verifier call remains part of the executable algorithm.
The Injective Branch, Verification, and Exact Algorithms
Section titled “The Injective Branch, Verification, and Exact Algorithms”Different stopping conventions support different complexity claims.
Expected stopping. Repeatedly sample until the row rank reaches , compute the nonzero null vector, and verify it. In the nonzero branch the expected sample count is below because ; the two verifier calls give an always-correct expected -query procedure. In the injective branch, this rule also reaches rank in finite expected time and the verifier returns zero. It has no deterministic query cap.
Fixed-cap zero error. Take Fourier samples. Return zero immediately at rank ; at rank , verify the unique nonzero null vector; below rank , return ?. For a nonzero mask, the failure bound with is below . For the injective branch, dependence among the first samples has probability at most
so the inconclusive probability is also below . The deterministic cap is value queries.
Fixed-cap bounded error. Take samples, use the same rank and verifier rules, and return zero on an unresolved lower-rank outcome. The injective branch is always correct. In the nonzero branch the failure probability is below
The cap is queries, already below the conventional error threshold.
Exact fixed cap. The random-rank loop is not an exact fixed-cap algorithm. Brassard and Høyer gave a separate construction that forces a new independent annihilator element, or certifies that none remains, using exact amplification; their formulation includes the trivial subgroup. Cai and Qiu later supplied another optimal exact ordinary-oracle construction for the restricted nonzero-mask problem. It must not be applied silently to the branch. Together with the transparent zero-error and bounded-error procedures, the applicable upper bounds are .
For the associated injective-versus-two-to-one decision problem, Koiran, Nesme, and Portier proved, for sufficiently large ,
A full-mask search procedure also solves the decision problem. For zero error, replacing an inconclusive result of probability at most by an independent fair decision bit produces error at most , so the lower bound transfers under the fixed-cap convention. Consequently, for every fixed ,
The equality is asymptotic. The explicit and caps above belong to the transparent verifier-based procedures, not to the cited exact construction’s optimized constants.
Classical Collision Search and Lower Bounds
Section titled “Classical Collision Search and Lower Bounds”A classical query returns one complete value . Under a nonzero mask, the first observed collision identifies it:
An exact deterministic schedule follows from a difference cover. Write with and query every address in
Their intersection is . Every nonzero equals , so a hidden mask forces a collision among the queried addresses. No collision proves the injective branch. Hence
Conversely, queried addresses determine at most nonzero pairwise XOR differences. If some nonzero word is missing, an injective transcript can be completed either as an injective oracle or as a two-to-one oracle with that hidden mask, so an exact algorithm cannot distinguish them. Therefore
Random queries give the matched bounded-error upper bound. For a fixed nonzero mask, the domain is partitioned into pairs. Sampling distinct addresses without seeing both members of any pair has probability
The numerator chooses distinct pairs and one endpoint from each. Choosing makes the miss probability a fixed constant below one; a collision returns its XOR difference, while no collision returns zero.
For a lower bound, mix a uniformly random injective oracle with equal probability against an oracle with a uniformly random nonzero mask and random distinct fiber labels. Until a collision, their distinct output transcripts can be coupled. The queried addresses expose at most candidate masks, so any deterministic decision tree has distributional success at most
Yao’s minimax principle then gives randomized query complexity for the associated decision task at every fixed error below . Any full-mask search algorithm decides whether , so the lower bound transfers to search. A randomized fixed-cap procedure at cannot use random coins to evade the exact worst-case difference-cover requirement. Thus, for every fixed ,
Query Separation and Resource Boundaries
Section titled “Query Separation and Resource Boundaries”Combining the matched theorems gives
The exponential is in the address length . Both sides receive the same complete value at a selected address; the quantum side additionally receives the promised coherent extension because coherent access is the resource being compared.
One ordinary Fourier sample uses:
- one call to ;
- visible logical qubits plus unspecified oracle workspace;
- address Hadamards before and after the query;
- measured address bits, with output-register measurement optional;
- register reset or reinitialization before another sample; and
- storage for one additional -bit row.
With retained rows, straightforward binary elimination costs bit operations and memory. The verifier adds at most two value calls. Oracle construction, gate synthesis, connectivity, noise, calibration, error correction, classical control, readout latency, and wall-clock time are unspecified rather than zero.
This ledger prevents several invalid transfers. One sample does not reveal all values or normally recover . A compiled toy oracle can test the circuit identity while exposing the mask in its gate list, which removes the black-box premise for a classical observer. If source code or an implementation directly reveals , the collision lower bound is irrelevant.
The result is a proved oracle separation and supports a qualified relativized separation. It does not prove BQP BPP, establish a classical lower bound for factoring, or guarantee a hardware advantage. Off-promise and noisy observations may fail to lie in one hyperplane, so a computed null vector must not be treated as a true period without a declared robustness model and verification procedure.
Two Worked Claim Audits
Section titled “Two Worked Claim Audits”Four-bit coset and Fourier-support audit
Section titled “Four-bit coset and Fourier-support audit”Take , , and, with the most significant bit,
Its kernel is , and exhaustive evaluation gives:
| Inputs | Output |
|---|---|
0000, 1011 | 0000 |
0001, 1010 | 0010 |
0010, 1001 | 0100 |
0011, 1000 | 0110 |
0100, 1111 | 1000 |
0101, 1110 | 1010 |
0110, 1101 | 1100 |
0111, 1100 | 1110 |
The exact Fourier support is
0000 0011 0100 0111 1001 1010 1101 1110with probability on every listed word and zero elsewhere. The independent rows 0011, 0100, and 1001 have nullspace .
- Problem family and size. This is the , Simon search instance.
- Promise and instance. The displayed linear map has the unique mask and exactly the eight promised fibers tabulated above.
- Access and encoding. The audit assumes the complete eight-qubit XOR value oracle and evaluates its induced character sums exactly.
- Output and use. The recovered nonzero null word is , identifying the promised period.
- Success and error. The exhaustive support and nullspace checks are exact; no shot noise or floating-point tolerance is involved.
- Algorithmic idea. Equal-output address pairs cancel outside and reinforce within it.
- Executable procedure. Enumerate the truth table, group equal outputs, sum all equal-output character terms, and row-reduce the three selected samples over .
- Resource ledger. One physical sample would use one abstract query, eight visible qubits, eight Hadamards, and four measured address bits; the exhaustive classical audit is a separate finite verification.
- Classical comparator. The matched exact four-bit value-query cost is six, proved in the second audit.
- Evidence and limits. This is exact finite mathematical evidence for one promised oracle, not an asymptotic or implementation benchmark.
Four-bit rank and collision audit
Section titled “Four-bit rank and collision audit”For a three-dimensional sample space, exact enumeration of all ordered sequences gives:
| Full-rank sequences | ||
|---|---|---|
| 3 | ||
| 4 | ||
| 5 |
The expected spanning time is
For uniformly selected distinct addresses at ,
The six-query collision probability is therefore . Exact recovery needs six queries as well: the pair-count lower bound gives , and
has every nonzero four-bit word among its fifteen pairwise XOR differences. Thus . For , the cover contains the colliding pair 0100 and 1111.
- Problem family and size. The rank experiment uses , while the birthday and difference-cover calculations use the , Simon family.
- Promise and instance. Rank samples are uniform on a promised three-dimensional annihilator; collision calculations compare the injective branch with any nonzero hidden mask.
- Access and encoding. Quantum rows come from complete XOR-oracle calls; classical addresses receive complete four-bit values under matched access.
- Output and use. Full rank licenses one candidate null direction, while a collision licenses the XOR mask; the exact cover also certifies zero after no collision.
- Success and error. Rank and miss probabilities are exact rational values. Six random queries collide with probability , whereas the six-address cover is exact.
- Algorithmic idea. Quantum recovery accumulates independent orthogonality equations; classical recovery waits for, or guarantees, one repeated fiber label.
- Executable procedure. Enumerate ordered rank sequences, evaluate the closed-form miss fraction, enumerate all pairwise cover differences, and compare with the lower bound.
- Resource ledger. The table counts retained Fourier samples or distinct classical value calls; elimination, storage, oracle realization, and physical costs remain separate.
- Classical comparator. The exact finite value is six, and the random-query success at the same cap is on nonzero instances.
- Evidence and limits. These exhaustive finite checks support the formulas but do not replace the asymptotic lower-bound theorems.
The following exact-integer JavaScript reproduces both audits. It performs no random sampling.
const assert = (condition, message) => { if (!condition) throw new Error(message);};const parity = x => { let p = 0; for (; x; x >>= 1) p ^= x & 1; return p;};const word = (x, width = 4) => x.toString(2).padStart(width, "0");const simon4 = x => { const x1 = (x >> 3) & 1; const x2 = (x >> 2) & 1; const x3 = (x >> 1) & 1; const x4 = x & 1; return (x2 << 3) | ((x1 ^ x3) << 2) | ((x1 ^ x4) << 1);};
const fibers = new Map();for (let x = 0; x < 16; x++) { const value = simon4(x); if (!fibers.has(value)) fibers.set(value, []); fibers.get(value).push(x);}const pairs = [...fibers.entries()] .sort((a, b) => a[0] - b[0]) .map(([value, xs]) => [xs.map(x => word(x)), word(value)]);const expectedPairs = [ [["0000", "1011"], "0000"], [["0001", "1010"], "0010"], [["0010", "1001"], "0100"], [["0011", "1000"], "0110"], [["0100", "1111"], "1000"], [["0101", "1110"], "1010"], [["0110", "1101"], "1100"], [["0111", "1100"], "1110"]];assert(JSON.stringify(pairs) === JSON.stringify(expectedPairs), "wrong fibers or outputs");assert(pairs.length === 8, "wrong fiber count");assert(pairs.every(([xs]) => xs.length === 2), "fiber is not a pair");assert(pairs.every(([xs]) => (parseInt(xs[0], 2) ^ parseInt(xs[1], 2)) === 0b1011), "wrong hidden difference");
const characterSums = [];for (let y = 0; y < 16; y++) { let sum = 0; for (let x = 0; x < 16; x++) { for (let xp = 0; xp < 16; xp++) { if (simon4(x) === simon4(xp)) { sum += parity((x ^ xp) & y) ? -1 : 1; } } } characterSums.push(sum);}const support = characterSums .map((sum, y) => [sum, y]) .filter(([sum]) => sum !== 0) .map(([, y]) => word(y));assert( support.join(" ") === "0000 0011 0100 0111 1001 1010 1101 1110", "wrong Fourier support");assert(characterSums.every(sum => sum === 0 || sum === 32), "wrong character sum");
const selectedRows = [0b0011, 0b0100, 0b1001];const nullspace = [...Array(16).keys()] .filter(t => selectedRows.every(y => parity(y & t) === 0)) .map(t => word(t));assert(nullspace.join(" ") === "0000 1011", "wrong nullspace");
const gf2Rank = (rows, width) => { const a = rows.slice(); let rank = 0; for (let bit = width - 1; bit >= 0; bit--) { const pivot = a.findIndex((row, i) => i >= rank && ((row >> bit) & 1)); if (pivot < 0) continue; [a[rank], a[pivot]] = [a[pivot], a[rank]]; for (let i = 0; i < a.length; i++) { if (i !== rank && ((a[i] >> bit) & 1)) a[i] ^= a[rank]; } rank++; } return rank;};const fullRankCount = m => { let count = 0; for (let code = 0; code < 8 ** m; code++) { let rest = code; const rows = []; for (let i = 0; i < m; i++) { rows.push(rest % 8); rest = Math.floor(rest / 8); } if (gf2Rank(rows, 3) === 3) count++; } return [count, 8 ** m];};const rankCounts = [3, 4, 5].map(fullRankCount);assert( JSON.stringify(rankCounts) === JSON.stringify([[168, 512], [2520, 4096], [26040, 32768]]), "wrong rank counts");assert(8 * 3 + 4 * 7 + 2 * 21 === 94, "wrong expected spanning time");
const choose = (n, k) => { let value = 1; for (let j = 1; j <= k; j++) value = value * (n - k + j) / j; return value;};const gcd = (a, b) => b ? gcd(b, a % b) : a;const reducedMiss = q => { const numerator = 2 ** q * choose(8, q); const denominator = choose(16, q); const divisor = gcd(numerator, denominator); return [numerator / divisor, denominator / divisor];};const missFractions = [4, 5, 6].map(reducedMiss);assert( JSON.stringify(missFractions) === JSON.stringify([[8, 13], [16, 39], [32, 143]]), "wrong birthday fractions");assert(111 * 3 > 143 * 2, "six-query collision probability is not above two thirds");
const cover = [0b0000, 0b1000, 0b0100, 0b0010, 0b0001, 0b1111];const differences = new Set();for (let i = 0; i < cover.length; i++) { for (let j = i + 1; j < cover.length; j++) differences.add(cover[i] ^ cover[j]);}assert(differences.size === 15 && !differences.has(0), "not a difference cover");assert((0b0100 ^ 0b1111) === 0b1011, "missing concrete collision");
console.log({ pairs, support, nullspace, rankCounts, missFractions, differences: differences.size });Hidden Subgroups, History, and Canonical Ownership
Section titled “Hidden Subgroups, History, and Canonical Ownership”Simon introduced the problem in 1994 and gave its journal treatment in 1997. It provided an early exponential separation between quantum and bounded-error randomized classical query complexity for a black-box problem and helped expose a general pattern: prepare superpositions of cosets, Fourier-sample characters trivial on the hidden subgroup, and recover the subgroup from classical constraints. Jozsa later emphasized the common Fourier viewpoint.
Here the group is and the hidden subgroup is . The independent Hadamards implement its group Fourier transform. The Quantum Fourier Transform page owns the cyclic transform conventions used by phase and order finding; the two transforms must not be identified merely because both are called Fourier transforms.
Shor’s Algorithm owns the number-theoretic reductions, cyclic period finding, rational reconstruction, verification, and complexity qualifications for factoring and discrete logarithms. Simon’s algorithm is a conceptual predecessor, not a proof of Shor’s correctness or of a classical factoring lower bound.
Quantum Complexity Classes owns the relativization interpretation and the distinction between an oracle separation and BQP versus BPP. Classical Information Review owns general matched data and total-cost comparisons; Claims, Hype, and Evidence Standards owns evidence-language calibration; and Circuit Model owns general register and measurement semantics.
Brassard–Høyer own the unified exact construction, while Cai–Qiu own a specialist exact construction for the restricted nonzero-mask formulation. Koiran–Nesme–Portier own the linear quantum lower bound, while Nayak gives a modern deterministic hidden-subgroup treatment. This page assembles those results only to state Simon’s matched query theorem.
Any proposed application must supply the same coherent map used by the theorem. An ordinary remote classical API supplies classical value queries, not that coherent interface, so the oracle result alone does not license a quantum-query conclusion in that setting.
Common Simon-Algorithm Failures
Section titled “Common Simon-Algorithm Failures”Silently excluding the injective branch. The common nonzero-mask derivation is not the unified search problem. State whether is allowed and include candidate verification when it is.
Calling one sample the algorithm. One oracle call normally returns one random equation . Recovery requires repeated samples, binary elimination, and verification under a declared stopping rule.
Treating output measurement as the source of the speedup. Measuring the value register is optional. Tracing it out gives the same address distribution because the promise already fixes the equal-output coherences.
Replacing the value oracle with Boolean phase kickback. Simon’s standard kernel uses an -bit value register and coset entanglement. A minus-state Boolean target is the mechanism on different neighboring pages.
Calling expected stopping exact fixed-cap complexity. An always-correct random loop can have an unbounded tail. The exact theorem uses a separate construction; the transparent fixed-cap routine is zero-error with ?.
Comparing with generic collision finding. The XOR-period promise constrains every collision and makes one collision identify the mask. Bounds for arbitrary collision problems do not transfer without preserving that structure.
Turning a query theorem into a runtime or class theorem. Coherent oracle construction, gates, data movement, noise, and classical processing remain outside the query count. The result is a relativized black-box separation, not a proof that BQP differs from BPP.
Ignoring off-promise or noisy samples. A collection of rows need not share one codimension-one nullspace away from the ideal promise. A candidate null vector is not evidence of a physical or cryptographic period without a declared noise model and verifier.
Exercises
Section titled “Exercises”Exercise 1 — Uniqueness and the two promise branches
Section titled “Exercise 1 — Uniqueness and the two promise branches”Prove that the mask is unique. Then derive the injective branch for and the exact two-to-one coset structure for .
Solution
The fiber of is
If the same collision relation had masks and , these fibers would obey , hence . When , equality of outputs implies and therefore , so is injective. When , each shares its value exactly with , and the two addresses are distinct. The fibers are therefore the two-element cosets of .
Exercise 2 — Full-space action and optional measurement
Section titled “Exercise 2 — Full-space action and optional measurement”Show that is unitary on the whole computational basis. Starting from , derive the address distribution without measuring the value register and compare it with the conditional-coset derivation.
Solution
For each fixed , the map is a permutation and its own inverse. The full basis map is therefore a permutation, so is unitary and .
Tracing out gives
After ,
For , each has equal-output partners and , so . This is on and zero elsewhere, exactly the distribution obtained by first conditioning on any coset state. For , only diagonal pairs remain and .
Exercise 3 — Character cancellation
Section titled “Exercise 3 — Character cancellation”Derive the Hadamard transform of and prove that the result is uniform on . Include the branch.
Solution
For ,
There are supported words and every squared amplitude is , so the distribution is normalized and uniform. If , a measured output selects one basis state because is injective. Its Hadamard transform has amplitude magnitude at every , which is the same rule with and .
Exercise 4 — The complete four-bit audit
Section titled “Exercise 4 — The complete four-bit audit”For the displayed function, reproduce all fibers, the eight-point Fourier support, and the nullspace of rows 0011, 0100, and 1001.
Solution
Evaluating the four output coordinates gives the eight pairs in the first audit, each separated by
The equal-output character sum is
so it is on words orthogonal to 1011 and zero otherwise. Dividing by gives probability on
0000 0011 0100 0111 1001 1010 1101 1110The three chosen equations are independent. Solving them over leaves one free bit and gives precisely or .
Exercise 5 — Rank probability and expected stopping
Section titled “Exercise 5 — Rank probability and expected stopping”Derive , its failure bound, and . Evaluate the three probabilities and the expected time for , then identify how the kernel and rank language transfers to its Mathematical Toolkit owner.
Solution
A binary matrix has full row rank when its ordered rows successively avoid spans of sizes . Out of possible rows at each step,
A union bound over the failed independence steps gives
At rank , the probability of increasing rank is , so
For , the products give , , and at , while
This is the finite-field instance of the kernel, image, rank, and rank–nullity language developed in Mathematical Toolkit Linear Maps. The present exercise specializes that structure to row reduction over .
Exercise 6 — The birthday comparator
Section titled “Exercise 6 — The birthday comparator”Derive the exact no-collision probability for distinct random addresses and explain why it gives an bounded-error algorithm.
Solution
For fixed nonzero , the addresses form disjoint pairs. A collision-free -subset chooses of those pairs and one of two endpoints in each, so the number of favorable subsets is . Dividing by all subsets gives
Equivalently,
For , its logarithm is bounded above by
so a sufficiently large constant makes the miss probability at most any fixed error. A collision reveals ; without one the procedure returns zero.
Exercise 7 — Deterministic lower and upper bounds
Section titled “Exercise 7 — Deterministic lower and upper bounds”Prove the pairwise-difference lower bound and split-subspace upper bound. Then establish .
Solution
With queried addresses, at most nonzero XOR differences have been exposed. If this is less than , some nonzero is absent, and a collision-free transcript is compatible with both an injective oracle and a promised oracle having mask . Thus
For the upper bound, query
Every is the difference of and , and the union has elements.
At , the lower bound requires , hence . The set
has six elements and fifteen distinct nonzero pairwise XOR differences, so it attains the bound. Therefore .
Exercise 8 — Repair an exponential-speedup overclaim
Section titled “Exercise 8 — Repair an exponential-speedup overclaim”Repair the statement “Simon’s one-query circuit proves an exponential runtime speedup and explains factoring.” Give a complete claim record and resource boundary.
Solution
- Problem family and size. The claim concerns with address length and domain size .
- Promise and instance. The many-bit function is promised injective or exactly two-to-one with one unique XOR mask; the algorithm does not test arbitrary functions.
- Access and encoding. Quantum access is the complete coherent XOR oracle, while the comparator receives matched classical value queries. Oracle construction is not free.
- Output and use. The procedure must return the full mask , not one Fourier sample or a truth table.
- Success and error. For fixed error below , , , and are each ; and are each under their stated conventions.
- Algorithmic idea. Each value query creates coset coherence, and a Hadamard transform returns one random equation in .
- Executable procedure. Repeat the sampling kernel, row-reduce over , verify a candidate with two value calls, and use the stopping rule appropriate to the claimed guarantee.
- Resource ledger. Count all oracle calls, visible qubits plus hidden workspace, Hadamards, resets, measurements, straightforward elimination work, memory, and excluded implementation costs separately.
- Classical comparator. Difference-cover and birthday algorithms use value queries, with matching difference-count and Yao lower bounds.
- Evidence and limits. The result is an exponential oracle-query separation in . It is not a one-query or runtime theorem, does not prove BQP BPP, and only supplies historical and structural context for Shor’s distinct number-theoretic algorithm.
A defensible replacement is: “Under the promised coherent value-oracle model, Simon’s problem has quantum and classical query complexity for fixed error below . This oracle separation helped motivate later Fourier-sampling algorithms, but it does not establish their classical lower bounds or implementation performance.”
References
Section titled “References”- G. Brassard and P. Høyer, “An Exact Quantum Polynomial-Time Algorithm for Simon’s Problem,” Proceedings of the Fifth Israeli Symposium on Theory of Computing and Systems, 12–23 (1997), doi:10.1109/ISTCS.1997.595153.
- G. Cai and D. Qiu, “Optimal Separation in Exact Query Complexities for Simon’s Problem,” Journal of Computer and System Sciences 97, 83–93 (2018), doi:10.1016/j.jcss.2018.05.001.
- A. M. Childs and W. van Dam, “Quantum Algorithms for Algebraic Problems,” Reviews of Modern Physics 82, 1–52 (2010), doi:10.1103/RevModPhys.82.1.
- R. Jozsa, “Quantum Algorithms and the Fourier Transform,” Proceedings of the Royal Society A 454, 323–337 (1998), doi:10.1098/rspa.1998.0163.
- P. Koiran, V. Nesme, and N. Portier, “A Quantum Lower Bound for the Query Complexity of Simon’s Problem,” Automata, Languages and Programming, LNCS 3580, 1287–1298 (2005), doi:10.1007/11523468_104.
- A. Nayak, “Deterministic Algorithms for the Hidden Subgroup Problem,” Quantum Information and Computation 22, 755–769 (2022), doi:10.26421/QIC22.9-10-3.
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th Anniversary Edition, Cambridge University Press (2010), doi:10.1017/CBO9780511976667.
- P. W. Shor, “Algorithms for Quantum Computation: Discrete Logarithms and Factoring,” Proceedings of the 35th Annual Symposium on Foundations of Computer Science, 124–134 (1994), doi:10.1109/SFCS.1994.365700.
- D. R. Simon, “On the Power of Quantum Computation,” Proceedings of the 35th Annual Symposium on Foundations of Computer Science, 116–123 (1994), doi:10.1109/SFCS.1994.365701.
- D. R. Simon, “On the Power of Quantum Computation,” SIAM Journal on Computing 26, 1474–1483 (1997), doi:10.1137/S0097539796298637.