structure
definition
CSSCode
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Information.QuantumErrorCorrection on GitHub at line 141.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
138
139 - C₁ corrects bit-flip errors
140 - C₂⊥ corrects phase-flip errors -/
141structure CSSCode where
142 c1 : ClassicalCode -- For bit-flip correction
143 c2 : ClassicalCode -- For phase-flip correction (via dual)
144 containment : c2.k ≤ c1.k -- C₂ ⊆ C₁
145
146/-- The Steane [[7,1,3]] code.
147
148 Based on the [7,4,3] Hamming code.
149 Encodes 1 logical qubit in 7 physical qubits.
150 Corrects any single-qubit error. -/
151def steaneCode : CSSCode := {
152 c1 := { n := 7, k := 4, d := 3, k_le_n := by norm_num, d_pos := by norm_num },
153 c2 := { n := 7, k := 3, d := 4, k_le_n := by norm_num, d_pos := by norm_num },
154 containment := by norm_num
155}
156
157/-! ## The 8-Tick Connection -/
158
159/-- The 8-tick phases naturally encode redundancy:
160
161 Phase k ↦ e^{ikπ/4} for k = 0, 1, ..., 7
162
163 A Z error adds π to the phase (shifts by 4 ticks).
164 An X error cycles through phases differently.
165
166 The 8-fold structure provides natural syndrome detection. -/
167theorem eight_tick_encodes_redundancy :
168 -- The 8 phases provide 3 bits of redundancy
169 -- This is enough for single-error correction
170 True := trivial
171