Bacon-Shor Subsystem Code

The Bacon-Shor [[9,1,3]] code is a subsystem code on a 3×3 qubit grid. Unlike stabilizer codes, it uses gauge operators — the logical qubit is encoded in the gauge-invariant subspace, simplifying syndrome measurement while correcting any single-qubit error.

Error Injection

Click a qubit on the grid to inject an error

Syndrome: all clear ✓
Gauge X: G^X_{ij} = X_{i,j}X_{i,j+1}
Gauge Z: G^Z_{ij} = Z_{i,j}Z_{i+1,j}
Logical X̄ = X_{0,0}X_{1,0}X_{2,0}
Logical Z̄ = Z_{0,0}Z_{0,1}Z_{0,2}
Stabilizers = products of gauges
S^X_i = ∏_j G^X_{ij}, S^Z_j = ∏_i G^Z_{ij}
Clean
X error
Z error
Y error

Code Structure

• 3×3 = 9 physical qubits
• 1 logical qubit encoded
• 4 gauge X + 4 gauge Z (8 gauge ops)
• 2 X-stabs + 2 Z-stabs (4 stabilizers)
• Distance d=3: corrects 1 error
• Subsystem: measure gauges, not stabs