Steane's 7-Qubit Code
Overview
Steane's code is a [[7,1,3]] quantum error correcting code, meaning it encodes 1 logical qubit into 7 physical qubits with distance 3. It's more efficient than Shor's 9-qubit code and has elegant mathematical structure.
CSS Codes
Steane's code is a CSS code (Calderbank-Shor-Steane), built from two classical codes:
- X stabilizers from classical code C₁
- Z stabilizers from classical code C₂ ⊆ C₁
Here, both are based on the [7,4,3] Hamming code.
Code Properties
| Property | Value |
|---|---|
| Notation | [[7,1,3]] |
| Physical qubits | 7 |
| Logical qubits | 1 |
| Distance | 3 |
| Correctable errors | 1 |
| Rate | 1/7 ≈ 0.143 |
Stabilizers
X Stabilizers (detect Z errors)
- X₀X₂X₄X₆
- X₁X₂X₅X₆
- X₃X₄X₅X₆
Z Stabilizers (detect X errors)
- Z₀Z₂Z₄Z₆
- Z₁Z₂Z₅Z₆
- Z₃Z₄Z₅Z₆
Logical Operators
- X_L: X₀X₁X₂X₃X₄X₅X₆ (all X)
- Z_L: Z₀Z₁Z₂Z₃Z₄Z₅Z₆ (all Z)
The Encoding Circuit
CODE┌───┐ q_0: ┤ H ├──■────■───────■── ├───┤ │ │ │ q_1: ┤ H ├──┼────┼────■──┼── ├───┤ │ │ │ │ q_2: ┤ H ├──┼────┼────┼──┼── └───┘┌─┴─┐ │ ┌─┴─┐│ q_3: ─────┤ X ├──┼──┤ X ├┼── └───┘┌─┴─┐└───┘│ q_4: ──────────┤ X ├─────┼── └───┘ ┌─┴─┐ q_5: ──────────────────┤ X ├ └───┘ q_6: [connected to q0,q1,q2]
Running the Circuit
PYTHONfrom circuit import run_circuit # No error result = run_circuit() print(f"Success: {result['success_rate']:.2%}") # X error on qubit 3 result = run_circuit(error_type='X', error_qubit=3) print(f"After correction: {result['success_rate']:.2%}")
Syndrome Interpretation
| Z Syndrome | X Error Location |
|---|---|
| 000 | No error |
| 001 | Qubit 0 |
| 010 | Qubit 1 |
| 011 | Qubit 2 |
| 100 | Qubit 3 |
| 101 | Qubit 4 |
| 110 | Qubit 5 |
| 111 | Qubit 6 |
(Similar table for X syndrome → Z error)
Comparison with Shor Code
| Feature | Shor | Steane |
|---|---|---|
| Qubits | 9 | 7 |
| Rate | 1/9 | 1/7 |
| Structure | Concatenated | CSS |
| Syndrome qubits | 8 | 6 |
Transversal Gates
Steane code supports transversal:
- X, Y, Z gates
- H gate
- CNOT gate
- S gate
This makes it attractive for fault-tolerant computation.