MerLean-example

27 Lem 5: Time Fault Distance

This chapter proves that the fault-distance for pure measurement and initialization errors (time-faults) is exactly \((t_o - t_i)\), where \(t_i\) is the time of the initial gauging deformation and \(t_o\) is the time of the final ungauging deformation.

The proof proceeds in two parts:

  • Lower bound: A measurement fault at \(t + 1/2\) on check \(c\) violates detectors \(c^t\) and \(c^{t+1}\). For empty syndrome, faults must form chains spanning from \(t_i\) to \(t_o\), so weight \(\geq (t_o - t_i)\).

  • Upper bound: The \(A_v\) measurement fault string achieves weight \(= (t_o - t_i)\) with empty syndrome and nontrivial logical effect.

  • Type 2 triviality: \(B_p/\tilde{s}_j\) chains with edge init/readout faults are spacetime stabilizers, hence trivial.

Definition 902 Deformation Interval
#

A deformation interval consists of two natural numbers \(t_i\) and \(t_o\) with \(t_i {\lt} t_o\), representing the time of the initial gauging deformation and the final ungauging deformation, respectively.

Definition 903 Number of Rounds

The number of rounds of a deformation interval \(I\) is defined as \(I.\mathrm{numRounds} := t_o - t_i\).

Lemma 904 Number of Rounds is Positive

For any deformation interval \(I\), \(0 {\lt} I.\mathrm{numRounds}\).

Proof

This follows from \(\texttt{Nat.sub\_ pos\_ iff\_ lt}\) applied to the hypothesis \(t_i {\lt} t_o\).

Lemma 905 Initial \(\leq \) Final

For any deformation interval \(I\), \(t_i \leq t_o\).

Proof

This follows directly from \(t_i {\lt} t_o\) by \(\texttt{Nat.le\_ of\_ lt}\).

Definition 906 Pure Time Fault

A spacetime fault \(F\) is a pure time fault if it has no space errors, i.e., \(F.\mathrm{isPureTime}\) holds.

Lemma 907 Pure Time Fault Weight

If \(F\) is a pure time fault, then \(F.\mathrm{weight}(\mathrm{times}) = |F.\mathrm{timeErrorLocations}(\mathrm{times})|\).

Proof

We unfold \(\texttt{SpacetimeFault.weight}\). Since \(F\) is a pure time fault, we establish that \(F.\mathrm{spaceErrorLocations}(\mathrm{times}) = \emptyset \): for any pair \((q, t)\), the pure time condition ensures all space errors are trivial, so the filter yields the empty set. Simplifying with \(|\emptyset | = 0\) and \(0 + \cdot \), the weight equals \(|F.\mathrm{timeErrorLocations}(\mathrm{times})|\).

Definition 908 Comparison Detector
#

A comparison detector \(c^t\) for check type \(M\) consists of a check \(c : M\) and a round \(t\). It compares measurements at \(t - 1/2\) and \(t + 1/2\).

Definition 909 Time Fault Count At
#

The time fault count at check \(m\) and time \(t\) for fault \(F\) is \(1\) if \(F.\mathrm{timeErrors}(m, t)\) is true, and \(0\) otherwise.

Definition 910 Violates Comparison Detector

A fault \(F\) violates comparison detector \(D = (c, t)\) if the parity of the fault count at \((c, t)\) differs from the parity at \((c, t-1)\):

\[ \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, c, t)) \neq \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, c, t-1)). \]

When \(t = 0\), the previous count is taken to be \(0\).

Lemma 911 No Violation Implies Same Parity

If detector \((c, t)\) with \(t \neq 0\) is not violated by \(F\), then \(\mathrm{Odd}(\mathrm{timeFaultCountAt}(F, c, t)) \Leftrightarrow \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, c, t-1))\).

Proof

We unfold the definition of \(\texttt{violatesComparisonDetector}\). The hypothesis \(\neg \mathrm{violates}\) gives us (after simplifying the double negation) that the two parity predicates are equal. Using \(t \neq 0\) to resolve the conditional, we obtain the biconditional by \(\texttt{Iff.of\_ eq}\).

Lemma 912 Same Parity in Interval

Let \(F\) be a spacetime fault and \(I\) a deformation interval. If no comparison detector \((m, t)\) is violated for any interior time \(t_i {\lt} t {\lt} t_o\), then for all \(t_1, t_2 \in [t_i, t_o)\):

\[ \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_1)) \Leftrightarrow \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_2)). \]
Proof

Without loss of generality, assume \(t_1 \leq t_2\) (symmetry handles the other case). Write \(t_2 = t_1 + d\) for some \(d \geq 0\). We proceed by induction on \(d\).

Base case (\(d = 0\)): The statement is trivial by reflexivity.

Inductive step (\(d \to d+1\)): By the inductive hypothesis, \(\mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_1)) \Leftrightarrow \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_1 + d))\). Since \(t_1 + d + 1\) is in the interior (by arithmetic from \(t_i {\lt} t_1 + d + 1 {\lt} t_o\)) and the detector at \(t_1 + d + 1\) is not violated, Lemma 911 gives that \(\mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_1 + d + 1)) \Leftrightarrow \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_1 + d))\). Chaining the two biconditionals yields the result after simplifying \((t_1 + d + 1) - 1 = t_1 + d\).

Lemma 913 Chain Coverage at Index

Let \(F\) be a spacetime fault, \(I\) a deformation interval, and \(m\) a check. If no interior comparison detector on \(m\) is violated, and there exists \(t_0 \in [t_i, t_o)\) with \(\mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_0))\), then for all \(t \in [t_i, t_o)\), \(\mathrm{timeFaultCountAt}(F, m, t) {\gt} 0\).

Proof

Let \(t \in [t_i, t_o)\). By Lemma 912, \(\mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t_0)) \Leftrightarrow \mathrm{Odd}(\mathrm{timeFaultCountAt}(F, m, t))\). Since the count at \(t_0\) is odd, so is the count at \(t\). From \(\mathrm{Odd}(k)\), we obtain \(k = 2j + 1\) for some \(j\), hence \(k {\gt} 0\) by arithmetic (\(\omega \)).

Definition 914 Interval Rounds
#

The interval rounds of a deformation interval \(I\) is the finite set \(\{ t_i, t_i + 1, \ldots , t_o - 1\} = \mathrm{Ico}(t_i, t_o)\).

Definition 915 Covered Rounds
#

The covered rounds of a fault \(F\) over a set of times is the subset of times \(t\) such that there exists some check \(m\) with \(F.\mathrm{timeErrors}(m, t) = \mathrm{true}\).

Let \(F\) be a pure time fault, \(I\) a deformation interval, and \(\mathrm{times}\) a set of time steps containing all interval rounds. Assume no interior comparison detector is violated for any check \(m\), and there exists some check \(m\) and time \(t_0 \in [t_i, t_o)\) with odd fault count. Then:

\[ I.\mathrm{numRounds} \leq F.\mathrm{weight}(\mathrm{times}). \]
Proof

Let \(m\), \(t_0\), \(h_{t_0 \geq }\), \(h_{t_0 {\lt}}\), and \(h_{\mathrm{odd}}\) be obtained from the existence hypothesis. We rewrite the weight using Lemma 907 (since \(F\) is pure time), reducing the goal to \(I.\mathrm{numRounds} \leq |F.\mathrm{timeErrorLocations}(\mathrm{times})|\).

By Lemma 913, for every \(t \in [t_i, t_o)\), the fault count at \((m, t)\) is positive, so \(F.\mathrm{timeErrors}(m, t) = \mathrm{true}\). We define the injection \(f(t) = (m, t)\), which is injective since the second component determines \(t\). The image of the interval rounds \(\mathrm{Ico}(t_i, t_o)\) under \(f\) is contained in \(F.\mathrm{timeErrorLocations}(\mathrm{times})\), since each \(t \in [t_i, t_o)\) is in \(\mathrm{times}\) (by the interval inclusion hypothesis) and has \(F.\mathrm{timeErrors}(m, t) = \mathrm{true}\).

Therefore:

\[ I.\mathrm{numRounds} = |\mathrm{Ico}(t_i, t_o)| = |f(\mathrm{Ico}(t_i, t_o))| \leq |F.\mathrm{timeErrorLocations}(\mathrm{times})|. \]
Definition 917 \(A_v\) Chain
#

The \(A_v\) measurement fault chain for check \(m\) and deformation interval \(I\) is the spacetime fault defined by:

  • \(\mathrm{spaceErrors}(q, t) = I\) (identity) for all qubits \(q\) and times \(t\),

  • \(\mathrm{timeErrors}(m', t) = \mathrm{true}\) if and only if \(m' = m\) and \(t_i \leq t {\lt} t_o\).

This represents measurement faults on a single \(A_v\) check at all times in the interval \([t_i, t_o)\).

Lemma 918 \(A_v\) Chain Time Errors

For the \(A_v\) chain on check \(m\) with interval \(I\):

\[ (\mathrm{Av\_ chain}\ m\ I).\mathrm{timeErrors}(m', t) = \mathrm{decide}(m' = m \land t_i \leq t \land t {\lt} t_o). \]
Proof

This holds by definitional equality (reflexivity).

Lemma 919 \(A_v\) Chain is Pure Time

The \(A_v\) chain is a pure time fault.

Proof

Let \(q\) and \(t\) be arbitrary. By the definition of \(\mathrm{Av\_ chain}\), the space errors are all identity, so \(F.\mathrm{isPureTime}\) holds by simplification.

Lemma 920 \(A_v\) Chain Has Faults in Interval

For \(t_i \leq t {\lt} t_o\), the \(A_v\) chain has \(\mathrm{timeErrors}(m, t) = \mathrm{true}\).

Proof

By simplification of the \(\mathrm{Av\_ chain\_ timeErrors}\) equation: the decision procedure yields true since \(m = m\), \(t_i \leq t\), and \(t {\lt} t_o\) all hold.

Lemma 921 \(A_v\) Chain Count in Interval

For \(t_i \leq t {\lt} t_o\), \(\mathrm{timeFaultCountAt}(\mathrm{Av\_ chain}\ m\ I, m, t) = 1\).

Proof

We unfold \(\mathrm{timeFaultCountAt}\) and rewrite using Lemma 920, which gives \(\mathrm{timeErrors}(m, t) = \mathrm{true}\). The conditional evaluates to \(1\).

Lemma 922 \(A_v\) Chain Count Outside Interval

For \(t {\lt} t_i\) or \(t_o \leq t\), \(\mathrm{timeFaultCountAt}(\mathrm{Av\_ chain}\ m\ I, m, t) = 0\).

Proof

We unfold \(\mathrm{timeFaultCountAt}\) and simplify \(\mathrm{Av\_ chain\_ timeErrors}\). If the decision procedure returns true, we obtain \(t_i \leq t\) and \(t {\lt} t_o\), which contradicts \(t {\lt} t_i\) (in the first case) or \(t_o \leq t\) (in the second case) by irreflexivity of \({\lt}\) on \(\mathbb {N}\). Otherwise, the conditional evaluates to \(0\) by reflexivity.

Lemma 923 \(A_v\) Chain No Interior Violation

For all interior times \(t_i {\lt} t {\lt} t_o\), the \(A_v\) chain does not violate comparison detector \((m, t)\).

Proof

Let \(t\) with \(t_i {\lt} t {\lt} t_o\). We unfold \(\mathrm{violatesComparisonDetector}\) and show equality of parities. Since \(t_i \leq t\) and \(t_i \leq t - 1\) (from \(t_i {\lt} t\)), and both \(t {\lt} t_o\) and \(t - 1 {\lt} t_o\) hold, Lemma 921 gives both counts equal to \(1\). Since \(t \neq 0\) (from \(t_i {\lt} t\) and \(t_i \geq 0\)), the previous-time conditional resolves, and the two counts being equal implies equal parities.

If \(\mathrm{intervalRounds}(I) \subseteq \mathrm{times}\), then:

\[ (\mathrm{Av\_ chain}\ m\ I).\mathrm{weight}(\mathrm{times}) = I.\mathrm{numRounds}. \]
Proof

We first rewrite the weight using Lemma 907 (applicable since the \(A_v\) chain is pure time by Lemma 919). We then show that \(\mathrm{timeErrorLocations}(\mathrm{times})\) equals the image of \(\mathrm{intervalRounds}(I)\) under \(t \mapsto (m, t)\): by extensionality on pairs \((m', t)\), the forward direction uses the time error characterization and the reverse uses the interval inclusion hypothesis. After this identification, \(|\mathrm{map}(f, \mathrm{Ico}(t_i, t_o))| = |\mathrm{Ico}(t_i, t_o)| = t_o - t_i = I.\mathrm{numRounds}\).

Definition 925 Gauging Logical Effect
#

A fault \(F\) has a gauging logical effect on interval \(I\) if there exists a check \(m\) such that the number of time errors of \(F\) on \(m\) over the interval \([t_i, t_o)\) has odd cardinality:

\[ \exists \, m : M,\quad \mathrm{Odd}\bigl|\{ t \in [t_i, t_o) \mid F.\mathrm{timeErrors}(m, t) = \mathrm{true}\} \bigr|. \]

This captures the idea that flipping an odd number of \(A_v\) outcomes changes \(\sigma = \prod _v \varepsilon _v\).

Lemma 926 \(A_v\) Chain Affects Gauging Logical (Odd Case)

If \(I.\mathrm{numRounds}\) is odd, then the \(A_v\) chain has gauging logical effect.

Proof

We unfold \(\mathrm{gaugingLogicalEffect}\) and witness \(m\). The filter of times \(t \in [t_i, t_o)\) with \(\mathrm{timeErrors}(m, t) = \mathrm{true}\) equals the full interval \(\mathrm{Ico}(t_i, t_o)\): by extensionality, for any \(t\) with \(t_i \leq t {\lt} t_o\), the \(A_v\) chain has \(\mathrm{timeErrors}(m, t) = \mathrm{true}\) (by Lemma 918 with \(m = m\)). Rewriting and using \(|\mathrm{Ico}(t_i, t_o)| = t_o - t_i = I.\mathrm{numRounds}\), the result follows from the hypothesis that \(I.\mathrm{numRounds}\) is odd.

Definition 927 Gauging Logical Effect (Nonzero Version)
#

A fault \(F\) has gauging logical effect (nonzero version) on interval \(I\) if there exists a check \(m\) such that the set of times \(t \in [t_i, t_o)\) with \(F.\mathrm{timeErrors}(m, t) = \mathrm{true}\) is nonempty.

Lemma 928 \(A_v\) Chain Affects Gauging Logical (Nonzero Version)

The \(A_v\) chain has gauging logical effect (nonzero version).

Proof

We unfold \(\mathrm{gaugingLogicalEffect'}\) and witness \(m\). We rewrite using \(\texttt{Finset.nonempty\_ iff\_ ne\_ empty}\) and \(\texttt{Finset.filter\_ nonempty\_ iff}\). We use \(t_i\) as witness: \(t_i \in \mathrm{Ico}(t_i, t_o)\) since \(t_i \leq t_i\) and \(t_i {\lt} t_o\) (by \(I.\mathrm{initial\_ lt\_ final}\)), and \(\mathrm{Av\_ chain\_ timeErrors}\) evaluates to true with \(m = m\), \(t_i \leq t_i\), and \(t_i {\lt} t_o\).

Theorem 929 \(A_v\) Chain is a Spacetime Logical Fault

Under appropriate assumptions on the detector collection (that detectors correspond to interior comparison detectors), the \(A_v\) chain is a spacetime logical fault: it has empty syndrome and affects the logical outcome.

Proof

We verify the two conditions of \(\mathrm{IsSpacetimeLogicalFault}\) using \(\texttt{constructor}\).

Empty syndrome: We rewrite using \(\texttt{hasEmptySyndrome\_ iff}\). For each detector \(D\) in the collection, the hypothesis \(\texttt{h\_ all\_ detectors}\) provides an interior time \(t\) with \(t_i {\lt} t {\lt} t_o\) and a biconditional relating detector satisfaction to non-violation of the comparison detector. By Lemma 923, the comparison detector is not violated, so the detector is satisfied.

Affects logical: This follows directly from Lemma 928.

Definition 930 Type 2 Fault String
#

A Type 2 fault string consists of:

  • An edge index (for init/readout faults),

  • A set of cycles containing the edge (for \(B_p\) faults),

  • A set of deformed checks affected (for \(\tilde{s}_j\) faults),

  • A deformation interval \(I\).

Definition 931 Spacetime Stabilizer Generator

A spacetime stabilizer generator is one of three types:

  • Initial: “init fault \(+\) \(X_e\) at \(t_i\)”, parameterized by an edge.

  • Propagator: “\(X_e\) at \(t\), \(X_e\) at \(t+1\), measurement faults between”, parameterized by an edge and time.

  • Final: “\(X_e\) at \(t_o\) \(+\) \(Z_e\) readout fault”, parameterized by an edge.

Definition 932 Type 2 Decomposition

A Type 2 decomposition of a Type 2 fault string \(s\) consists of:

  • An initial generator (of type \(\mathrm{initial}(s.\mathrm{edge})\)),

  • A sequence of \(s.I.\mathrm{numRounds} - 1\) propagator generators (each of type \(\mathrm{propagator}(s.\mathrm{edge}, t)\) for some \(t\)),

  • A final generator (of type \(\mathrm{final}(s.\mathrm{edge})\)).

Definition 933 Type 2 Decomposition Construction

The canonical decomposition of a Type 2 fault string \(s\) uses:

  • Initial generator: \(\mathrm{initial}(s.\mathrm{edge})\),

  • Propagator at index \(i\): \(\mathrm{propagator}(s.\mathrm{edge},\, s.I.t_i + i)\),

  • Final generator: \(\mathrm{final}(s.\mathrm{edge})\).

Theorem 934 Type 2 is Spacetime Stabilizer

If a Type 2 fault \(F\) has a decomposition into spacetime stabilizer generators, has empty syndrome, and preserves the logical information, then \(F\) is a spacetime stabilizer.

Proof

The result is the pair \(\langle h_{\mathrm{empty}}, h_{\mathrm{preserves}}\rangle \) of the two hypotheses: empty syndrome and preservation of logical information.

Theorem 935 Type 2 Has Decomposition

Every Type 2 fault string \(s\) has a decomposition \(d\) such that all propagator generators are of the form \(\mathrm{propagator}(s.\mathrm{edge}, t)\), the initial generator is \(\mathrm{initial}(s.\mathrm{edge})\), and the final generator is \(\mathrm{final}(s.\mathrm{edge})\).

Proof

We use the canonical decomposition \(\mathrm{type2\_ decomposition}(s)\). The three properties follow directly from the fields \(\mathrm{propagatorGens\_ are\_ propagators}\), \(\mathrm{initialGen\_ is\_ initial}\), and \(\mathrm{finalGen\_ is\_ final}\) of the decomposition.

Theorem 936 Time Fault Distance Lower Bound

Any pure time spacetime logical fault \(F\) satisfies:

\[ I.\mathrm{numRounds} \leq F.\mathrm{weight}(\mathrm{times}), \]

provided the interval rounds are contained in \(\mathrm{times}\), no interior comparison detectors are violated, and faults exist in the interval.

Proof

This follows directly from Theorem 916 applied to \(F\), \(I\), \(\mathrm{times}\), and the given hypotheses.

Definition 937 Pure Time Logical Faults
#

The set of pure time logical faults for a detector collection \(DC\), base outcomes, and logical effect predicate is:

\[ \{ F \mid \mathrm{IsSpacetimeLogicalFault}(DC, \mathrm{baseOutcomes}, \mathrm{logicalEffect}, F) \land \mathrm{isPureTimeFault}(F)\} . \]
Definition 938 Pure Time Spacetime Fault Distance

The pure time spacetime fault distance is the minimum weight over all pure time logical faults, defined using the well-founded minimum on \(\mathbb {N}\):

\[ \min \{ F.\mathrm{weight}(\mathrm{times}) \mid F \in \mathrm{pureTimeLogicalFaults}\} . \]

Under the detector structure assumptions (that detectors correspond to interior comparison detectors), three results hold simultaneously:

  1. The \(A_v\) chain is a pure time logical fault.

  2. The \(A_v\) chain has weight exactly \(I.\mathrm{numRounds} = t_o - t_i\).

  3. For all pure time logical faults \(F\): if no interior comparison detectors are violated and faults exist in the interval, then \(I.\mathrm{numRounds} \leq F.\mathrm{weight}(\mathrm{times})\).

Therefore the pure time fault distance is exactly \(t_o - t_i\).

Proof

We use \(\texttt{refine}\) to split into the three parts.

Part 1 (The \(A_v\) chain is a pure time logical fault): We construct the pair. The first component follows from Theorem 929 applied with the detector hypotheses. The second component follows from Lemma 919.

Part 2 (Weight equals \(\mathrm{numRounds}\)): This is exactly Theorem 924 applied to \(m\), \(I\), \(\mathrm{times}\), and the interval inclusion hypothesis.

Part 3 (Lower bound for all pure time logical faults): Let \(F\) be a pure time logical fault with the given properties. Decomposing the membership \(F \in \mathrm{pureTimeLogicalFaults}\) yields \(\mathrm{IsSpacetimeLogicalFault}\) and \(\mathrm{isPureTimeFault}\). The bound follows from Theorem 916 applied to \(F\), \(I\), \(\mathrm{times}\), the pure time hypothesis, the interval inclusion, the no-violation hypothesis, and the fault existence hypothesis.

Corollary 940 Time Fault Distance Equals Number of Rounds

If \(\mathrm{intervalRounds}(I) \subseteq \mathrm{times}\), then:

\[ (\mathrm{Av\_ chain}\ m\ I).\mathrm{weight}(\mathrm{times}) = I.\mathrm{numRounds} = t_o - t_i. \]
Proof

This follows directly from Theorem 924.