MerLean-example

22 Def 12: Time Step Convention

We use a half-integer time step convention for the fault-tolerant gauging measurement procedure. Integer time steps \(t = 0, 1, 2, \ldots \) are associated with qubit states and Pauli space-errors, while half-integer time steps \(t + \tfrac {1}{2}\) are associated with measurements and measurement errors.

Definition 695 Half-Integer Time
#

A half-integer time representation, defined as an inductive type with two constructors:

  • \(\mathtt{integer}(n)\) represents the integer time step \(n \in \mathbb {Z}\),

  • \(\mathtt{halfInteger}(n)\) represents the half-integer time step \(n + \tfrac {1}{2}\) for \(n \in \mathbb {Z}\).

Definition 696 Half-Integer Time: Rational Conversion
#

Convert a half-integer time to a rational number for comparison:

\[ \mathrm{toRat}(\mathtt{integer}(n)) = n, \qquad \mathrm{toRat}(\mathtt{halfInteger}(n)) = n + \tfrac {1}{2}. \]
Definition 697 Half-Integer Time: Is Integer
#

A predicate that checks whether a half-integer time is an integer time:

\[ \mathrm{isInteger}(\mathtt{integer}(n)) = \mathrm{true}, \qquad \mathrm{isInteger}(\mathtt{halfInteger}(n)) = \mathrm{false}. \]
Definition 698 Half-Integer Time: Is Half-Integer
#

A predicate that checks whether a half-integer time is a half-integer time:

\[ \mathrm{isHalfInteger}(\mathtt{integer}(n)) = \mathrm{false}, \qquad \mathrm{isHalfInteger}(\mathtt{halfInteger}(n)) = \mathrm{true}. \]
Definition 699 Half-Integer Time: Floor
#

The floor (integer part) of a half-integer time:

\[ \mathrm{floor}(\mathtt{integer}(n)) = n, \qquad \mathrm{floor}(\mathtt{halfInteger}(n)) = n. \]
Definition 700 Half-Integer Time: Ceiling
#

The ceiling (rounded-up integer part) of a half-integer time:

\[ \mathrm{ceil}(\mathtt{integer}(n)) = n, \qquad \mathrm{ceil}(\mathtt{halfInteger}(n)) = n + 1. \]
Lemma 701 Integer Less Than Same Half-Integer

For any \(n \in \mathbb {Z}\), we have \(\mathtt{integer}(n) {\lt} \mathtt{halfInteger}(n)\), i.e., \(n {\lt} n + \tfrac {1}{2}\).

Proof

We unfold the ordering to the rational comparison \(n {\lt} n + \tfrac {1}{2}\). This follows by linear arithmetic.

Lemma 702 Half-Integer Less Than Next Integer

For any \(n \in \mathbb {Z}\), we have \(\mathtt{halfInteger}(n) {\lt} \mathtt{integer}(n+1)\), i.e., \(n + \tfrac {1}{2} {\lt} n + 1\).

Proof

We unfold the ordering to the rational comparison \(n + \tfrac {1}{2} {\lt} n + 1\). Using the fact that \(\mathrm{cast}(n+1) = \mathrm{cast}(n) + 1\), this follows by linear arithmetic.

Definition 703 Half-Integer Time: Successor
#

The successor function on half-integer times, advancing by \(\tfrac {1}{2}\):

\[ \mathrm{succ}(\mathtt{integer}(n)) = \mathtt{halfInteger}(n), \qquad \mathrm{succ}(\mathtt{halfInteger}(n)) = \mathtt{integer}(n+1). \]

That is, \(n \mapsto n + \tfrac {1}{2}\) and \(n + \tfrac {1}{2} \mapsto n + 1\).

Definition 704 Half-Integer Time: Predecessor
#

The predecessor function on half-integer times, retreating by \(\tfrac {1}{2}\):

\[ \mathrm{pred}(\mathtt{integer}(n)) = \mathtt{halfInteger}(n-1), \qquad \mathrm{pred}(\mathtt{halfInteger}(n)) = \mathtt{integer}(n). \]

That is, \(n \mapsto n - \tfrac {1}{2}\) and \(n + \tfrac {1}{2} \mapsto n\).

Lemma 705 Predecessor of Successor

For any half-integer time \(t\), \(\mathrm{pred}(\mathrm{succ}(t)) = t\).

Proof

We consider two cases. Case 1: \(t = \mathtt{integer}(n)\). Then \(\mathrm{succ}(t) = \mathtt{halfInteger}(n)\) and \(\mathrm{pred}(\mathtt{halfInteger}(n)) = \mathtt{integer}(n) = t\). This holds by simplification using the definitions of succ and pred. Case 2: \(t = \mathtt{halfInteger}(n)\). Then \(\mathrm{succ}(t) = \mathtt{integer}(n+1)\) and \(\mathrm{pred}(\mathtt{integer}(n+1)) = \mathtt{halfInteger}(n) = t\). This again holds by simplification.

Lemma 706 Successor of Predecessor

For any half-integer time \(t\), \(\mathrm{succ}(\mathrm{pred}(t)) = t\).

Proof

We consider two cases. Case 1: \(t = \mathtt{integer}(n)\). Then \(\mathrm{pred}(t) = \mathtt{halfInteger}(n-1)\) and \(\mathrm{succ}(\mathtt{halfInteger}(n-1)) = \mathtt{integer}(n) = t\). This holds by simplification. Case 2: \(t = \mathtt{halfInteger}(n)\). Then \(\mathrm{pred}(t) = \mathtt{integer}(n)\) and \(\mathrm{succ}(\mathtt{integer}(n)) = \mathtt{halfInteger}(n) = t\). This also holds by simplification.

Lemma 707 Strict Increase by Successor

For any half-integer time \(t\), \(t {\lt} \mathrm{succ}(t)\).

Proof

We consider two cases. Case 1: \(t = \mathtt{integer}(n)\). Then \(\mathrm{succ}(t) = \mathtt{halfInteger}(n)\), and \(\mathtt{integer}(n) {\lt} \mathtt{halfInteger}(n)\) follows from the lemma integer_lt_halfInteger_same. Case 2: \(t = \mathtt{halfInteger}(n)\). Then \(\mathrm{succ}(t) = \mathtt{integer}(n+1)\), and \(\mathtt{halfInteger}(n) {\lt} \mathtt{integer}(n+1)\) follows from the lemma halfInteger_lt_integer_succ.

Lemma 708 Strict Decrease by Predecessor

For any half-integer time \(t\), \(\mathrm{pred}(t) {\lt} t\).

Proof

We consider two cases. Case 1: \(t = \mathtt{integer}(n)\). Then \(\mathrm{pred}(t) = \mathtt{halfInteger}(n-1)\). We unfold the ordering to the rational comparison \((n-1) + \tfrac {1}{2} {\lt} n\), i.e., \(n - \tfrac {1}{2} {\lt} n\), which follows by linear arithmetic. Case 2: \(t = \mathtt{halfInteger}(n)\). Then \(\mathrm{pred}(t) = \mathtt{integer}(n)\). We unfold to \(n {\lt} n + \tfrac {1}{2}\), which follows by linear arithmetic.

Definition 709 Integer Time Step to Half-Integer Time
#

Converts an integer time step \(t\) to the half-integer time \(\mathtt{integer}(t)\).

Definition 710 Measurement Time Step to Half-Integer Time
#

Converts a measurement time step \(t\) (representing \(t + \tfrac {1}{2}\)) to the half-integer time \(\mathtt{halfInteger}(t)\).

Definition 711 Next Measurement Time
#

The measurement time immediately after integer time \(t\) is \(t + \tfrac {1}{2}\), represented by the measurement time step \(t\).

Definition 712 Previous Measurement Time
#

The measurement time immediately before integer time \(t\) is \(t - \tfrac {1}{2}\), represented by the measurement time step \(t - 1\).

Definition 713 Next Integer Time
#

The integer time immediately after measurement time \(t + \tfrac {1}{2}\) is \(t + 1\).

Definition 714 Previous Integer Time
#

The integer time immediately before measurement time \(t + \tfrac {1}{2}\) is \(t\).

Theorem 715 Measurement Between States

A measurement at time \(t + \tfrac {1}{2}\) occurs between qubit states at times \(t\) and \(t + 1\). Formally, for any measurement time step \(t\):

\[ \mathtt{integer}(t) {\lt} \mathtt{halfInteger}(t) \quad \text{and} \quad \mathtt{halfInteger}(t) {\lt} \mathtt{integer}(t+1). \]
Proof

The first inequality follows directly from integer_lt_halfInteger_same\((t)\), and the second follows directly from halfInteger_lt_integer_succ\((t)\).

Theorem 716 Error Between Measurements

A Pauli error at integer time \(t\) affects the state between measurements at \(t - \tfrac {1}{2}\) and \(t + \tfrac {1}{2}\). Formally:

\[ \mathtt{halfInteger}(t-1) {\lt} \mathtt{integer}(t) \quad \text{and} \quad \mathtt{integer}(t) {\lt} \mathtt{halfInteger}(t). \]
Proof

We prove both conjuncts. For the first, we unfold the ordering to the rational comparison \((t-1) + \tfrac {1}{2} {\lt} t\), which simplifies using \(\mathrm{cast}(t-1) = \mathrm{cast}(t) - 1\) and follows by linear arithmetic. For the second, this is exactly integer_lt_halfInteger_same\((t)\).

Definition 717 Gauging Time Configuration
#

A configuration of key time points in the gauging procedure, consisting of:

  • \(t_{\mathrm{start}}\): the start of the procedure,

  • \(t_{\mathrm{initial}}\): the time of the initial gauging code deformation,

  • \(t_{\mathrm{final}}\): the time of the final ungauging code deformation,

subject to the ordering constraint \(t_{\mathrm{start}} \le t_{\mathrm{initial}} \le t_{\mathrm{final}}\).

Definition 718 Duration of Gauging Procedure
#

The total duration of the gauging measurement procedure:

\[ \mathrm{duration} = (t_{\mathrm{final}} - t_{\mathrm{start}}).\mathrm{toNat}. \]
Definition 719 Gauged Phase Duration
#

The duration of the gauged phase, from \(t_{\mathrm{initial}}\) to \(t_{\mathrm{final}}\):

\[ \mathrm{gaugedPhaseDuration} = (t_{\mathrm{final}} - t_{\mathrm{initial}}).\mathrm{toNat}. \]
Definition 720 First Gauge Measurement Time
#

The first \(A_v\) measurement time \(t_{\mathrm{initial}} - \tfrac {1}{2}\), represented as measurement time step \(t_{\mathrm{initial}} - 1\).

Definition 721 Second Gauge Measurement Time

The second \(A_v\) measurement time \(t_{\mathrm{initial}} + \tfrac {1}{2}\), represented as measurement time step \(t_{\mathrm{initial}}\).

Definition 722 Last Gauge Measurement Before Final

The last \(A_v\) measurement time before the final time \(t_{\mathrm{final}} - \tfrac {1}{2}\), represented as measurement time step \(t_{\mathrm{final}} - 1\).

Definition 723 Final Gauge Measurement Time
#

The final \(A_v\) measurement time \(t_{\mathrm{final}} + \tfrac {1}{2}\), represented as measurement time step \(t_{\mathrm{final}}\).

Theorem 724 First Gauge Measurement Before Initial Time

The first \(A_v\) measurement at \(t_{\mathrm{initial}} - \tfrac {1}{2}\) comes before the integer time \(t_{\mathrm{initial}}\):

\[ \mathtt{halfInteger}(t_{\mathrm{initial}} - 1) {\lt} \mathtt{integer}(t_{\mathrm{initial}}). \]
Proof

We simplify using the definition of firstGaugeMeasurement and unfold the ordering to the rational comparison \((t_{\mathrm{initial}} - 1) + \tfrac {1}{2} {\lt} t_{\mathrm{initial}}\). Using \(\mathrm{cast}(t_{\mathrm{initial}} - 1) = \mathrm{cast}(t_{\mathrm{initial}}) - 1\), this becomes \(t_{\mathrm{initial}} - \tfrac {1}{2} {\lt} t_{\mathrm{initial}}\), which follows by linear arithmetic.

Theorem 725 Second Gauge Measurement After Initial Time

The second \(A_v\) measurement at \(t_{\mathrm{initial}} + \tfrac {1}{2}\) comes after the integer time \(t_{\mathrm{initial}}\):

\[ \mathtt{integer}(t_{\mathrm{initial}}) {\lt} \mathtt{halfInteger}(t_{\mathrm{initial}}). \]
Proof

We simplify using the definition of secondGaugeMeasurement and apply integer_lt_halfInteger_same to \(t_{\mathrm{initial}}\).

Definition 726 Time Step Convention
#

The time step convention type, a structure recording:

  • integerTimesForStates: whether integer times are used for qubit states (default: true),

  • halfIntegerTimesForMeasurements: whether half-integer times are used for measurements (default: true).

Definition 727 Standard Time Convention
#

The standard half-integer convention, where integer times are for qubit states and half-integer times are for measurements.

Definition 728 Space Fault Time
#

Space faults (Pauli errors) occur at integer times. Given a time step \(t\), the associated half-integer time is \(\mathtt{integer}(t)\).

Definition 729 Time Fault Time
#

Time faults (measurement errors) occur at half-integer times. Given a time step \(t\), the associated half-integer time is \(\mathtt{halfInteger}(t)\).

Theorem 730 Space Fault Between Measurements

A space fault at time \(t\) (with \(t {\gt} 0\)) is between measurements at \(t - \tfrac {1}{2}\) and \(t + \tfrac {1}{2}\):

\[ \mathtt{halfInteger}(t-1) {\lt} \mathrm{spaceFaultTime}(t) \quad \text{and} \quad \mathrm{spaceFaultTime}(t) {\lt} \mathtt{halfInteger}(t). \]
Proof

We prove both conjuncts. For the first, we simplify using the definition of spaceFaultTime and unfold the ordering to the rational comparison \((t-1) + \tfrac {1}{2} {\lt} t\). Using \(\mathrm{cast}(t-1) = \mathrm{cast}(t) - 1\), this follows by linear arithmetic. For the second, we simplify using spaceFaultTime and apply integer_lt_halfInteger_same to \(t\).

Theorem 731 Time Fault Between States

A measurement fault at time \(t + \tfrac {1}{2}\) is between states at times \(t\) and \(t + 1\):

\[ \mathrm{spaceFaultTime}(t) {\lt} \mathrm{timeFaultTime}(t) \quad \text{and} \quad \mathrm{timeFaultTime}(t) {\lt} \mathrm{spaceFaultTime}(t+1). \]
Proof

We simplify using the definitions of spaceFaultTime and timeFaultTime. For the first conjunct, \(\mathtt{integer}(t) {\lt} \mathtt{halfInteger}(t)\) follows from integer_lt_halfInteger_same\((t)\). For the second conjunct, we use halfInteger_lt_integer_succ\((t)\), which gives \(\mathtt{halfInteger}(t) {\lt} \mathtt{integer}(t+1)\). After simplification using \(\mathrm{cast}(t+1) = \mathrm{cast}(t) + 1\), this yields the desired inequality.

Definition 732 Integer Times in Range
#

The set of integer time steps in a range \([t_1, t_2]\):

\[ \mathrm{integerTimesInRange}(t_1, t_2) = \{ t \in \mathbb {Z} \mid t_1 \le t \le t_2 \} . \]
Definition 733 Measurement Times in Range
#

The set of measurement time steps in a range \([t_1 + \tfrac {1}{2}, t_2 - \tfrac {1}{2}]\):

\[ \mathrm{measurementTimesInRange}(t_1, t_2) = \{ t \in \mathbb {Z} \mid t_1 \le t {\lt} t_2 \} . \]
Definition 734 All Times in Range
#

The set of all half-integer times between integer times \(t_1\) and \(t_2\):

\[ \mathrm{allTimesInRange}(t_1, t_2) = \{ t \in \mathrm{HalfIntegerTime} \mid \mathtt{integer}(t_1) \le t \le \mathtt{integer}(t_2) \} . \]