MerLean-example

25 Def 7: Space and Time Faults

In the context of fault-tolerant quantum error correction, we formalize the notions of space-faults (Pauli errors on qubits), time-faults (measurement errors), and their combined spacetime-fault model.

Definition 590 Space Fault
✓
#

A space-fault (or space error) on a qubit set \(Q\) at times \(T\) is a structure consisting of:

  • a qubit \(q \in Q\) where the error occurs,

  • a time \(t \in T\) at which the error occurs,

  • an \(X\)-component \(x \in \mathbb {Z}/2\mathbb {Z}\) (equal to \(1\) if the error has an \(X\) or \(Y\) component, \(0\) otherwise),

  • a \(Z\)-component \(z \in \mathbb {Z}/2\mathbb {Z}\) (equal to \(1\) if the error has a \(Z\) or \(Y\) component, \(0\) otherwise),

  • a nontriviality condition: \(x \neq 0\) or \(z \neq 0\).

This encodes a single-qubit Pauli error (\(X\), \(Y\), or \(Z\)) at a specific qubit and time.

Definition 591 Time Fault
✓
#

A time-fault (or measurement error) on a measurement set \(M\) is a structure consisting of a single field:

  • a measurement \(m \in M\) whose outcome is reported incorrectly (i.e., \(+1\) is reported as \(-1\) or vice versa).

By convention, state mis-initialization faults are also modeled as time-faults: initializing \(|0\rangle \) but obtaining \(|1\rangle \) is equivalent to a perfect initialization followed by a Pauli \(X\) error.

Definition 592 Spacetime Fault
✓
#

A spacetime fault on qubit set \(Q\), time set \(T\), and measurement set \(M\) is a structure consisting of:

  • a finite set \(\texttt{spaceFaults} \subseteq \operatorname {Finset}(\operatorname {SpaceFault}(Q, T))\) of space-faults,

  • a finite set \(\texttt{timeFaults} \subseteq \operatorname {Finset}(\operatorname {TimeFault}(M))\) of time-faults.

This represents a collection of Pauli errors on qubits at specific times together with measurement errors.

Definition 593 Weight of a Spacetime Fault
✓
#

The weight of a spacetime fault \(F\) is the total number of individual faults:

\[ \operatorname {weight}(F) = |\texttt{spaceFaults}(F)| + |\texttt{timeFaults}(F)|. \]
Definition 594 Empty Spacetime Fault
✓
#

The empty spacetime fault is the fault-free configuration \((\emptyset , \emptyset )\), consisting of no space-faults and no time-faults.

Definition 595 Spacetime Fault from a Single Space Fault
✓

Given a single space-fault \(f\), the spacetime fault \(\operatorname {ofSpaceFault}(f) = (\{ f\} , \emptyset )\) consists of that single space-fault and no time-faults.

Definition 596 Spacetime Fault from a Single Time Fault
✓
#

Given a single time-fault \(f\), the spacetime fault \(\operatorname {ofTimeFault}(f) = (\emptyset , \{ f\} )\) consists of no space-faults and that single time-fault.

Definition 597 Composition of Spacetime Faults
✓
#

The composition of two spacetime faults \(F_1\) and \(F_2\) is defined via the symmetric difference:

\[ \operatorname {compose}(F_1, F_2) = \bigl(\texttt{spaceFaults}(F_1) \mathbin {\triangle } \texttt{spaceFaults}(F_2),\; \texttt{timeFaults}(F_1) \mathbin {\triangle } \texttt{timeFaults}(F_2)\bigr). \]

This captures the fact that applying the same error twice cancels it, and flipping an outcome twice restores it.

Definition 598 Pure-Space Fault
✓
#

A spacetime fault \(F\) is pure-space if it has no time-faults: \(\texttt{timeFaults}(F) = \emptyset \).

Definition 599 Pure-Time Fault
✓
#

A spacetime fault \(F\) is pure-time if it has no space-faults: \(\texttt{spaceFaults}(F) = \emptyset \).

Definition 600 Space Weight
✓
#

The space weight of a spacetime fault \(F\) is \(\operatorname {spaceWeight}(F) = |\texttt{spaceFaults}(F)|\).

Definition 601 Time Weight
✓
#

The time weight of a spacetime fault \(F\) is \(\operatorname {timeWeight}(F) = |\texttt{timeFaults}(F)|\).

Lemma 602 Weight of Empty Fault
✓

The empty spacetime fault has weight \(0\):

\[ \operatorname {weight}(\operatorname {empty}) = 0. \]
Proof ▶

By simplification using the definitions of weight and empty, we have \(|\emptyset | + |\emptyset | = 0\).

For any spacetime fault \(F\):

\[ \operatorname {weight}(F) = \operatorname {spaceWeight}(F) + \operatorname {timeWeight}(F). \]
Proof ▶

By simplification using the definitions of weight, spaceWeight, and timeWeight, all three expand to the same sum of cardinalities.

Lemma 604 Space Weight of Empty Fault
✓

\(\operatorname {spaceWeight}(\operatorname {empty}) = 0\).

Proof ▶

By simplification using the definitions of spaceWeight and empty, the cardinality of the empty set is \(0\).

Lemma 605 Time Weight of Empty Fault
✓

\(\operatorname {timeWeight}(\operatorname {empty}) = 0\).

Proof ▶

By simplification using the definitions of timeWeight and empty, the cardinality of the empty set is \(0\).

Lemma 606 Weight of a Single Space Fault
✓

For any space-fault \(f\):

\[ \operatorname {weight}(\operatorname {ofSpaceFault}(f)) = 1. \]
Proof ▶

By simplification using the definitions of weight and ofSpaceFault, we have \(|\{ f\} | + |\emptyset | = 1 + 0 = 1\).

Lemma 607 Weight of a Single Time Fault
✓

For any time-fault \(f\):

\[ \operatorname {weight}(\operatorname {ofTimeFault}(f)) = 1. \]
Proof ▶

By simplification using the definitions of weight and ofTimeFault, we have \(|\emptyset | + |\{ f\} | = 0 + 1 = 1\).

Lemma 608 Empty Fault is Pure-Space
✓

The empty spacetime fault is pure-space.

Proof ▶

By simplification using the definitions of isPureSpace and empty, the time-faults of the empty fault form the empty set.

Lemma 609 Empty Fault is Pure-Time
✓

The empty spacetime fault is pure-time.

Proof ▶

By simplification using the definitions of isPureTime and empty, the space-faults of the empty fault form the empty set.

Lemma 610 Single Space Fault is Pure-Space
✓

For any space-fault \(f\), \(\operatorname {ofSpaceFault}(f)\) is pure-space.

Proof ▶

By simplification using the definitions of isPureSpace and ofSpaceFault, the time-faults component is \(\emptyset \).

Lemma 611 Single Time Fault is Pure-Time
✓

For any time-fault \(f\), \(\operatorname {ofTimeFault}(f)\) is pure-time.

Proof ▶

By simplification using the definitions of isPureTime and ofTimeFault, the space-faults component is \(\emptyset \).

Lemma 612 Positive Weight from Nonempty Space Faults
✓

If \(\texttt{spaceFaults}(F)\) is nonempty, then \(\operatorname {weight}(F) {\gt} 0\).

Proof ▶

Unfolding the definition of weight, since \(\texttt{spaceFaults}(F)\) is nonempty we have \(|\texttt{spaceFaults}(F)| {\gt} 0\) by Finset.card_pos. The result follows by integer arithmetic since \(\operatorname {weight}(F) = |\texttt{spaceFaults}(F)| + |\texttt{timeFaults}(F)| \geq |\texttt{spaceFaults}(F)| {\gt} 0\).

Lemma 613 Positive Weight from Nonempty Time Faults
✓

If \(\texttt{timeFaults}(F)\) is nonempty, then \(\operatorname {weight}(F) {\gt} 0\).

Proof ▶

Unfolding the definition of weight, since \(\texttt{timeFaults}(F)\) is nonempty we have \(|\texttt{timeFaults}(F)| {\gt} 0\) by Finset.card_pos. The result follows by integer arithmetic since \(\operatorname {weight}(F) = |\texttt{spaceFaults}(F)| + |\texttt{timeFaults}(F)| \geq |\texttt{timeFaults}(F)| {\gt} 0\).

Lemma 614 Composition is Commutative
✓

For any spacetime faults \(F_1, F_2\):

\[ \operatorname {compose}(F_1, F_2) = \operatorname {compose}(F_2, F_1). \]
Proof ▶

By extensionality, it suffices to show equality for each component. For the space-faults component, by the definition of compose and membership in the symmetric difference, \(a \in S_1 \mathbin {\triangle } S_2\) if and only if \(a \in S_2 \mathbin {\triangle } S_1\), which follows by propositional logic (tauto). The same argument applies to the time-faults component.

Lemma 615 Composition is Involutive
✓

For any spacetime fault \(F\):

\[ \operatorname {compose}(F, F) = \operatorname {empty}. \]
Proof ▶

By extensionality, it suffices to check each component. For the space-faults, \(a \in S \mathbin {\triangle } S\) if and only if \(a \in \emptyset \), since \(S \mathbin {\triangle } S = \emptyset \) (an element is in \(S\) and not in \(S\), or vice versa, which is always false). This follows by simplification using the definition of compose, empty, and membership in the symmetric difference. The same holds for the time-faults.

Lemma 616 Left Identity of Composition
✓

For any spacetime fault \(F\):

\[ \operatorname {compose}(\operatorname {empty}, F) = F. \]
Proof ▶

By extensionality, for each component we have \(\emptyset \mathbin {\triangle } S = S\). This follows by simplification using the definitions of compose and empty and membership in the symmetric difference.

Lemma 617 Right Identity of Composition
✓

For any spacetime fault \(F\):

\[ \operatorname {compose}(F, \operatorname {empty}) = F. \]
Proof ▶

By extensionality, for each component we have \(S \mathbin {\triangle } \emptyset = S\). This follows by simplification using the definitions of compose and empty and membership in the symmetric difference.

Lemma 618 Composition is Associative
✓

For any spacetime faults \(F_1, F_2, F_3\):

\[ \operatorname {compose}(\operatorname {compose}(F_1, F_2), F_3) = \operatorname {compose}(F_1, \operatorname {compose}(F_2, F_3)). \]
Proof ▶

By extensionality, it suffices to check each component. For the space-faults, we use the definition of compose and membership in the symmetric difference: \(a \in (S_1 \mathbin {\triangle } S_2) \mathbin {\triangle } S_3\) if and only if \(a \in S_1 \mathbin {\triangle } (S_2 \mathbin {\triangle } S_3)\), which follows by propositional logic (tauto). The same argument applies to the time-faults.

Definition 619 Space Component
✓
#

The space component of a spacetime fault \(F\) is the spacetime fault \((\texttt{spaceFaults}(F), \emptyset )\), keeping only the space-faults.

Definition 620 Time Component
✓
#

The time component of a spacetime fault \(F\) is the spacetime fault \((\emptyset , \texttt{timeFaults}(F))\), keeping only the time-faults.

Lemma 621 Space Component is Pure-Space
✓

For any spacetime fault \(F\), the space component \(F.\operatorname {spaceComponent}\) is pure-space.

Proof ▶

By simplification using the definitions of spaceComponent and isPureSpace, the time-faults of the space component are \(\emptyset \).

Lemma 622 Time Component is Pure-Time
✓

For any spacetime fault \(F\), the time component \(F.\operatorname {timeComponent}\) is pure-time.

Proof ▶

By simplification using the definitions of timeComponent and isPureTime, the space-faults of the time component are \(\emptyset \).

For any spacetime fault \(F\):

\[ \operatorname {weight}(F.\operatorname {spaceComponent}) = \operatorname {spaceWeight}(F). \]
Proof ▶

By simplification using the definitions of spaceComponent, weight, and spaceWeight, the weight of \((\texttt{spaceFaults}(F), \emptyset )\) equals \(|\texttt{spaceFaults}(F)| + 0 = |\texttt{spaceFaults}(F)|\).

For any spacetime fault \(F\):

\[ \operatorname {weight}(F.\operatorname {timeComponent}) = \operatorname {timeWeight}(F). \]
Proof ▶

By simplification using the definitions of timeComponent, weight, and timeWeight, the weight of \((\emptyset , \texttt{timeFaults}(F))\) equals \(0 + |\texttt{timeFaults}(F)| = |\texttt{timeFaults}(F)|\).

Lemma 625 Decomposition into Space and Time Components
✓

Any spacetime fault \(F\) decomposes into the composition of its space and time components:

\[ \operatorname {compose}(F.\operatorname {spaceComponent}, F.\operatorname {timeComponent}) = F. \]
Proof ▶

By extensionality, for the space-faults component we have \(\texttt{spaceFaults}(F) \mathbin {\triangle } \emptyset = \texttt{spaceFaults}(F)\), and for the time-faults component we have \(\emptyset \mathbin {\triangle } \texttt{timeFaults}(F) = \texttt{timeFaults}(F)\). Both follow by simplification using the definitions of compose, spaceComponent, timeComponent, and membership in the symmetric difference.

Definition 626 Space Faults at a Given Time
✓

The space-faults at time \(t\) of a spacetime fault \(F\) is the subset of space-faults whose time field equals \(t\):

\[ \operatorname {spaceFaultsAt}(F, t) = \{ f \in \texttt{spaceFaults}(F) \mid f.\operatorname {time} = t\} . \]
Definition 627 Pauli Error at a Given Time
✓
#

The composite Pauli error at time \(t\) of a spacetime fault \(F\) on the qubit system \(Q\) is the Pauli operator \(P \in \operatorname {PauliOp}(Q)\) defined by:

\[ P.\operatorname {xVec}(q) = \sum _{f \in \operatorname {spaceFaultsAt}(F, t)} \begin{cases} f.\operatorname {xComponent} & \text{if } f.\operatorname {qubit} = q, \\ 0 & \text{otherwise,}\end{cases} \]
\[ P.\operatorname {zVec}(q) = \sum _{f \in \operatorname {spaceFaultsAt}(F, t)} \begin{cases} f.\operatorname {zComponent} & \text{if } f.\operatorname {qubit} = q, \\ 0 & \text{otherwise.}\end{cases} \]

The sums are taken in \(\mathbb {Z}/2\mathbb {Z}\).

Lemma 628 Pauli Error at Empty Fault is Identity
✓

For any time \(t\), the Pauli error of the empty fault at time \(t\) is the identity:

\[ \operatorname {pauliErrorAt}(\operatorname {empty}, t) = \mathbf{1}. \]
Proof ▶

By extensionality over all qubits \(q\), for both the \(x\)- and \(z\)-components: the sum is over \(\operatorname {spaceFaultsAt}(\operatorname {empty}, t)\), which by the definitions of spaceFaultsAt and empty is a filter of \(\emptyset \), hence empty. The empty sum in \(\mathbb {Z}/2\mathbb {Z}\) equals \(0\), which matches the identity Pauli operator.

Definition 629 Initialization Fault
✓

An initialization fault for initialization measurement \(m\) is the spacetime fault \(\operatorname {ofTimeFault}(\langle m \rangle )\), modeling the initialization error as a time-fault on the measurement associated with the initialization.

Definition 630 Initialization as Space Fault
✓

The equivalent space-fault view of an initialization error on qubit \(q\) at time \(t\): this is \(\operatorname {ofSpaceFault}(\langle q, t, 1, 0, \cdot \rangle )\), representing a perfect initialization followed by a Pauli \(X\) error (since \(x\)-component is \(1\) and \(z\)-component is \(0\)).

Lemma 631 Weight of Initialization Fault
✓

For any measurement \(m\):

\[ \operatorname {weight}(\operatorname {initializationFault}(m)) = 1. \]
Proof ▶

By simplification using the definitions of initializationFault, ofTimeFault, and weight, we have \(|\emptyset | + |\{ m\} | = 0 + 1 = 1\).

Lemma 632 Weight of Initialization as Space Fault
✓

For any qubit \(q\) and time \(t\):

\[ \operatorname {weight}(\operatorname {initializationAsSpaceFault}(q, t)) = 1. \]
Proof ▶

By simplification using the definitions of initializationAsSpaceFault, ofSpaceFault, and weight, we have \(|\{ \langle q, t, 1, 0, \cdot \rangle \} | + |\emptyset | = 1 + 0 = 1\).

Lemma 633 Space Weight Bounded by Total Weight
✓

For any spacetime fault \(F\):

\[ \operatorname {spaceWeight}(F) \leq \operatorname {weight}(F). \]
Proof ▶

Unfolding the definitions of weight and spaceWeight, the claim becomes \(|\texttt{spaceFaults}(F)| \leq |\texttt{spaceFaults}(F)| + |\texttt{timeFaults}(F)|\), which follows by integer arithmetic (omega).

Lemma 634 Time Weight Bounded by Total Weight
✓

For any spacetime fault \(F\):

\[ \operatorname {timeWeight}(F) \leq \operatorname {weight}(F). \]
Proof ▶

Unfolding the definitions of weight and timeWeight, the claim becomes \(|\texttt{timeFaults}(F)| \leq |\texttt{spaceFaults}(F)| + |\texttt{timeFaults}(F)|\), which follows by integer arithmetic (omega).

Lemma 635 Weight Zero Characterization
✓

For any spacetime fault \(F\):

\[ \operatorname {weight}(F) = 0 \iff \texttt{spaceFaults}(F) = \emptyset \; \land \; \texttt{timeFaults}(F) = \emptyset . \]
Proof ▶

By simplification using the definition of weight, \(\operatorname {weight}(F) = 0\) is equivalent to \(|\texttt{spaceFaults}(F)| + |\texttt{timeFaults}(F)| = 0\), which by the fact that a sum of natural numbers is zero if and only if both summands are zero (Nat.add_eq_zero_iff), and the fact that a finset has cardinality zero if and only if it is empty (Finset.card_eq_zero), gives the desired equivalence.

Lemma 636 Weight Zero iff Empty
✓

For any spacetime fault \(F\):

\[ \operatorname {weight}(F) = 0 \iff F = \operatorname {empty}. \]
Proof ▶

We prove both directions. For the forward direction, assume \(\operatorname {weight}(F) = 0\). From the characterization weight_zero_iff, we obtain that \(\texttt{spaceFaults}(F) = \emptyset \) and \(\texttt{timeFaults}(F) = \emptyset \). By extensionality, and simplifying using the definition of empty, \(F = \operatorname {empty}\). For the reverse direction, assume \(F = \operatorname {empty}\). Substituting, we simplify to obtain \(\operatorname {weight}(\operatorname {empty}) = 0\).

Definition 637 Trivial Fault
✓
#

A spacetime fault \(F\) is trivial if \(F = \operatorname {empty}\), i.e., it contains no faults at all.

Definition 638 Affected Qubits
✓

The set of affected qubits of a spacetime fault \(F\) is the image of the space-faults under the qubit projection:

\[ \operatorname {affectedQubits}(F) = \{ f.\operatorname {qubit} \mid f \in \texttt{spaceFaults}(F)\} . \]
Definition 639 Active Times
✓
#

The set of active times of a spacetime fault \(F\) is the image of the space-faults under the time projection:

\[ \operatorname {activeTimes}(F) = \{ f.\operatorname {time} \mid f \in \texttt{spaceFaults}(F)\} . \]
Definition 640 Affected Measurements
✓

The set of affected measurements of a spacetime fault \(F\) is the image of the time-faults under the measurement projection:

\[ \operatorname {affectedMeasurements}(F) = \{ f.\operatorname {measurement} \mid f \in \texttt{timeFaults}(F)\} . \]
Definition 641 Observed Outcome
✓
#

Given an ideal measurement outcome function \(\operatorname {ideal} : M \to \mathbb {Z}/2\mathbb {Z}\) and a set of time-faults, the observed outcome for measurement \(m\) is:

\[ \operatorname {observedOutcome}(\operatorname {ideal}, \texttt{faults}, m) = \operatorname {ideal}(m) + \begin{cases} 1 & \text{if } \langle m \rangle \in \texttt{faults}, \\ 0 & \text{otherwise.}\end{cases} \]

A time-fault on measurement \(m\) flips the observed outcome.

Lemma 642 Observed Outcome Without Fault
✓
#

If measurement \(m\) is not affected by any time-fault (i.e., \(\langle m \rangle \notin \texttt{faults}\)), then the observed outcome equals the ideal outcome:

\[ \operatorname {observedOutcome}(\operatorname {ideal}, \texttt{faults}, m) = \operatorname {ideal}(m). \]
Proof ▶

By simplification using the definition of observedOutcome and the hypothesis \(\langle m \rangle \notin \texttt{faults}\), the conditional evaluates to \(0\), giving \(\operatorname {ideal}(m) + 0 = \operatorname {ideal}(m)\).

Lemma 643 Observed Outcome With Fault
✓

If measurement \(m\) is affected by a time-fault (i.e., \(\langle m \rangle \in \texttt{faults}\)), thenthe observed outcome is the ideal outcome plus \(1\):

\[ \operatorname {observedOutcome}(\operatorname {ideal}, \texttt{faults}, m) = \operatorname {ideal}(m) + 1. \]
Proof ▶

By simplification using the definition of observedOutcome and the hypothesis \(\langle m \rangle \in \texttt{faults}\), the conditional evaluates to \(1\), giving \(\operatorname {ideal}(m) + 1\).

Lemma 644 Fault Flips Outcome
✓
#

If measurement \(m\) is affected by a time-fault (i.e., \(\langle m \rangle \in \texttt{faults}\)), then the observed outcome differs from the ideal outcome:

\[ \operatorname {observedOutcome}(\operatorname {ideal}, \texttt{faults}, m) \neq \operatorname {ideal}(m). \]
Proof ▶

We first rewrite using the lemma observedOutcome_with_fault, so the goal becomes \(\operatorname {ideal}(m) + 1 \neq \operatorname {ideal}(m)\). Assume for contradiction that \(\operatorname {ideal}(m) + 1 = \operatorname {ideal}(m)\). Then subtracting \(\operatorname {ideal}(m)\) from both sides, we obtain \(0 = 1\) in \(\mathbb {Z}/2\mathbb {Z}\), which is simplified to a contradiction since \(0 \neq 1\).