Modal-Projection
Commutativity
Single-coset readout for N ∈ {16, 32} and modal primes p ∈ {2, 3, 5}. v0.3 swaps the broken Hn + Z-basis readout for a real little-endian QFT (controlled-phase ladder + bit-reversal SWAPs). The Phase 3 live sampler caught the basis bug; this page now reports the corrected verdict.
Concentration on residue 0
Rows marked ✓ have p | N. SRP bar reaches 1.0 there; violating sits at uniform.
Results table (observed vs. closed form)
| N | p | p | N | SRP obs / pred | violating obs / pred | SRP − violating |
|---|---|---|---|---|---|
| 16 | 2 | yes | 1.000 / 1.000 | 0.511 / 0.500 | +0.489 |
| 16 | 3 | no | 0.506 / 0.500 | 0.749 / 0.750 | -0.242 |
| 16 | 5 | no | 0.501 / 0.500 | 0.612 / 0.625 | -0.111 |
| 32 | 2 | yes | 1.000 / 1.000 | 0.494 / 0.500 | +0.506 |
| 32 | 3 | no | 0.501 / 0.500 | 0.750 / 0.750 | -0.248 |
| 32 | 5 | no | 0.489 / 0.500 | 0.630 / 0.625 | -0.142 |
Refutation verdict
How the live sampler caught the wrong basis
The v0.1/v0.2 driver applied Hn + Z-basis readout and reported it as a "QFT-style readout". The Phase 3 in-Worker mini-sim made that claim cheap to test: the live histogram converged toward a Walsh–Hadamard distribution, which is NOT (1 + cos(2π s y / N)) / N. Once we ported a real QFT into both the Guppy lib (cphase_true_on + emitted bit-reversal CXs) and the mini-sim (cphaseTrue + qft), the observed distribution snapped to the analytic two-delta form within 0.013. The verdict sharpened in both directions.
Kernel snippet (v0.3)
open in Playpond ↗
from quantum.nadarasa_g1_lib import (
guppy, qubit, h, cx, measure, result,
cphase_true_on,
)
@guppy
def program() -> None:
lbl = qubit()
d0 = qubit()
d1 = qubit()
d2 = qubit()
d3 = qubit()
h(lbl)
h(d0)
h(d1)
h(d2)
h(d3)
cphase_true_on(lbl, d0, 0.25)
cphase_true_on(lbl, d1, 0.5)
cphase_true_on(lbl, d2, -1.0)
cphase_true_on(lbl, d3, 0.0)
h(lbl)
result("lbl", measure(lbl))
h(d3)
cphase_true_on(d2, d3, 0.5)
cphase_true_on(d1, d3, 0.25)
cphase_true_on(d0, d3, 0.125)
h(d2)
cphase_true_on(d1, d2, 0.5)
cphase_true_on(d0, d2, 0.25)
h(d1)
cphase_true_on(d0, d1, 0.5)
h(d0)
cx(d0, d3)
cx(d3, d0)
cx(d0, d3)
cx(d1, d2)
cx(d2, d1)
cx(d1, d2)
result("y0", measure(d0))
result("y1", measure(d1))
result("y2", measure(d2))
result("y3", measure(d3))