Preparing the catalog and filters…Katalog ve filtreler hazırlanıyor…
Starter code
module qec_repetition_25;
@target("browser-stabilizer");
fn main() {
let q: QReg<25> = qreg[25];
X(q[6]);
let s5: Bit = syndrome Z(q[5]) Z(q[6]);
let s6: Bit = syndrome Z(q[6]) Z(q[7]);
let middleError: Bit = s5 and s6;
if (middleError == 1) {
X(q[6]);
}
assert probability(|0000000000000000000000000>) > 0.99;
return (s5, s6, middleError);
}Expected output
Output reports the stabilizer tableau engine
The two neighboring parity checks around q[6] return syndrome bit 1
middleError becomes 1 and applies the correction
The final probability assertion passes without allocating a 2^25 state vector
Debugging checklist
Run the starter code and find the syndrome lines for s5 and s6
Confirm middleError is computed from the two neighboring syndrome bits
Move the injected X error to q[7] and update the checked pair
Open the timeline and find the syndrome phase entries
Explain why a repetition code detects bit-flip errors with adjacent Z parity checks
Extension challenge
Expand the starter to all 12 adjacent parity checks and use marker qubits q[13]..q[24] to visualize the syndrome pattern.