Notes · v0.3
The basis bug and the fix
Short post-mortem on what changed between v0.2 and v0.3 of the Nadarasa Reduction. Audience: anyone deciding whether to cite v0.2 or wait. tl;dr — don't cite v0.2.
What v0.2 claimed
[GAP G1] tested the SRP "modal projection" claim by running a coset-state circuit on Selene and measuring residue concentration mod p. The v0.2 driver applied H^n followed by a Z-basis measurement and the docstring said the output should match (1 + cos(2π s y / N)) / N — the Fourier-basis distribution. The verdict was tension_with_g1: observed minus predicted hovered around 0.4 across the grid.
What was wrong
H^n is the Walsh–Hadamard transform, not the QFT. The two agree only for N = 2. The docstring's analytic was correct for the circuit it described; the circuit was not the one the docstring described. The "tension" was the predictor disagreeing with itself, dressed up as a refutation signal.
How the live sampler caught it
Phase 3 of the v0.3 cycle extended the in-Worker mini-sim (src/lib/selene/mini-sim.ts) into a live SSE shot stream at /nadarasa/stream. The intent was a UX demo. What it actually did: render the empirical histogram next to the docstring's analytic in real time. They diverged by ~0.4 on the first run. Because the mini-sim is gate-faithful — it executes exactly the lines emitted by the Guppy kernel — the disagreement could only be basis. Twenty minutes of derivation later it was: the kernel was emitting Walsh–Hadamard, the predictor assumed Fourier.
The fix
Two pieces. (1) A real little-endian QFT in Guppy: emit_qft_lines in quantum/nadarasa_g1_lib.py emits the controlled-phase ladder plus bit-reversal SWAPs (each SWAP as a triple-CX, since Selene has no native SWAP). The controlled phase itself is the Rz–Rz–CX–Rz–CX identity in cphase_true_on. (2) The same primitives in TypeScript at src/lib/selene/kernels/nadarasa-g1.ts so the live sampler runs the same circuit the host does.
With the real QFT, the closed form for a single coset is two delta peaks:P(y | s) = (1/2)[δ(y, 0) + δ(y, (N − s) mod N)]. Empirically: SRP concentration on residue 0 is 1.000 when p | N (both peaks land on 0) and 0.500 otherwise. The corrected verdict is modal_projector_works_when_p_divides_N.
Methodology rule added in v0.3
Derive the predictor from the gates that execute, not from the kernel's docstring. The live sampler is the cheapest enforcement: if the empirical histogram disagrees with the analytic by more than shot noise and the kernel compiles, the docstring is lying. This is now a reference entry in the Quantinuum skill at .agents/skills/quantinuum/references/live-sampler.md.
G2 collateral damage
While fixing G1 we re-derived the G2 predictor from the gates as well, per the new rule. The G2 kernel never couples data qubits — single-qubit Rz on |+⟩^n plus parity probes — so the Z-basis distribution is uniform 1/N by construction. Selene shots confirm: max SRP-vs-violating gap ≈ 0.0006 across N ∈ {16, 32, 64} × k ∈ {1, 2, 4}. v0.2 had been reading shot-noise as signal. The v0.3 verdict is kernel_cannot_test_g2: the conjecture is neither supported nor refuted, because the kernel can't probe it. A coherent two-coset combiner is the next G2 work item.
v0.3.1 patch — G2 Track B kernel ships
The "coherent two-coset combiner is the next G2 work item" promise from v0.3 is now landed. New driver quantum/nadarasa_g2_real.py and lib quantum/nadarasa_g2_real_lib.py build a real two-coset combination with two label qubits, two cphase ladders, and a CX(lbl0, lbl1) + H(lbl1) + measure glue step before a real-QFT readout. The closed form, derived from the gates per the v0.3 methodology rule, is four delta peaks at y ∈ {0, N−s0, N−s1, N−s0−s1}.
Selene shots at N ∈ {16, 32} × p ∈ {2, 3, 5} land within |Δ| ≤ 0.016 of the predictor. When p | N, SRP slope pairs concentrate to 1.0 on residue 0 while violating pairs sit at 0.5 — measured gap +0.485, predicted +0.500. The GAP G2 verdict moves from kernel_cannot_test_g2 to empirically_consistent_two_coset: the conjecture is now testable at toy scale and survived the first test.
v0.3.2 patch — G3 per-window cost at scale
New driver quantum/nadarasa_g3_cost.py takes the legacy G3 windowed sampler to N ∈ {16, 32, 64, 128} × p ∈ {2, 3, 5, 7} and asks which closed-form scaling keeps the ratio measured / predicted flat as N grows: the SRP improvement √(N/p) or the naive birthday curve √N.
Neither. Measured first-collision queries stay flat at ~2.2–3.1 across the full grid while both predictors grow. The cause is structural: after the modal projection y mod p == 0, the post-selected stream lives on 2–3 distinct y-values per slope regardless of N, so the Birthday count floors at ~2 picks. The per-rung Birthday-on-y surrogate is the wrong knob. GAP G3 stays at empirically_under_pressure_naive_birthday pending author review; the next G3 work item is a kernel whose modal window actually grows with N. See /nadarasa/g3-cost.
v0.3.3 patch — PQP alignment (D → F → A → B → C)
Whole-book read of Coecke & Kissinger, Picturing Quantum Processes, digested at quantum/PQP_DIGEST.md. Five frontend/data artifacts land the alignment without touching kernels:
- D · Citations:
src/data/nadarasa/methodology-citations.tsanchors the v0.3 "predictor from gates" rule in Eq. 6.4 (doubling-Born), Cor. 8.35 (spider fusion), Thm 8.41 (dodo), Thm 9.128 + JPV/Ng–Wang (ZX completeness), and Ch. 13 (resource gaps). - F · Vocabulary: /notes/pqp-vocabulary maps homemade terms (modal projector, SRP, per-window cost) to standard PQP language. The "modal projector" is a classical post-selection on a bastard-spider output (Ch. 8 §8.3.3 + §8.4) — no new named primitive needed.
- A · G3 split: /nadarasa/g3-split retires the single legacy G3 entry into
G3-grover(amplitude-amplification √-cost) andG3-hsp(Abelian HSP log-cost). PQP Ch. 12 §12.2.3 vs §12.2.4 + Ex. 12.22 forces the disambiguation. - B · G13 fingerprint: /nadarasa/g13 applies PQP Thm 11.12 (Z₄-in-phase-group litmus) to G1 / G2-real / G12 phase sets. The QFT cphase ladder forces Z₄ from
n ≥ 3, so all kernels read as quantum-like. - C · Resource monotones: /nadarasa/resources ships gate-derived spider count, T-count upper bound, CX and cphase counts per kernel — local additive monotones per Ch. 13. Certifies G2-real strictly above G1/G12/G3-cost on every monotone for
n ≥ 3.
Step E (PyZX / quizx adoption for §14.3-style conjecture synthesis) remains scoped, not implemented.
What this means for citation
Cite v0.3. If you cited v0.2, the G1 row of your GAP table is wrong and the "tension" framing was an artifact. The /cite page now lists separate DOIs (placeholders pending Zenodo) for v0.2 (superseded) and v0.3 (current) so the lineage stays machine-readable.
v0.3.4 · Selene-proved rules & conjectures
The Synesthete's PQP Frontier (Tracks 2 + 4) was shipped as a browser-only matrix oracle. v0.3.4 promotes both to shot-based equivalence proofs on the Selene emulator. Each claim now has a compiled @guppy kernel pair and a 6×3 tomography grid backing it.
- Rules: 5/5 of the bastard rewriter's rules (F, I, HH, CC, B) PASS on Selene. The B rule runs Z-basis only — it's a classical post-measurement identity, by design. /nadarasa/proofs/rules.
- Conjectures: 11/11 of the Track-4 conjectures (matrix-equal sequences the rewriter can't reduce) PASS — confirming the bastard rewriter has 11 genuine completeness gaps in the {H,S,T} fragment up to length 5, not a TS-oracle bug. /nadarasa/proofs/conjectures.
- Harness:
quantum/pqp_frontier/— shared tomography pipeline (tomography.py) that compiles 36 single-qubit Guppy kernels per pair (18 cells × 2 sides) and verdicts at the 4σ shot-noise band on the difference of binomials.