Part IV. Protocols and Algorithms · Chapter 29
Simon and Hidden Structure
Simon's problem is the bridge between the toy oracles and Shor: a hidden string, a promise about collisions, and a quantum sampler that hands classical algebra exactly the equations it needs.
In this chapter 8 sections
Reader question. How does Simon's algorithm turn a two-to-one XOR-period promise into linear equations for a hidden string?
The oracle creates paired inputs x and x⊕s with equal outputs; after discarding or measuring the output register and applying Hadamards, samples y satisfy y·s=0 mod 2, so repeated independent samples and classical Gaussian elimination recover s.
- This chapter does not claim an advantage without Simon's exact promise or ignore oracle construction.
- It does not substitute one lucky sample for the rank required to recover the hidden string.
The collision promise
State f(x)=f(x⊕s) and the two-to-one boundary.
Simon's problem hands you a black-box function on -bit strings with a strict promise: there is a hidden nonzero string such that
Every output value appears exactly twice, on input pairs separated by . The task is to recover . Classically, the only way in is to query inputs and hope for a collision, and the birthday bound says a collision costs on the order of queries; exponential. Quantumly, about runs suffice. That is the first clean exponential oracle separation in the standard story, and it is the conceptual ancestor of factoring.
Evidence boundary. Simon's problem has a hidden XOR-period promise yielding an exponential quantum query separation. [Daniel R. Simon] [Ethan Bernstein]
One query creates paired branches
Trace registers through oracle and output measurement.
One run of Simon's circuit prepares a superposition over inputs, evaluates into an output register, and interferes the inputs. Measuring then returns a uniformly random string satisfying:
Read that carefully: the measurement tells you one equation that obeys, and nothing else directly. But each run is cheap, the equations are independent with good probability, and after roughly of them, classical linear algebra pins down uniquely. Bernstein–Vazirani put the hidden string into phase and read it in one shot; Simon trades that single-shot elegance for a sampling loop plus a classical solver. The trade is the template.
Phase kickback remains the underlying habit; the oracle writes function structure into amplitudes; even though Simon is usually presented with an explicit output register rather than a target. The moral generalizes: structure gets encoded in amplitudes, and interference plus measurement exposes constraints on it.
Evidence boundary. Fourier sampling produces bit strings orthogonal to the hidden period over GF(2). [Michael A. Nielsen] [John Preskill]
Hadamards erase incompatible frequencies
Derive the condition y·s=0.
Evidence boundary. Classical post-processing uses linear algebra over GF(2) and needs enough independent samples. [John Watrous] [Daniel R. Simon]
Notation contract: Bit vectors over GF(2); dot product and XOR explicitly mod 2; matrix rank over GF(2), not real numbers.
Resource account: rank, not shot count, ends sampling
Collect independent equations over GF(2).
| Resource | Account | Stopping condition |
|---|---|---|
| Oracle queries | One per circuit run | Continue until the sampled equation matrix reaches rank n-1. |
| Measurements | n output bits per run | Discard dependent rows; do not count raw shots as information. |
| Quantum gates | 2n Hadamards plus one promised oracle implementation per run | Oracle gates remain outside black-box query complexity. |
| Classical work | Incremental GF(2) elimination, polynomial in n | Verify the nonzero nullspace vector with fresh oracle pairs. |
Simon's problem is a lesson in problem representation. The same function with no promise is a haystack; the promised collision structure turns it into a system of equations waiting to be sampled. When you audit any algorithm in this family, ask:
- What hidden structure is promised, and who guarantees it?
- What does one query produce, concretely?
- What distribution do the measurements sample from?
- What classical processing consumes the samples?
- What does the best classical algorithm do with the same oracle access?
These five questions transfer unchanged to period finding, to hidden-subgroup methods, and to a surprising number of application claims.
Recover s and verify the promise
Perform binary elimination and an oracle check.
Each measurement supplies y with y dot s=0 over GF(2). Row-reduce until the sample matrix has rank n-1; its nonzero nullspace vector is the candidate s. Rank deficiency means collect another sample, not guess. Even full rank validates only the equations: query the supplied function on test pairs x and x xor s to confirm the collision promise before accepting the recovered mask.
Scope boundary
- This chapter does not claim an advantage without Simon's exact promise or ignore oracle construction.
- It does not substitute one lucky sample for the rank required to recover the hidden string.
Depth commitment. One promise, one quantum state derivation, one sample-rank analysis, and one solver.
Practice problem
For n=4 and hidden s=1010, reduce a supplied sample set over GF(2), identify whether rank is sufficient, and recover/verify s.
hidden candidate length n=4
sample rows y: 0100, 0001, 1010
Solve y dot s = 0 over GF(2), exclude s=0000, then verify f(x)=f(x xor s).
- Deliverable
- Row-reduction transcript, rank, nullspace vector, and two oracle collision checks.
- Pass condition
- The GF(2) solver reproduces the row operations and rejects any sample not orthogonal to 1010.
Verification record
Expected solution form. Binary Gaussian-elimination solution plus property-based oracle tests.
Model answer. The supplied rows have rank three. Their GF(2) nullspace is {0000,1010}; excluding zero yields s=1010. Every row has y dot s=0, and direct evaluation must still confirm f(x)=f(x xor 1010) on the supplied oracle fixture.
Model result and check. CI checks rank/nullspace, recovered period, and every supplied equation.
Acceptance test. The GF(2) solver reproduces the row operations and rejects any sample not orthogonal to 1010.
Companion work
Artifacts for this chapter
These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.
Reproduce or test
python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts
Provenance
Sources and review
- Daniel R. Simon. On the power of quantum computation. SIAM Journal on Computing. 1997primary paper
- Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing. 1997primary paper
- Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010textbook
- John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018graduate lecture notes
- John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018textbook
The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.