Documentation

QEC1.Definitions.Def_7_SpaceAndTimeFaults

Def_7: Space and Time Faults #

Statement #

In the context of fault-tolerant implementation of the gauging measurement procedure:

Space-fault: A Pauli error operator (single-qubit X, Y, or Z error) that occurs on some qubit at some time during the procedure. Space-faults are characterized by the qubit affected and the time of occurrence.

Time-fault (measurement error): An error where the result of a quantum measurement is reported incorrectly. The actual measurement projects onto an eigenspace, but the classical outcome is flipped. Time-faults are characterized by the measurement affected and the time step.

State initialization fault: Treated as equivalent to a time-fault. A faulty initialization of state |ψ⟩ is modeled as perfect initialization followed by an immediate space-fault.

Spacetime fault: A collection of space-faults and time-faults occurring at various locations and times during the procedure. The set of all spacetime faults forms a group under composition.

Main Definitions #

Key Properties #

Time Steps #

We model time discretely. Each round of the procedure corresponds to a time step. Time steps are indexed by natural numbers.

@[reducible, inline]
abbrev TimeStep :

A time step in the fault-tolerant procedure. Time 0 is the start, and time increases with each round.

Equations
Instances For

    Pauli Error Types #

    A single-qubit Pauli error can be X, Y, or Z. We also include Identity (I) for completeness, representing "no error".

    inductive PauliType :

    The four single-qubit Pauli operators

    Instances For
      Equations

      Pauli operators are self-inverse (up to phase)

      Equations
      Instances For

        Identity element

        Equations
        @[simp]
        @[simp]
        theorem PauliType.mul_I (p : PauliType) :
        p * I = p
        @[simp]
        theorem PauliType.I_mul (p : PauliType) :
        I * p = p
        @[simp]
        theorem PauliType.mul_self (p : PauliType) :
        p * p = I
        @[simp]
        theorem PauliType.mul_assoc (a b c : PauliType) :
        a * b * c = a * (b * c)

        Pauli multiplication is associative

        Pauli inverses work correctly

        PauliType forms a group

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

        Check if a Pauli type represents an actual error (not identity)

        Equations
        Instances For

          Qubit Index Type #

          Qubits are indexed by some type. In the gauging context, we have:

          inductive QubitLoc (V : Type u_1) (E : Type u_2) :
          Type (max u_1 u_2)

          A qubit location in the system. Can be a vertex qubit or an edge qubit.

          Instances For
            def instDecidableEqQubitLoc.decEq {V✝ : Type u_1} {E✝ : Type u_2} [DecidableEq V✝] [DecidableEq E✝] (x✝ x✝¹ : QubitLoc V✝ E✝) :
            Decidable (x✝ = x✝¹)
            Equations
            Instances For
              def QubitLoc.isVertex {V : Type u_1} {E : Type u_2} :
              QubitLoc V EBool

              Check if a location is a vertex qubit

              Equations
              Instances For
                def QubitLoc.isEdge {V : Type u_1} {E : Type u_2} :
                QubitLoc V EBool

                Check if a location is an edge qubit

                Equations
                Instances For
                  @[simp]
                  theorem QubitLoc.isVertex_vertex {V : Type u_1} {E : Type u_2} (v : V) :
                  @[simp]
                  theorem QubitLoc.isVertex_edge {V : Type u_1} {E : Type u_2} (e : E) :
                  @[simp]
                  theorem QubitLoc.isEdge_vertex {V : Type u_1} {E : Type u_2} (v : V) :
                  @[simp]
                  theorem QubitLoc.isEdge_edge {V : Type u_1} {E : Type u_2} (e : E) :
                  def QubitLoc.getVertex {V : Type u_1} {E : Type u_2} :
                  QubitLoc V EOption V

                  Extract the vertex index if this is a vertex qubit

                  Equations
                  Instances For
                    def QubitLoc.getEdge {V : Type u_1} {E : Type u_2} :
                    QubitLoc V EOption E

                    Extract the edge index if this is an edge qubit

                    Equations
                    Instances For
                      instance QubitLoc.instFintype {V : Type u_1} {E : Type u_2} [Fintype V] [Fintype E] :
                      Equations
                      • One or more equations did not get rendered due to their size.
                      @[simp]

                      Measurement Index Type #

                      Measurements are indexed by type M. Each measurement corresponds to measuring some check operator (Gauss law A_v, flux B_p, or original stabilizer s_j).

                      @[reducible, inline]
                      abbrev MeasurementIdx (M : Type u_1) :
                      Type u_1

                      A measurement index. This identifies which measurement is being referred to.

                      Equations
                      Instances For

                        Space-Faults #

                        A space-fault is a single-qubit Pauli error occurring on a specific qubit at a specific time.

                        structure SpaceFault (V : Type u_1) (E : Type u_2) :
                        Type (max u_1 u_2)

                        A space-fault: a Pauli error on a specific qubit at a specific time. The error pauliType occurs on qubit qubit at time time.

                        • qubit : QubitLoc V E

                          The qubit where the error occurs

                        • time : TimeStep

                          The time step when the error occurs

                        • pauliType : PauliType

                          The type of Pauli error (X, Y, Z, or I for no error)

                        Instances For
                          def instDecidableEqSpaceFault.decEq {V✝ : Type u_1} {E✝ : Type u_2} [DecidableEq V✝] [DecidableEq E✝] (x✝ x✝¹ : SpaceFault V✝ E✝) :
                          Decidable (x✝ = x✝¹)
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def SpaceFault.identity {V : Type u_1} {E : Type u_2} (q : QubitLoc V E) (t : TimeStep) :

                            The identity space-fault at a given location and time (no error)

                            Equations
                            Instances For
                              def SpaceFault.isActualError {V : Type u_1} {E : Type u_2} (f : SpaceFault V E) :

                              Check if this space-fault represents an actual error

                              Equations
                              Instances For
                                @[simp]
                                theorem SpaceFault.isActualError_identity {V : Type u_1} {E : Type u_2} (q : QubitLoc V E) (t : TimeStep) :
                                def SpaceFault.compose {V : Type u_1} {E : Type u_2} (f g : SpaceFault V E) (_h_qubit : f.qubit = g.qubit) (_h_time : f.time = g.time) :

                                Compose two space-faults at the same location and time

                                Equations
                                Instances For
                                  def SpaceFault.inv {V : Type u_1} {E : Type u_2} (f : SpaceFault V E) :

                                  The inverse of a space-fault (same fault, since Paulis are self-inverse)

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem SpaceFault.inv_pauliType {V : Type u_1} {E : Type u_2} (f : SpaceFault V E) :
                                    @[simp]
                                    theorem SpaceFault.inv_qubit {V : Type u_1} {E : Type u_2} (f : SpaceFault V E) :
                                    @[simp]
                                    theorem SpaceFault.inv_time {V : Type u_1} {E : Type u_2} (f : SpaceFault V E) :
                                    def SpaceFault.onVertex {V : Type u_1} {E : Type u_2} (v : V) (t : TimeStep) (p : PauliType) :

                                    A space-fault on a vertex qubit

                                    Equations
                                    Instances For
                                      def SpaceFault.onEdge {V : Type u_1} {E : Type u_2} (e : E) (t : TimeStep) (p : PauliType) :

                                      A space-fault on an edge qubit

                                      Equations
                                      Instances For
                                        @[simp]
                                        theorem SpaceFault.onVertex_qubit {V : Type u_1} {E : Type u_2} (v : V) (t : TimeStep) (p : PauliType) :
                                        @[simp]
                                        theorem SpaceFault.onEdge_qubit {V : Type u_1} {E : Type u_2} (e : E) (t : TimeStep) (p : PauliType) :
                                        @[reducible, inline]
                                        abbrev SpaceFault.X_vertex {V : Type u_1} {E : Type u_2} (v : V) (t : TimeStep) :

                                        An X error on a vertex qubit

                                        Equations
                                        Instances For
                                          @[reducible, inline]
                                          abbrev SpaceFault.Y_vertex {V : Type u_1} {E : Type u_2} (v : V) (t : TimeStep) :

                                          A Y error on a vertex qubit

                                          Equations
                                          Instances For
                                            @[reducible, inline]
                                            abbrev SpaceFault.Z_vertex {V : Type u_1} {E : Type u_2} (v : V) (t : TimeStep) :

                                            A Z error on a vertex qubit

                                            Equations
                                            Instances For
                                              @[reducible, inline]
                                              abbrev SpaceFault.X_edge {V : Type u_1} {E : Type u_2} (e : E) (t : TimeStep) :

                                              An X error on an edge qubit

                                              Equations
                                              Instances For
                                                @[reducible, inline]
                                                abbrev SpaceFault.Y_edge {V : Type u_1} {E : Type u_2} (e : E) (t : TimeStep) :

                                                A Y error on an edge qubit

                                                Equations
                                                Instances For
                                                  @[reducible, inline]
                                                  abbrev SpaceFault.Z_edge {V : Type u_1} {E : Type u_2} (e : E) (t : TimeStep) :

                                                  A Z error on an edge qubit

                                                  Equations
                                                  Instances For

                                                    Time-Faults (Measurement Errors) #

                                                    A time-fault is a measurement error: the classical outcome of a measurement is flipped. This is also called a "measurement error" or "readout error".

                                                    structure TimeFault (M : Type u_1) :
                                                    Type u_1

                                                    A time-fault: a measurement whose classical outcome is flipped. The measurement measurement at time time reports the wrong outcome.

                                                    • measurement : M

                                                      The measurement that is affected

                                                    • time : TimeStep

                                                      The time step when the measurement occurs

                                                    • isFlipped : Bool

                                                      Whether this fault is active (true = flipped outcome)

                                                    Instances For
                                                      def instDecidableEqTimeFault.decEq {M✝ : Type u_1} [DecidableEq M✝] (x✝ x✝¹ : TimeFault M✝) :
                                                      Decidable (x✝ = x✝¹)
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        def TimeFault.identity {M : Type u_1} (m : M) (t : TimeStep) :

                                                        The identity time-fault (no measurement error)

                                                        Equations
                                                        Instances For
                                                          def TimeFault.active {M : Type u_1} (m : M) (t : TimeStep) :

                                                          An active measurement error

                                                          Equations
                                                          Instances For

                                                            Check if this time-fault represents an actual error

                                                            Equations
                                                            Instances For
                                                              @[simp]
                                                              @[simp]
                                                              theorem TimeFault.isActualError_active {M : Type u_1} (m : M) (t : TimeStep) :
                                                              def TimeFault.compose {M : Type u_1} (f g : TimeFault M) (_h_meas : f.measurement = g.measurement) (_h_time : f.time = g.time) :

                                                              Compose two time-faults at the same measurement and time (XOR of flips)

                                                              Equations
                                                              Instances For
                                                                def TimeFault.inv {M : Type u_1} (f : TimeFault M) :

                                                                The inverse of a time-fault (same fault, since flip is self-inverse)

                                                                Equations
                                                                Instances For
                                                                  @[simp]
                                                                  @[simp]
                                                                  theorem TimeFault.inv_time {M : Type u_1} (f : TimeFault M) :

                                                                  Initialization Faults #

                                                                  A state initialization fault is treated as equivalent to a time-fault. A faulty initialization of state |ψ⟩ is modeled as perfect initialization followed by an immediate space-fault.

                                                                  We model this by having initialization faults be a special case that can be represented either as a time-fault on the initialization "measurement" or as a space-fault immediately after initialization.

                                                                  structure InitializationFault (V : Type u_1) (E : Type u_2) :
                                                                  Type (max u_1 u_2)

                                                                  An initialization fault on a qubit. This represents a faulty preparation of the initial state. It is modeled as equivalent to perfect initialization followed by a space-fault.

                                                                  • qubit : QubitLoc V E

                                                                    The qubit being initialized

                                                                  • time : TimeStep

                                                                    The time step of initialization

                                                                  • effectiveError : PauliType

                                                                    The effective Pauli error (applied after "perfect" initialization)

                                                                  Instances For
                                                                    def instDecidableEqInitializationFault.decEq {V✝ : Type u_1} {E✝ : Type u_2} [DecidableEq V✝] [DecidableEq E✝] (x✝ x✝¹ : InitializationFault V✝ E✝) :
                                                                    Decidable (x✝ = x✝¹)
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For

                                                                      Convert an initialization fault to an equivalent space-fault. The space-fault occurs at the same time as the initialization.

                                                                      Equations
                                                                      Instances For
                                                                        def InitializationFault.identity {V : Type u_1} {E : Type u_2} (q : QubitLoc V E) (t : TimeStep) :

                                                                        The identity initialization fault (no error)

                                                                        Equations
                                                                        Instances For

                                                                          Check if this initialization fault represents an actual error

                                                                          Equations
                                                                          Instances For

                                                                            Spacetime Faults #

                                                                            A spacetime fault is a collection of space-faults and time-faults occurring at various locations and times during the procedure.

                                                                            structure SpacetimeFault (V : Type u_1) (E : Type u_2) (M : Type u_3) :
                                                                            Type (max (max u_1 u_2) u_3)

                                                                            A spacetime fault: a collection of space-faults and time-faults.

                                                                            We represent this as:

                                                                            • A function from (qubit, time) pairs to Pauli errors (for space-faults)
                                                                            • A function from (measurement, time) pairs to flip flags (for time-faults)

                                                                            This representation allows for efficient composition (pointwise multiplication/XOR).

                                                                            • spaceErrors : QubitLoc V ETimeStepPauliType

                                                                              The Pauli error at each (qubit, time) location. Identity means no error.

                                                                            • timeErrors : MTimeStepBool

                                                                              Whether each (measurement, time) has a flipped outcome. False means no error.

                                                                            Instances For
                                                                              theorem SpacetimeFault.ext {V : Type u_1} {E : Type u_2} {M : Type u_3} {x y : SpacetimeFault V E M} (spaceErrors : x.spaceErrors = y.spaceErrors) (timeErrors : x.timeErrors = y.timeErrors) :
                                                                              x = y
                                                                              theorem SpacetimeFault.ext_iff {V : Type u_1} {E : Type u_2} {M : Type u_3} {x y : SpacetimeFault V E M} :
                                                                              def SpacetimeFault.identity {V : Type u_1} {E : Type u_2} {M : Type u_3} :

                                                                              The identity spacetime fault (no errors anywhere)

                                                                              Equations
                                                                              Instances For
                                                                                instance SpacetimeFault.instOne {V : Type u_1} {E : Type u_2} {M : Type u_3} :
                                                                                Equations
                                                                                @[simp]
                                                                                theorem SpacetimeFault.one_spaceErrors {V : Type u_1} {E : Type u_2} {M : Type u_3} (q : QubitLoc V E) (t : TimeStep) :
                                                                                @[simp]
                                                                                theorem SpacetimeFault.one_timeErrors {V : Type u_1} {E : Type u_2} {M : Type u_3} (m : M) (t : TimeStep) :
                                                                                def SpacetimeFault.compose {V : Type u_1} {E : Type u_2} {M : Type u_3} (f g : SpacetimeFault V E M) :

                                                                                Composition of spacetime faults (pointwise multiplication/XOR)

                                                                                Equations
                                                                                Instances For
                                                                                  instance SpacetimeFault.instMul {V : Type u_1} {E : Type u_2} {M : Type u_3} :
                                                                                  Equations
                                                                                  @[simp]
                                                                                  theorem SpacetimeFault.mul_spaceErrors {V : Type u_1} {E : Type u_2} {M : Type u_3} (f g : SpacetimeFault V E M) (q : QubitLoc V E) (t : TimeStep) :
                                                                                  (f * g).spaceErrors q t = f.spaceErrors q t * g.spaceErrors q t
                                                                                  @[simp]
                                                                                  theorem SpacetimeFault.mul_timeErrors {V : Type u_1} {E : Type u_2} {M : Type u_3} (f g : SpacetimeFault V E M) (m : M) (t : TimeStep) :
                                                                                  (f * g).timeErrors m t = (f.timeErrors m t ^^ g.timeErrors m t)
                                                                                  def SpacetimeFault.inv {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :

                                                                                  Inverse of a spacetime fault

                                                                                  Equations
                                                                                  Instances For
                                                                                    instance SpacetimeFault.instInv {V : Type u_1} {E : Type u_2} {M : Type u_3} :
                                                                                    Equations
                                                                                    @[simp]
                                                                                    theorem SpacetimeFault.inv_spaceErrors {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) (q : QubitLoc V E) (t : TimeStep) :
                                                                                    @[simp]
                                                                                    theorem SpacetimeFault.inv_timeErrors {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) (m : M) (t : TimeStep) :
                                                                                    theorem SpacetimeFault.mul_assoc {V : Type u_1} {E : Type u_2} {M : Type u_3} (a b c : SpacetimeFault V E M) :
                                                                                    a * b * c = a * (b * c)

                                                                                    Spacetime faults form a group under composition

                                                                                    theorem SpacetimeFault.one_mul {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :
                                                                                    1 * f = f
                                                                                    theorem SpacetimeFault.mul_one {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :
                                                                                    f * 1 = f
                                                                                    theorem SpacetimeFault.inv_mul_cancel {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :
                                                                                    f⁻¹ * f = 1
                                                                                    instance SpacetimeFault.instGroup {V : Type u_1} {E : Type u_2} {M : Type u_3} :
                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    def SpacetimeFault.fromSpaceFault {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq V] [DecidableEq E] (f : SpaceFault V E) :

                                                                                    Create a spacetime fault from a single space-fault

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For
                                                                                      def SpacetimeFault.fromTimeFault {V : Type u_1} {E : Type u_2} {M : Type u_3} [DecidableEq M] (f : TimeFault M) :

                                                                                      Create a spacetime fault from a single time-fault

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

                                                                                        Create a spacetime fault from a single initialization fault

                                                                                        Equations
                                                                                        Instances For
                                                                                          def SpacetimeFault.spaceErrorLocations {V : Type u_1} {E : Type u_2} {M : Type u_3} [Fintype V] [Fintype E] (f : SpacetimeFault V E M) (times : Finset TimeStep) :

                                                                                          The set of (qubit, time) locations where space errors occur

                                                                                          Equations
                                                                                          Instances For
                                                                                            def SpacetimeFault.timeErrorLocations {V : Type u_1} {E : Type u_2} {M : Type u_3} [Fintype M] (f : SpacetimeFault V E M) (times : Finset TimeStep) :

                                                                                            The set of (measurement, time) locations where time errors occur

                                                                                            Equations
                                                                                            Instances For
                                                                                              def SpacetimeFault.weight {V : Type u_1} {E : Type u_2} {M : Type u_3} [Fintype V] [Fintype E] [Fintype M] (f : SpacetimeFault V E M) (times : Finset TimeStep) :

                                                                                              The total weight of a spacetime fault (number of non-trivial errors) over given time range

                                                                                              Equations
                                                                                              Instances For
                                                                                                @[simp]
                                                                                                theorem SpacetimeFault.weight_identity {V : Type u_1} {E : Type u_2} {M : Type u_3} [Fintype V] [Fintype E] [Fintype M] (times : Finset TimeStep) :
                                                                                                weight 1 times = 0
                                                                                                def SpacetimeFault.isPureSpace {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :

                                                                                                A spacetime fault is "pure space" if it has no time errors

                                                                                                Equations
                                                                                                Instances For
                                                                                                  def SpacetimeFault.isPureTime {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :

                                                                                                  A spacetime fault is "pure time" if it has no space errors

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    @[simp]
                                                                                                    theorem SpacetimeFault.identity_isPureSpace {V : Type u_1} {E : Type u_2} {M : Type u_3} :
                                                                                                    @[simp]
                                                                                                    theorem SpacetimeFault.identity_isPureTime {V : Type u_1} {E : Type u_2} {M : Type u_3} :
                                                                                                    def SpacetimeFault.spaceComponent {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :

                                                                                                    The space-only component of a spacetime fault

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      def SpacetimeFault.timeComponent {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :

                                                                                                      The time-only component of a spacetime fault

                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        @[simp]
                                                                                                        @[simp]
                                                                                                        theorem SpacetimeFault.timeComponent_isPureTime {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :
                                                                                                        theorem SpacetimeFault.decompose {V : Type u_1} {E : Type u_2} {M : Type u_3} (f : SpacetimeFault V E M) :

                                                                                                        A spacetime fault decomposes into its space and time components

                                                                                                        The Group of Spacetime Faults #

                                                                                                        The set of all spacetime faults forms a group under composition. This is captured by the Group instance on SpacetimeFault.

                                                                                                        def pureSpaceFaults (V : Type u_1) (E : Type u_2) (M : Type u_3) :

                                                                                                        The subgroup of pure space-faults

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          def pureTimeFaults (V : Type u_1) (E : Type u_2) (M : Type u_3) :

                                                                                                          The subgroup of pure time-faults

                                                                                                          Equations
                                                                                                          Instances For

                                                                                                            Summary #

                                                                                                            This formalization captures the fault model for fault-tolerant quantum error correction:

                                                                                                            1. Space-faults: Single-qubit Pauli errors (X, Y, Z) occurring at specific qubits and times.

                                                                                                              • Represented by SpaceFault V E which records qubit location, time, and error type.
                                                                                                              • Can occur on vertex qubits (V) or edge qubits (E).
                                                                                                            2. Time-faults: Measurement errors where classical outcomes are flipped.

                                                                                                              • Represented by TimeFault M which records measurement index, time, and flip status.
                                                                                                              • Models readout errors in the measurement process.
                                                                                                            3. Initialization faults: Faulty state preparation.

                                                                                                              • Modeled as equivalent to a space-fault immediately after initialization.
                                                                                                              • Represented by InitializationFault V E.
                                                                                                            4. Spacetime faults: Collections of space and time faults.

                                                                                                              • Represented by SpacetimeFault V E M as functions from locations to errors.
                                                                                                              • Form a group under pointwise composition (Group instance).
                                                                                                              • Can be decomposed into pure-space and pure-time components.

                                                                                                            Key properties proven: