Repository navigation
Exact output sampling from projected quantum gaps #2102
Description
Prove that the exact quantum probability simulator also yields a classical sampler for the entire joint output distribution, with the same gate-count time bound and polynomial space.
Status: available for implementation. Requested by Samuel. Build on merged #2072 and the projected-probability interface under development in #2094; coordinate changes to that interface with its owner. Related quantum track: #896.
Target
Given an explicitly described, well-formed circuit over Hadamard, NOT, CNOT and Toffoli gates and an explicit computational-basis input register, let:
-
$L$ be the number of gates and$h$ the number of Hadamards; -
$N$ be the total encoded length of the gate list and the explicit input register, including the width/output-length cost.
Construct a uniform
The intended randomness guarantee is exactly
Proof approach
Use a fixed order on the output wires touched by gates. For a prefix
Prove
Maintain
For the quantitative argument:
- At most
$3L$ wires are touched. Insert all untouched output bits deterministically from the input register. - Express arbitrary zero/one prefix events using Quantum time classes NQTIME, EQTIME and PostBQTIME in DTIME[2^O(T/√log T)] by exact gap contraction #2094's projected probabilities; terminal NOT gates on the prefix-zero wires preserve the Hadamard count.
- Each query therefore has
$O(L)$ gates, and there are$O(L)$ queries. Sequential contractions reuse polynomial workspace and preserve the exponential factor. - Encode ranks and masses in binary. Include prefix construction, integer arithmetic, decoding and output writing in the machine bound.
This construction uses integer interval decoding with no rejection loop.
Completion
- Exact projected-prefix masses and their partition identities, reusing the shared quantum definitions.
- A general rank-decoder theorem with exact preimage cardinalities.
- Equality with the existing quantum measurement PMF for the complete output register.
- A native implementation/resource certificate for the seed and decoder, establishing worst-case time and simultaneous polynomial space.
- Meaningful checked examples: a Hadamard, a Bell pair, two successive Hadamards (destructive interference), no gates, and a register with many untouched wires.
- Documentation of the model, encoding, randomness guarantee and attribution; normal repository validation and independent correctness/API review before integration.
This issue concerns computational-basis inputs and final computational-basis measurement in the current gate set. Clifford+T, adaptive measurements and broader time-uniform families are separate follow-ups.
The counting/contraction engine is inherited from #2072, which attributes it to [OpenAI2026ETH], Theorem D.1. This issue proposes a formal sampling consequence and makes no priority claim.
Assisted by ChatGPT.
Activity
SamuelSchlesinger commentedon Nov 1, 2026
Active: worker
chatgpt-quantum-sampling-2102is implementing this at Samuel's request oncodex/quantum-exact-sampling-2102. #2072 and #2099 are merged, so the implementation will reuse the projected-gap API on main. The work covers the integer-rank decoder, its equality with the final quantum measurement distribution, and the native time/space certificate for successive prefix queries. Assisted by ChatGPT.SamuelSchlesinger commentedon Nov 1, 2026
Implemented in #2113, now ready for review at
37957e3da9eb9b99dad8a9e68929bf8b0ef2123e.The implementation proves the exact full output PMF, supplies the native h-bit seed generator and deterministic rank decoder, and establishes worst-case time
poly(N) * 2^O((L+1)/sqrt(log(L+2)))with simultaneous polynomial space, measured in the original input size. It samples only distinct gate targets, so at most L prefix queries are needed. All requested circuit examples are checked, including Bell correlations, HH interference, no gates, and untouched output wires.All six required CI gates pass on the final revision, and a separate non-authoring agent completed correctness/API review with no blocking findings. The PR contains the scoped review and validation record.
Assisted by ChatGPT.