Draft · v0.2 · Unreviewed
← Index/Project · Nadarasa ReductionDraft · v0.2 · Selene Emulator
Draft v0.3 · Section 4 · [GAP G1] · Selene Emulator · real QFT

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.

Closed form · P(y | s) = (1/2)[δy, 0 + δy, (N − s) mod N]. Two delta peaks of mass 1/2 each. Concentration on (y mod p = 0) is C(s, p) = 1/2 + 1/2 · 𝟙{s ≡ N mod p}. When p | N the SRP branch concentrates perfectly (1.0) and violating sits at uniform. When p ∤ N the violating branch can EXCEED the SRP branch.

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)

Npp | NSRP obs / predviolating obs / predSRP − violating
162yes1.000 / 1.0000.511 / 0.500+0.489
163no0.506 / 0.5000.749 / 0.750-0.242
165no0.501 / 0.5000.612 / 0.625-0.111
322yes1.000 / 1.0000.494 / 0.500+0.506
323no0.501 / 0.5000.750 / 0.750-0.248
325no0.489 / 0.5000.630 / 0.625-0.142

Refutation verdict

modal projector works when p divides N
Worst |observed − predicted| = 0.0133 (kernel matches the two-delta closed form). Minimum SRP − violating gap, when p | N: 0.489 — perfect projector with no measurable error. When p ∤ N: -0.248 — violating concentrates MORE than SRP, so the projector cannot be used outside the p | N regime without a separate filtering step.

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))