Draft · v0.2 · Unreviewed
← Index/Project · Nadarasa ReductionDraft · v0.2 · Selene Emulator
Selene · Runtime · Frontier card → /selene-frontier/qubit-recycling

[G5] Qubit
recycling

Same parity-probe windows as G2 at N = 32, k ∈ {1, 2, 4}, but each window allocates its ancilla via qubit(), measures it, and the runtime is told it only has n + 1 = 6 qubits to play with — regardless of how many windows we ask for.

Verdict

Recycling verified
Selene ran every (k, slope) combination with n_qubits = 6, no qubit-budget errors. Mean collision-probability tracks the G2 reference at each k to within 0.0014 (Monte-Carlo wiggle threshold 0.05). The same logical schedule that holds n + k qubits live in the naive G2 driver runs inn + 1 here.

Per-k results

kn_qubits (passed)mean collisionG2 referenceΔ vs G2elapsed (s)
160.03380.0323+0.00145.31
260.03370.0327+0.00114.53
460.03340.0323+0.00115.05

Kernel snippet (N = 32, k = 4)

open in Playpond ↗

from quantum.nadarasa_g5_lib import (
    guppy, qubit, h, measure, result, probe_one, phase_on,
)

@guppy
def program() -> None:
    d0 = qubit()
    d1 = qubit()
    d2 = qubit()
    d3 = qubit()
    d4 = qubit()
    h(d0)
    h(d1)
    h(d2)
    h(d3)
    h(d4)
    phase_on(d0, 0.39269908169872414)
    phase_on(d1, 0.7853981633974483)
    phase_on(d2, 1.5707963267948966)
    phase_on(d3, -3.141592653589793)
    phase_on(d4, 0.0)
    a0 = qubit()
    h(a0)
    probe_one(a0, d0)
    probe_one(a0, d1)
    h(a0)
    result("w0", measure(a0))
    a1 = qubit()
    h(a1)
    probe_one(a1, d2)
    probe_one(a1, d3)
    h(a1)
    result("w1", measure(a1))
    a2 = qubit()
    h(a2)
    probe_one(a2, d4)
    h(a2)
    result("w2", measure(a2))
    a3 = qubit()
    h(a3)
    h(a3)
    result("w3", measure(a3))
    result("x0", measure(d0))
    result("x1", measure(d1))
    result("x2", measure(d2))
    result("x3", measure(d3))
    result("x4", measure(d4))

Each window allocates a fresh a_w = qubit(); the slot is released by measure(a_w) before the next window allocates. Selene sees the recycling and the program fits in n + 1 = 6 live qubits.