Selene · Runtime · Frontier03 / 13
← Frontier index
RuntimeVerified

Repetition-code error detection on the ancilla

Encode the parity ancilla as a 3-qubit repetition code; majority-vote on readout. Zero-noise baseline for a future noise model.

Results · real Selene shots

encoded_ancilla_verified

G6b applied the transversal fix the original verdict named (every data qubit drives every rail). 0/4800 disagreements; encoded-subspace share = 1.000 across all six slopes. Ready for a noise model.

encoded-subspace share (target = 1.000)1.0000
JSONsrc/data/demos/nadarasa_g6b.json

Why this matters

The parity ancilla in G2 is the most fragile qubit in the kernel — a single bit-flip rotates the entire window's contribution. A 3-qubit repetition code with classical majority is the simplest possible error-detection layer, and crucially it's free at zero noise (the majority always agrees with the bare ancilla). This gives us a baseline circuit ready for the day a noise model lands on Selene.

What the repo already has

Bare single-qubit parity ancilla in nadarasa_g2.py.

What's missing

Triple the ancilla; sandwich H/CX cleanly; majority-vote in the host post-processor.

Smallest experiment

Build it or kill it

Qubits

5 data + 3 ancilla (was 5 + 1)

Ancilla pattern

3-qubit GHZ-style encoded ancilla; all three measured; majority vote classically. Probe must be transversal across all three rails.

Shots

800 shots × 6 slopes (G6b: 4800 total).

Predicted outcome

Under zero noise, the per-shot majority bit equals the bare-ancilla bit on every shot — zero divergence. Triple (a0, a1, a2) lives entirely in {(0,0,0), (1,1,1)}.

Refutation criterion

If majority and bare ancilla disagree on any shot at zero noise, there is a kernel bug. The card is paused until the bug is found.

Kernel sketch

Untested — sketch only
@guppy
def encoded_parity_transversal() -> None:
    data = array_qubit(4)
    for q in data: h(q)
    a0, a1, a2 = qubit(), qubit(), qubit()
    h(a0); cx(a0, a1); cx(a0, a2)        # encode |+>_L = (|000> + |111>)/√2
    for j in range(4):
        # TRANSVERSAL: data qubit drives every rail (G6b fix)
        cx(data[j], a0); cx(data[j], a1); cx(data[j], a2)
    cx(a0, a2); cx(a0, a1); h(a0)
    result("a0", measure(a0)); result("a1", measure(a1)); result("a2", measure(a2))
    for j, q in enumerate(data):
        h(q); result(f"y{j}", measure(q))

Host pipeline

majority = round((a0 + a1 + a2) / 3); compare per-shot to a0 alone; aggregate over shots.

Related

Files in this repo

  • · quantum/nadarasa_g6.py
  • · quantum/nadarasa_g6_lib.py
  • · quantum/nadarasa_g6b.py
  • · src/data/demos/nadarasa_g6.json
  • · src/data/demos/nadarasa_g6b.json
  • · quantum/nadarasa_g2.py

More in Runtime

2 cards