Documentation

CsdLean4.Empirical.CSD.QEC.ThreeQubit

Empirical/CSD: the three-qubit bit-flip code (CSD-side reading) #

Category: 3-Local (CSD-side companion to Empirical/QM/QEC/ThreeQubit.lean).

Pairs with the QM-validity bit-flip code (Shor 1995). The QM file proves error correction as pure matrix algebra: stabilisers fix the codespace, the discretised Pauli errors give distinct syndromes, and each X is self-inverse (recovery). This file states the CSD reading and, since 2026-09-11, proves its two ontic halves (the error channel from a Σ-flow; the code and error regions of Σ). The ontic content is subtler than "a flow off the codespace", and getting it right is what makes QEC the corpus's sharpest pointer at the dynamics layer.

So the honest ontic statement of QEC needs the environment Σ_env, the joint flow, and partial trace. Since 2026-09-11 (W6, W11) that is what this module has, in two pieces:

The joint flow on the three-qubit register ⊗ environment, and QEC on Σ end to end, are Empirical/CSD/QEC/RegisterFlow.lean (2026-09-12): registerFlow on ℂℙ³¹ produces the register's single-error channel as its environment marginal, and the syndrome-conditioned recovery returns every code-region preparation's density operator from it (registerFlow_recovery). The independent-noise channel (bit-flip_p)^{⊗3} itself, with its 3p² − 2p³ residual failure, is Empirical/CSD/QEC/IndependentNoiseFlow.lean (indepFlow_recovery, 2026-09-21). The LF5/SyndromeFlow.lean tranche carries the coherent-error syndrome flow.

Source #

Shor 1995, Phys. Rev. A 52, R2493 (the bit-flip half of the 9-qubit code).

The bit-flip channel produced by a Σ-flow #

theorem CSD.Empirical.CSDBridge.QEC.bitFlipChannel_traceRight_barycenter_flow {SigmaSpace : Type u_1} {P : Type u_2} {G : Type u_3} [MeasurableSpace SigmaSpace] [Nonempty SigmaSpace] [MeasurableSpace P] [Group G] [MulAction G SigmaSpace] [MulAction G P] [MulAction.IsPretransitive G P] (D : LF2.SectorData SigmaSpace P G) (μprep : MeasureTheory.Measure SigmaSpace) [MeasureTheory.IsProbabilityMeasure μprep] (Φ : SigmaSpace → SigmaSpace) (hΦ : Measurable Φ) (rep : P → EuclideanSpace ℂ (Fin 2 × Fin 2)) (hrep_unit : ∀ (p : P), ‖rep p‖ = 1) (hrep_meas : Measurable rep) (repS : P → EuclideanSpace ℂ (Fin 2)) (hrepS_meas : Measurable repS) (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (hlift : LF2.IsUnitaryLift D Φ rep (QM.QEC.bitFlipUnitary p)) (hprod : ∀ᵐ (x : SigmaSpace) ∂μprep, LF2.outerProduct (rep (D.π x)) = Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) (LF2.outerProduct (repS (D.π x))) (LF2.outerProduct (EuclideanSpace.single 0 1))) :

★★ The bit-flip channel is produced by a Σ-flow. On a joint sector (system qubit ⊗ environment qubit), for a preparation that is a product with the environment ready and an ontic flow lifting the bit-flip joint unitary U_p, the reduced density operator of the flowed preparation is the bit-flip channel applied to the system's density operator.

The concrete flow: the bit-flip unitary acting on ℂℙ³ #

noncomputable def CSD.Empirical.CSDBridge.QEC.bitFlipU4 (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) :

The bit-flip joint unitary as an element of U(4), reindexed to Fin 4.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    noncomputable def CSD.Empirical.CSDBridge.QEC.bitFlipFlow (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) :

    The bit-flip de-isolation flow on the joint projective space ℂℙ³: the projective action of U_p. This is a flow of the corpus's cpSectorData (Σ = P = ℂℙ³, π = id).

    Equations
    Instances For

      The joint representative: the canonical unit section of ℂℙ³, transported to Fin 2 × Fin 2.

      Equations
      Instances For

        ★ The bit-flip flow lifts U_p, with no hypotheses: cpSectorData's projection is the identity and the flow is the projective action of the reindexed unitary.

        ★★ On ℂℙ³ the bit-flip channel is the environment marginal of bitFlipFlow, with no lift hypothesis. For any preparation on the joint projective space that is a product with the environment ready (a.e., in the canonical representative), the reduced density operator of the flowed preparation is the bit-flip channel applied to the system's density operator.

        The code space as a region of Σ, and the error regions #

        The code region: the rays of the codespace {a|000⟩ + b|111⟩} in the projective space of the three-qubit register — the sub-surface ℂℙ¹ ⊂ ℂℙ⁷ of Σ.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          The error region of error k: the image of the code region under the error Eₖ.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            ★★ The four error regions are pairwise disjoint. Two errored codewords on one ray would share their stabiliser eigenvalues, hence their syndromes, hence their error index. This is the identifiability of the syndrome read as a partition of Σ: the syndrome measurement is the ontic selection of which of the four disjoint regions the trajectory occupies.

            ★ The syndrome projectors are the indicator of the error regions. Every point of the k-th error region has a representative fixed by the k-th syndrome projector and annihilated by every other: the projective measurement {Pₖ} of QM/QEC/SyndromeRecovery.lean reads off which of the four disjoint regions of Σ the trajectory occupies.

            Recovery returns to the code region: re-applying the identified error sends every point of its error region back into the code region (each Xⱼ is self-inverse).

            ★★ The three-qubit bit-flip code corrects any single bit-flip, in the CSD reading. The QM-side correction theorem (stabilisers fix the codespace, the four syndromes are distinct, each Xⱼ is self-inverse), together with its Σ-reading: the four error regions of Σ are pairwise disjoint (the syndrome is a partition of Σ), and recovery returns each error region to the code region. The error channel itself is produced by a Σ-flow (bitFlipFlow_traceRight_barycenter). No bundle is carried: every conjunct is proved.