Documentation

QEC1.Definitions.Def_10_SpacetimeLogicalFault

Def_10: Spacetime Logical Fault #

Statement #

A spacetime logical fault is a collection of space-faults and time-faults that:

  1. Does not violate any detector (has empty syndrome), AND
  2. Causes a logical error, i.e., changes the outcome of the gauging measurement or introduces a logical Pauli error on the encoded quantum information.

A spacetime stabilizer is a collection of space-faults and time-faults that:

  1. Does not violate any detector (has empty syndrome), AND
  2. Does NOT affect the logical information or measurement outcome.

Every fault with empty syndrome is either a spacetime stabilizer (trivial) or a spacetime logical fault (non-trivial). The set of spacetime stabilizers forms a group, and two faults are equivalent if they differ by a spacetime stabilizer.

Main Definitions #

Key Properties #

Syndrome #

The syndrome of a spacetime fault is the set of detectors it violates.

def applyFaultToOutcomes {V : Type u_1} {E : Type u_2} {M : Type u_3} (baseOutcomes : OutcomeAssignment M) (fault : SpacetimeFault V E M) :

Apply a spacetime fault to measurement outcomes. Time-faults flip outcomes.

Equations
Instances For
    def computeSyndrome {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (fault : SpacetimeFault V E M) :

    Compute the syndrome of a spacetime fault given a detector collection. The syndrome is the set of detectors violated by the fault.

    Equations
    Instances For
      def inSyndrome {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (fault : SpacetimeFault V E M) (D : Detector V E M) :

      The syndrome as a predicate on detectors

      Equations
      Instances For
        def hasEmptySyndrome {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (fault : SpacetimeFault V E M) :

        A fault has empty syndrome if it violates no detectors

        Equations
        Instances For
          instance decHasEmptySyndrome {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (fault : SpacetimeFault V E M) :
          Decidable (hasEmptySyndrome DC baseOutcomes fault)
          Equations
          @[simp]
          theorem hasEmptySyndrome_iff {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (fault : SpacetimeFault V E M) :
          hasEmptySyndrome DC baseOutcomes fault DDC.detectors, D.isSatisfied (applyFaultToOutcomes baseOutcomes fault)

          Identity fault has empty syndrome #

          theorem identity_hasEmptySyndrome {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (h_base : DC.allSatisfied baseOutcomes) :
          hasEmptySyndrome DC baseOutcomes 1

          The identity fault has empty syndrome (in any fault-free base outcome setting)

          Logical Effect Predicate #

          To distinguish spacetime stabilizers from logical faults, we need a notion of "affecting logical information". We model this abstractly.

          def affectsLogicalInfo {V : Type u_1} {E : Type u_2} {M : Type u_3} (logicalEffect : SpacetimeFault V E MProp) (fault : SpacetimeFault V E M) :

          Abstract predicate: whether a fault affects the logical information. This captures:

          • Changes to the gauging measurement outcome
          • Introduction of logical Pauli errors on encoded qubits

          In practice, this is determined by the code structure and logical operators.

          Equations
          Instances For
            def preservesLogicalInfo {V : Type u_1} {E : Type u_2} {M : Type u_3} (logicalEffect : SpacetimeFault V E MProp) (fault : SpacetimeFault V E M) :

            The negation: fault does NOT affect logical info

            Equations
            Instances For

              Spacetime Stabilizers #

              Spacetime stabilizers are faults with empty syndrome that preserve logical information.

              structure IsSpacetimeStabilizer {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (fault : SpacetimeFault V E M) :

              A spacetime stabilizer: empty syndrome AND preserves logical information

              • emptySyndrome : hasEmptySyndrome DC baseOutcomes fault

                The fault has empty syndrome (violates no detectors)

              • preservesLogical : preservesLogicalInfo logicalEffect fault

                The fault preserves logical information

              Instances For
                def spacetimeStabilizerSet {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) :

                The set of spacetime stabilizers as a set

                Equations
                Instances For

                  Spacetime Logical Faults #

                  Spacetime logical faults are faults with empty syndrome that DO affect logical information.

                  structure IsSpacetimeLogicalFault {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (fault : SpacetimeFault V E M) :

                  A spacetime logical fault: empty syndrome AND affects logical information

                  • emptySyndrome : hasEmptySyndrome DC baseOutcomes fault

                    The fault has empty syndrome (violates no detectors)

                  • affectsLogical : affectsLogicalInfo logicalEffect fault

                    The fault DOES affect logical information

                  Instances For
                    def spacetimeLogicalFaultSet {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) :

                    The set of spacetime logical faults as a set

                    Equations
                    Instances For

                      Partition of Empty-Syndrome Faults #

                      Every fault with empty syndrome is either a stabilizer or a logical fault.

                      def emptySyndromeSet {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) :

                      The set of faults with empty syndrome

                      Equations
                      Instances For
                        theorem emptySyndrome_partition {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (f : SpacetimeFault V E M) (h_empty : hasEmptySyndrome DC baseOutcomes f) :
                        IsSpacetimeStabilizer DC baseOutcomes logicalEffect f IsSpacetimeLogicalFault DC baseOutcomes logicalEffect f

                        Stabilizers and logical faults partition the empty-syndrome faults

                        theorem stabilizer_logicalFault_disjoint {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (f : SpacetimeFault V E M) :
                        ¬(IsSpacetimeStabilizer DC baseOutcomes logicalEffect f IsSpacetimeLogicalFault DC baseOutcomes logicalEffect f)

                        Stabilizers and logical faults are disjoint

                        theorem stabilizer_logicalFault_union {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) :
                        spacetimeStabilizerSet DC baseOutcomes logicalEffect spacetimeLogicalFaultSet DC baseOutcomes logicalEffect = emptySyndromeSet DC baseOutcomes

                        Union of stabilizers and logical faults equals empty-syndrome set

                        Spacetime Stabilizers Form a Subgroup #

                        Under appropriate conditions on the logical effect predicate, spacetime stabilizers form a subgroup of all spacetime faults.

                        structure LogicalEffectIsGroupLike {V : Type u_1} {E : Type u_2} {M : Type u_3} (logicalEffect : SpacetimeFault V E MProp) :

                        Condition: logical effect is preserved under product (group-like)

                        • identity_preserves : ¬logicalEffect 1

                          Identity preserves logical info

                        • mul_preserves (f g : SpacetimeFault V E M) : ¬logicalEffect f¬logicalEffect g¬logicalEffect (f * g)

                          Product of two stabilizers is a stabilizer (closure under multiplication)

                        • inv_preserves (f : SpacetimeFault V E M) : ¬logicalEffect f¬logicalEffect f⁻¹

                          Inverse of a stabilizer is a stabilizer

                        Instances For
                          structure SyndromeIsGroupHomomorphism {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) :

                          Condition: syndrome computation respects the group structure

                          Instances For
                            def spacetimeStabilizerSubgroup {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (h_logical : LogicalEffectIsGroupLike logicalEffect) (h_syndrome : SyndromeIsGroupHomomorphism DC baseOutcomes) :

                            Spacetime stabilizers form a subgroup under the right conditions

                            Equations
                            Instances For

                              Fault Equivalence #

                              Two faults are equivalent if they differ by a spacetime stabilizer. This forms an equivalence relation.

                              def FaultEquivalent {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (f g : SpacetimeFault V E M) :

                              Two faults are equivalent if they differ by a spacetime stabilizer

                              Equations
                              Instances For
                                theorem faultEquivalent_refl {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (h_logical : LogicalEffectIsGroupLike logicalEffect) (h_syndrome : SyndromeIsGroupHomomorphism DC baseOutcomes) (f : SpacetimeFault V E M) :
                                FaultEquivalent DC baseOutcomes logicalEffect f f

                                Fault equivalence is reflexive

                                theorem faultEquivalent_symm {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (h_logical : LogicalEffectIsGroupLike logicalEffect) (h_syndrome : SyndromeIsGroupHomomorphism DC baseOutcomes) (f g : SpacetimeFault V E M) (h : FaultEquivalent DC baseOutcomes logicalEffect f g) :
                                FaultEquivalent DC baseOutcomes logicalEffect g f

                                Fault equivalence is symmetric

                                theorem faultEquivalent_trans {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (h_logical : LogicalEffectIsGroupLike logicalEffect) (h_syndrome : SyndromeIsGroupHomomorphism DC baseOutcomes) (f g k : SpacetimeFault V E M) (hfg : FaultEquivalent DC baseOutcomes logicalEffect f g) (hgk : FaultEquivalent DC baseOutcomes logicalEffect g k) :
                                FaultEquivalent DC baseOutcomes logicalEffect f k

                                Fault equivalence is transitive

                                theorem faultEquivalent_equivalence {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (h_logical : LogicalEffectIsGroupLike logicalEffect) (h_syndrome : SyndromeIsGroupHomomorphism DC baseOutcomes) :
                                Equivalence (FaultEquivalent DC baseOutcomes logicalEffect)

                                Fault equivalence is an equivalence relation

                                def faultSetoid {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (h_logical : LogicalEffectIsGroupLike logicalEffect) (h_syndrome : SyndromeIsGroupHomomorphism DC baseOutcomes) :

                                Fault equivalence as a Setoid

                                Equations
                                Instances For

                                  Equivalence Classes as Cosets #

                                  Fault equivalence classes correspond to cosets of the stabilizer subgroup.

                                  def FaultQuotient {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (h_logical : LogicalEffectIsGroupLike logicalEffect) (h_syndrome : SyndromeIsGroupHomomorphism DC baseOutcomes) :
                                  Type (max (max u_3 u_2) u_1)

                                  The quotient by fault equivalence is the quotient by the stabilizer subgroup

                                  Equations
                                  Instances For

                                    Characterization: Logical Fault iff Non-trivial Coset #

                                    A fault is a logical fault iff it represents a non-trivial coset in the quotient.

                                    theorem isLogicalFault_iff_not_stabilizer {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] [DecidableEq M] (DC : DetectorCollection V E M) (baseOutcomes : OutcomeAssignment M) (logicalEffect : SpacetimeFault V E MProp) (f : SpacetimeFault V E M) (h_empty : hasEmptySyndrome DC baseOutcomes f) :
                                    IsSpacetimeLogicalFault DC baseOutcomes logicalEffect f ¬IsSpacetimeStabilizer DC baseOutcomes logicalEffect f

                                    A fault with empty syndrome is a spacetime logical fault iff it's NOT a stabilizer

                                    Summary #

                                    This formalization captures:

                                    1. Syndrome: The set of detectors violated by a fault.

                                    2. Spacetime Stabilizers: Faults with empty syndrome that preserve logical information. These form a subgroup under appropriate conditions.

                                    3. Spacetime Logical Faults: Faults with empty syndrome that DO affect logical information.

                                    4. Partition: Every empty-syndrome fault is either a stabilizer or a logical fault.

                                    5. Fault Equivalence: Two faults are equivalent if they differ by a stabilizer. This is an equivalence relation.