Documentation

CsdLean4.Empirical.QM.QEC.IndependentNoise

Empirical/QM: independent bit-flip noise on the three-qubit code, and its residual failure #

Category: 3-Local. QM-validity layer (matrix algebra over the K2 Channel layer; no CSD content). BACKLOG #52, the QM half.

SyndromeRecovery.lean corrects the single-error mixture ∑ₖ qₖ Eₖ ρ Eₖ exactly. The physical noise is different: each of the three qubits flips independently with probability p, so all eight flip patterns occur, the two- and three-flip patterns with total weight 3p² − 2p³, and those the code mis-corrects into the logical flip X̄ = X ⊗ X ⊗ X. This file states the channel and the exact outcome of syndrome recovery on it:

Empirical/CSD/QEC/IndependentNoiseFlow.lean reads the joint unitary as a Σ-flow.

Source #

Nielsen–Chuang §10.1.1 (the three-qubit bit-flip code, the 3p² − 2p³ failure probability).

Flip patterns, their operators and their weights #

@[reducible, inline]

A flip pattern: which of the three qubits flip (1) or not (0).

Equations
Instances For
    noncomputable def CSD.Empirical.QM.QEC.flipOp (x : FlipPattern) :
    Matrix (Fin 2 × Fin 2 × Fin 2) (Fin 2 × Fin 2 × Fin 2) ℂ

    The pattern error X^{x₁} ⊗ X^{x₂} ⊗ X^{x₃}.

    Equations
    Instances For
      noncomputable def CSD.Empirical.QM.QEC.bitWeight (p : ℝ) :
      Fin 2 → ℝ

      The weight of one qubit's outcome: 1 − p for no flip, p for a flip.

      Equations
      Instances For
        noncomputable def CSD.Empirical.QM.QEC.indepWeight (p : ℝ) (x : FlipPattern) :

        The weight of a pattern under independent flips: the product over the three qubits.

        Equations
        Instances For
          theorem CSD.Empirical.QM.QEC.bitWeight_nonneg {p : ℝ} (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (x : Fin 2) :
          theorem CSD.Empirical.QM.QEC.indepWeight_nonneg {p : ℝ} (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (x : FlipPattern) :

          The pattern weights sum to 1: ((1 − p) + p)³ = 1.

          The independent bit-flip channel #

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

          The independent bit-flip channel on the register: each qubit flips independently with probability p; ρ ↦ ∑ₓ w_p(x) Xˣ ρ Xˣ.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem CSD.Empirical.QM.QEC.indepFlipChannel_apply (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (ρ : Matrix (Fin 2 × Fin 2 × Fin 2) (Fin 2 × Fin 2 × Fin 2) ℂ) :
            (indepFlipChannel p hp0 hp1).apply ρ = ∑ x : FlipPattern, ↑(indepWeight p x) • (flipOp x * ρ * flipOp x)

            The logical flip, and how each pattern reads to the syndrome #

            noncomputable def CSD.Empirical.QM.QEC.logicalX :
            Matrix (Fin 2 × Fin 2 × Fin 2) (Fin 2 × Fin 2 × Fin 2) ℂ

            The logical bit-flip X̄ = X ⊗ X ⊗ X, which swaps |000⟩ and |111⟩.

            Equations
            Instances For

              The logical flip preserves the code space: X̄ P₀ = P₀ X̄.

              X̄ ρ X̄ is code-supported when ρ is.

              Every single error commutes with the logical flip.

              The number of flipped qubits in a pattern.

              Equations
              Instances For

                The single-error label the syndrome assigns to a pattern: the flipped qubit for weight one, the unflipped qubit for weight two (the code mis-corrects it), 0 for weights zero and three.

                Equations
                Instances For

                  How the syndrome reads a pattern: Xˣ = E_{k(x)} for weight ≤ 1 and Xˣ = E_{k(x)} X̄ for weight ≥ 2.

                  Recovery, pattern by pattern #

                  Recovery undoes any single error on a code-supported operator.

                  Recovery on one pattern: the input for weight ≤ 1, the logically flipped input for weight ≥ 2.

                  The failure probability #

                  noncomputable def CSD.Empirical.QM.QEC.failProb (p : ℝ) :

                  The logical failure probability of the three-qubit code under independent flips: 3p² − 2p³, the weight of the patterns with at least two flips.

                  Equations
                  Instances For
                    theorem CSD.Empirical.QM.QEC.failProb_lt_of_lt_half {p : ℝ} (hp0 : 0 < p) (hp : p < 1 / 2) :

                    The code helps exactly below p = 1/2: p_fail < p for 0 < p < 1/2.

                    theorem CSD.Empirical.QM.QEC.recoveryChannel_apply_indepFlipChannel_apply (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (ρ : Matrix (Fin 2 × Fin 2 × Fin 2) (Fin 2 × Fin 2 × Fin 2) ℂ) (hρ : codeProj * ρ * codeProj = ρ) :

                    ★★ Syndrome recovery on independent bit-flip noise, on the code: for every code-supported ρ (P₀ ρ P₀ = ρ), R (N_p ρ) = (1 − p_fail) ρ + p_fail X̄ ρ X̄ with p_fail = 3p² − 2p³ — the recovered state is the input with probability 1 − 3p² + 2p³ and the logically flipped input otherwise.