MerLean-example

26 Def 8: Detectors

Definition 645 Detector
#

A detector is a structure \((D, f, c)\) where:

  • \(D \subseteq M\) is a finite set of measurement labels (a \(\operatorname {Finset} M\)),

  • \(f : M \to \mathbb {Z}/2\mathbb {Z}\) assigns to each measurement its ideal outcome (\(0 \leftrightarrow +1\), \(1 \leftrightarrow -1\)),

  • \(c\) is a proof of the detector constraint: \(\sum _{m \in D} f(m) = 0\) in \(\mathbb {Z}/2\mathbb {Z}\).

In the \(\{ +1, -1\} \) encoding, the constraint states that the product of ideal outcomes over the detector’s measurements equals \(+1\).

Definition 646 Observed Parity

Given a detector \(D\) and a set of time-faults \(F\), the observed parity is defined as

\[ \operatorname {observedParity}(D, F) = \sum _{m \in D.\mathrm{measurements}} \operatorname {observedOutcome}(D.\mathrm{idealOutcome}, F, m) \in \mathbb {Z}/2\mathbb {Z}. \]

In \(\{ +1,-1\} \) encoding, \(0\) means the product of observed outcomes is \(+1\), and \(1\) means it is \(-1\).

Definition 647 Detector Violation
#

A detector \(D\) is violated by a set of time-faults \(F\) if the observed parity equals \(1\):

\[ \operatorname {isViolated}(D, F) \iff \operatorname {observedParity}(D, F) = 1. \]
Definition 648 Flip Parity
#

The flip parity of a detector \(D\) with respect to faults \(F\) is the sum in \(\mathbb {Z}/2\mathbb {Z}\) of the indicator of faulted measurements in \(D\):

\[ \operatorname {flipParity}(D, F) = \sum _{m \in D.\mathrm{measurements}} \begin{cases} 1 & \text{if } \langle m \rangle \in F \\ 0 & \text{otherwise} \end{cases}. \]
Theorem 649 No-Fault Observed Parity

In the absence of faults, the observed parity of any detector equals \(0\):

\[ \operatorname {observedParity}(D, \emptyset ) = 0. \]
Proof

Unfolding the definitions of observed parity and observed outcome, for every \(m \in D.\mathrm{measurements}\) we have \(\langle m \rangle \notin \emptyset \), so the observed outcome reduces to the ideal outcome \(D.\mathrm{idealOutcome}(m)\). Rewriting the sum using this simplification, the result is \(\sum _{m \in D.\mathrm{measurements}} D.\mathrm{idealOutcome}(m)\), which equals \(0\) by the detector constraint.

Theorem 650 No Violation Without Faults

In the absence of faults, no detector is violated:

\[ \neg \, \operatorname {isViolated}(D, \emptyset ). \]
Proof

Unfolding the definition of violation, we need \(\operatorname {observedParity}(D, \emptyset ) \neq 1\). By the no-fault observed parity theorem, the observed parity is \(0\), and \(0 \neq 1\).

Theorem 651 Observed Parity Equals Flip Parity

The observed parity equals the flip parity:

\[ \operatorname {observedParity}(D, F) = \operatorname {flipParity}(D, F). \]

That is, the observed parity reduces to counting (mod 2) how many of the detector’s measurements are faulted, because the ideal outcomes cancel by the detector constraint.

Proof

Unfolding the definitions of observed parity, flip parity, and observed outcome, the sum \(\sum _{m \in D.\mathrm{measurements}} (D.\mathrm{idealOutcome}(m) + \mathbf{1}_{\langle m \rangle \in F})\) splits by the distributivity of summation as

\[ \sum _{m \in D.\mathrm{measurements}} D.\mathrm{idealOutcome}(m) \; +\; \sum _{m \in D.\mathrm{measurements}} \mathbf{1}_{\langle m \rangle \in F}. \]

By the detector constraint, the first sum is \(0\), so the result equals the flip parity.

Theorem 652 Violation Iff Flip Parity One

A detector is violated if and only if its flip parity equals \(1\):

\[ \operatorname {isViolated}(D, F) \iff \operatorname {flipParity}(D, F) = 1. \]
Proof

Unfolding the definition of violation, we rewrite the observed parity as the flip parity using the equality \(\operatorname {observedParity} = \operatorname {flipParity}\).

Theorem 653 Flip Parity Without Faults

The flip parity with no faults is \(0\):

\[ \operatorname {flipParity}(D, \emptyset ) = 0. \]
Proof

Unfolding the definition of flip parity, since no measurement label belongs to the empty fault set, every summand is \(0\), and the result follows by simplification.

Theorem 654 Violation Depends on Intersection

The violation of a detector depends only on which of the detector’s measurements appear in the fault set. If two fault sets \(F_1, F_2\) satisfy \(\langle m \rangle \in F_1 \iff \langle m \rangle \in F_2\) for all \(m \in D.\mathrm{measurements}\), then

\[ \operatorname {isViolated}(D, F_1) \iff \operatorname {isViolated}(D, F_2). \]
Proof

By the characterization of violation in terms of flip parity, it suffices to show the flip parities are equal. Both directions follow by converting the goal and applying the sum congruence: for each \(m \in D.\mathrm{measurements}\), the indicator \(\mathbf{1}_{\langle m \rangle \in F_1}\) equals \(\mathbf{1}_{\langle m \rangle \in F_2}\) by hypothesis \(h\).

Theorem 655 Violation Invariant Under Disjoint Faults

Violation is invariant if we add faults outside the detector. If no measurement of \(D\) appears in \(\mathrm{extra}\), then

\[ \operatorname {isViolated}(D, F \cup \mathrm{extra}) \iff \operatorname {isViolated}(D, F). \]
Proof

We apply the intersection-dependence theorem. For each \(m \in D.\mathrm{measurements}\), we show \(\langle m \rangle \in F \cup \mathrm{extra} \iff \langle m \rangle \in F\). The forward direction: if \(\langle m \rangle \in F \cup \mathrm{extra}\), then either \(\langle m \rangle \in F\) (done) or \(\langle m \rangle \in \mathrm{extra}\), which contradicts the disjointness hypothesis. The backward direction: if \(\langle m \rangle \in F\), then \(\langle m \rangle \in F \cup \mathrm{extra}\) by left inclusion.

Definition 656 Repeated Measurement Detector
#

A repeated measurement detector is formed from two consecutive measurements \(m_1 \neq m_2\) of the same stabilizer check with common ideal outcome \(o \in \mathbb {Z}/2\mathbb {Z}\). The detector has:

  • measurements \(= \{ m_1, m_2\} \),

  • ideal outcome \(f(m) = o\) if \(m = m_1\) or \(m = m_2\), and \(0\) otherwise.

The detector constraint holds because \(o + o = 0\) in \(\mathbb {Z}/2\mathbb {Z}\).

Definition 657 Initialization-Measurement Detector
#

An initialization-measurement detector is formed from an initialization event \(m_{\mathrm{init}}\) and a later measurement \(m_{\mathrm{meas}}\) with \(m_{\mathrm{init}} \neq m_{\mathrm{meas}}\), both having the same ideal outcome \(o\). Per Definition 7, initializations are treated as measurements, so this forms a valid detector with measurements \(\{ m_{\mathrm{init}}, m_{\mathrm{meas}}\} \) and ideal outcome \(o\) on both, satisfying the constraint \(o + o = 0\) in \(\mathbb {Z}/2\mathbb {Z}\).

Theorem 658 Repeated Measurement Violation Characterization

A repeated measurement detector on \(m_1, m_2\) with \(m_1 \neq m_2\) is violated by faults \(F\) if and only if exactly one of the two measurements is faulted:

\[ \operatorname {isViolated}(\operatorname {repeatedMeasurementDetector}(m_1, m_2), F) \iff (\langle m_1 \rangle \in F) \oplus (\langle m_2 \rangle \in F). \]
Proof

We rewrite using the flip parity characterization and unfold the definitions. The flip parity over \(\{ m_1, m_2\} \) equals \(\mathbf{1}_{\langle m_1 \rangle \in F} + \mathbf{1}_{\langle m_2 \rangle \in F}\) in \(\mathbb {Z}/2\mathbb {Z}\). For the forward direction, assuming this sum equals \(1\), we case-split on whether \(\langle m_1 \rangle \in F\) and \(\langle m_2 \rangle \in F\); in each case we simplify to conclude exactly one holds, giving exclusive or. For the backward direction, given the exclusive or, we similarly case-split and simplify to show the sum equals \(1\).

Definition 659 Syndrome
#

The syndrome of a set of time-faults \(F\) with respect to a family of detectors \((D_i)_{i \in I}\) is the set of detector indices whose detectors are violated:

\[ \operatorname {syndrome}(\{ D_i\} , F) = \{ i \in I \mid \operatorname {observedParity}(D_i, F) = 1\} . \]
Theorem 660 Membership in Syndrome

A detector index \(i\) is in the syndrome if and only if the detector \(D_i\) is violated:

\[ i \in \operatorname {syndrome}(\{ D_i\} , F) \iff \operatorname {isViolated}(D_i, F). \]
Proof

This follows by simplification, unfolding the definitions of syndrome and violation.

Theorem 661 Empty Syndrome Without Faults

The syndrome is empty when there are no faults:

\[ \operatorname {syndrome}(\{ D_i\} , \emptyset ) = \emptyset . \]
Proof

We show the filter is empty by checking that for every \(i\), the observed parity \(\operatorname {observedParity}(D_i, \emptyset ) = 0 \neq 1\), using the no-fault observed parity theorem.

Definition 662 Disjoint Union of Detectors
#

Given two detectors \(D_1, D_2\) with disjoint measurement sets and identical ideal outcomes, their disjoint union is the detector with:

  • measurements \(= D_1.\mathrm{measurements} \cup D_2.\mathrm{measurements}\),

  • ideal outcome \(= D_1.\mathrm{idealOutcome}\).

The detector constraint holds because the sum over the union splits into \(\sum _{D_1} + \sum _{D_2}\), both of which are \(0\).

Definition 663 Empty Detector
#

The empty detector has no measurements (\(D.\mathrm{measurements} = \emptyset \)). The detector constraint is trivially satisfied since the empty sum is \(0\).

Theorem 664 Empty Detector Not Violated

The empty detector is never violated:

\[ \neg \, \operatorname {isViolated}(\operatorname {emptyDetector}, F) \]

for any fault set \(F\).

Proof

Unfolding the definitions of violation, observed parity, and empty detector, the sum over the empty measurement set is \(0\), and \(0 \neq 1\).

Definition 665 Single-Measurement Detector
#

A single-measurement detector for measurement \(m\) has measurements \(= \{ m\} \) and ideal outcome constantly \(0\). The constraint \(\sum _{m' \in \{ m\} } 0 = 0\) holds trivially. This detector fires when measurement \(m\) is faulted.

Theorem 666 Single-Measurement Violation Characterization

A single-measurement detector on \(m\) is violated if and only if the measurement \(m\) is faulted:

\[ \operatorname {isViolated}(\operatorname {singleMeasurementDetector}(m), F) \iff \langle m \rangle \in F. \]
Proof

We rewrite using the flip parity characterization and unfold the definitions. The flip parity over the singleton \(\{ m\} \) is \(\mathbf{1}_{\langle m \rangle \in F}\). For the forward direction, if this equals \(1\) and \(\langle m \rangle \notin F\), we obtain a contradiction since the indicator would be \(0\). For the backward direction, if \(\langle m \rangle \in F\) then the indicator is \(1\).

Theorem 667 Violation Under Spacetime Faults

The violation status of a detector under a spacetime fault \(F\) is determined by the time-fault component. Space-faults change the quantum state but the detector constraint is purely about measurement outcome flips:

\[ \operatorname {isViolated}(D, F.\mathrm{timeFaults}) \iff \operatorname {observedParity}(D, F.\mathrm{timeFaults}) = 1. \]
Proof

This holds by reflexivity, as it is the definition of \(\operatorname {isViolated}\).

Definition 668 Detector Weight
#

The weight of a detector \(D\) is the number of measurements it contains:

\[ \operatorname {detectorWeight}(D) = |D.\mathrm{measurements}|. \]
Theorem 669 Repeated Measurement Weight

The repeated measurement detector has weight \(2\):

\[ \operatorname {detectorWeight}(\operatorname {repeatedMeasurementDetector}(m_1, m_2)) = 2. \]
Proof

Unfolding the definitions of detector weight and repeated measurement detector, the measurement set is \(\{ m_1, m_2\} \) with \(m_1 \neq m_2\), so its cardinality is \(2\).

Theorem 670 Initialization-Measurement Weight

The initialization-measurement detector has weight \(2\):

\[ \operatorname {detectorWeight}(\operatorname {initAndMeasureDetector}(m_{\mathrm{init}}, m_{\mathrm{meas}})) = 2. \]
Proof

Unfolding the definitions, the measurement set is \(\{ m_{\mathrm{init}}, m_{\mathrm{meas}}\} \) with \(m_{\mathrm{init}} \neq m_{\mathrm{meas}}\), so its cardinality is \(2\).

Theorem 671 Empty Detector Weight

The empty detector has weight \(0\):

\[ \operatorname {detectorWeight}(\operatorname {emptyDetector}) = 0. \]
Proof

Unfolding the definitions, the measurement set is \(\emptyset \), which has cardinality \(0\).

Theorem 672 Single-Measurement Weight

The single-measurement detector has weight \(1\):

\[ \operatorname {detectorWeight}(\operatorname {singleMeasurementDetector}(m)) = 1. \]
Proof

Unfolding the definitions, the measurement set is \(\{ m\} \), which has cardinality \(1\).