MerLean-example

4 Rem 4: Z-Type Support Convention

This chapter establishes the Z-type support convention for Pauli operators. For a Pauli operator \(P\), the Z-type support \(\mathcal{S}_Z\) is the set of qubits on which \(P\) acts via \(Y\) or \(Z\), and the X-type support \(\mathcal{S}_X\) is the set of qubits on which \(P\) acts via \(X\) or \(Y\). A Pauli operator can be decomposed as \(P = i^{\sigma } \prod _{v \in \mathcal{S}_X} X_v \prod _{v \in \mathcal{S}_Z} Z_v\) for some phase \(\sigma \in \{ 0,1,2,3\} \). The main result is that if \(P\) commutes with an \(X\)-type logical operator \(L = \prod _v X_v\), then \(|\mathcal{S}_Z \cap \mathrm{supp}(L)| \equiv 0 \pmod{2}\).

Lemma 104 Y is both X-type and Z-type

The Pauli operator \(Y\) satisfies both \(\mathrm{isXType}(Y) = \mathrm{true}\) and \(\mathrm{isZType}(Y) = \mathrm{true}\).

Proof

Both equalities hold by reflexivity of definitional computation.

Lemma 105 Nontriviality iff X-type or Z-type

A Pauli type \(p\) is nontrivial if and only if it is X-type or Z-type (or both, i.e., \(Y\)):

\[ \mathrm{isNontrivial}(p) = \mathrm{true} \iff \mathrm{isXType}(p) = \mathrm{true} \lor \mathrm{isZType}(p) = \mathrm{true}. \]
Proof

We proceed by case analysis on \(p \in \{ I, X, Y, Z\} \). In each case, the equivalence is verified by simplification using the definitions of \(\mathrm{isNontrivial}\), \(\mathrm{isXType}\), and \(\mathrm{isZType}\).

Lemma 106 Anticommutation characterization

For Pauli types \(p\) and \(q\), \(\mathrm{commutes}(p, q) = \mathrm{false}\) if and only if \((p,q)\) is one of the pairs \((X,Z)\), \((Z,X)\), \((X,Y)\), \((Y,X)\), \((Z,Y)\), or \((Y,Z)\).

Proof

We proceed by case analysis on both \(p\) and \(q\), each ranging over \(\{ I, X, Y, Z\} \). In each of the 16 cases, the equivalence is verified by simplification using the definition of \(\mathrm{commutes}\).

Lemma 107 X commutes iff not Z-type

For any Pauli type \(q\), \(\mathrm{commutes}(X, q) = \mathrm{true}\) if and only if \(\mathrm{isZType}(q) = \mathrm{false}\).

Proof

We proceed by case analysis on \(q \in \{ I, X, Y, Z\} \) and verify each case by simplification using the definitions of \(\mathrm{commutes}\) and \(\mathrm{isZType}\).

Lemma 108 Z commutes iff not X-type

For any Pauli type \(q\), \(\mathrm{commutes}(Z, q) = \mathrm{true}\) if and only if \(\mathrm{isXType}(q) = \mathrm{false}\).

Proof

We proceed by case analysis on \(q \in \{ I, X, Y, Z\} \) and verify each case by simplification using the definitions of \(\mathrm{commutes}\) and \(\mathrm{isXType}\).

Definition 109 Z-support overlap

For Pauli operators \(P\) and \(Q\) on \(n\) qubits, the Z-support overlap is

\[ \mathrm{zSupportOverlap}(P, Q) = \mathcal{S}_Z(P) \cap \mathrm{supp}(Q). \]
Definition 110 Anticommuting positions with pure X

For a Pauli operator \(P\) on \(n\) qubits and a set \(S \subseteq \mathrm{Fin}(n)\), the anticommuting positions with pure \(X\) is

\[ \mathrm{anticommutingPositionsWithPureX}(P, S) = \{ i \in S \mid \mathrm{isZType}(P_i) = \mathrm{true} \} . \]
Lemma 111 Anticommuting positions equal Z-support intersection

For a Pauli operator \(P\) on \(n\) qubits and a set \(S \subseteq \mathrm{Fin}(n)\),

\[ \mathrm{anticommutingPositionsWithPureX}(P, S) = \mathcal{S}_Z(P) \cap S. \]
Proof

By extensionality, it suffices to show equality for an arbitrary element \(i\). We unfold the definitions of \(\mathrm{anticommutingPositionsWithPureX}\) and \(\mathrm{zSupport}\), expressing both sides using filter and membership in finsets. The equivalence then follows by the tautology that the filter condition on \(S\) combined with the Z-type check is equivalent to membership in \(\mathcal{S}_Z(P) \cap S\).

Theorem 112 Commutation with pure X iff even Z-overlap

For a Pauli operator \(P\) on \(n\) qubits and a set \(S \subseteq \mathrm{Fin}(n)\),

\[ \mathrm{commutes}(P, \mathrm{pureX}(S)) \iff |\mathcal{S}_Z(P) \cap S| \equiv 0 \pmod{2}. \]
Proof

We unfold the definition of \(\mathrm{commutes}\). The anticommuting positions are exactly those \(i\) where \(P_i\) does not commute with \((\mathrm{pureX}(S))_i\). We establish that

\[ \{ i \in \mathrm{Fin}(n) \mid \neg \mathrm{commutes}(P_i, (\mathrm{pureX}(S))_i)\} = \mathcal{S}_Z(P) \cap S \]

by extensionality. For the forward direction: if \(i \in S\), then \(\mathrm{pureX}(S)_i = X\), and by case analysis on \(P_i \in \{ I, X, Y, Z\} \), the position anticommutes precisely when \(P_i\) is Z-type. If \(i \notin S\), then \(\mathrm{pureX}(S)_i = I\), which commutes with everything, so we get a contradiction. For the reverse direction: given \(P_i\) is Z-type and \(i \in S\), we again case-split on \(P_i\) (the cases \(I\) and \(X\) are excluded by the Z-type assumption) and verify that \(Y\) anticommutes with \(X\) and \(Z\) anticommutes with \(X\). Having established this equality, the result follows by rewriting.

Theorem 113 Z-support intersection is even when commuting with pure X

If \(P\) commutes with \(\mathrm{pureX}(S)\), then \(|\mathcal{S}_Z(P) \cap S| \equiv 0 \pmod{2}\).

Proof

This follows directly from the forward direction of Theorem 112, i.e., \((\mathrm{commutes\_ with\_ pureX\_ iff}\; P\; S).\mathrm{mp}\; h\).

Theorem 114 Converse: even Z-support intersection implies commutation

If \(|\mathcal{S}_Z(P) \cap S| \equiv 0 \pmod{2}\), then \(P\) commutes with \(\mathrm{pureX}(S)\).

Proof

This follows directly from the backward direction of Theorem 112, i.e., \((\mathrm{commutes\_ with\_ pureX\_ iff}\; P\; S).\mathrm{mpr}\; h\).

Definition 115 Even cardinality
#

A finset \(S \subseteq \mathrm{Fin}(n)\) has even cardinality if \(|S| \equiv 0 \pmod{2}\):

\[ \mathrm{hasEvenCardinality}(S) \iff |S| \bmod 2 = 0. \]
Theorem 116 Commutation with X-type logical implies even Z-support

If a Pauli operator \(P\) commutes with an \(X\)-type logical operator \(L = \prod _{v \in \mathrm{supp}(L)} X_v\) of a stabilizer code \(C\), then the Z-type support of \(P\) restricted to \(\mathrm{supp}(L)\) has even cardinality:

\[ \mathrm{commutes}(P, L) \implies |\mathcal{S}_Z(P) \cap \mathrm{supp}(L)| \equiv 0 \pmod{2}. \]
Proof

We use the product representation of \(L\): by \(L.\mathrm{product\_ representation}\), the Pauli components of \(L\) are the same as those of \(\mathrm{pureX}(\mathrm{supp}(L))\). Since the commutation check depends only on the Pauli components (not the phase), we have

\[ \mathrm{commutes}(P, L) \iff \mathrm{commutes}(P, \mathrm{pureX}(\mathrm{supp}(L))). \]

Rewriting the hypothesis \(h\) with this equivalence, the result follows directly from Theorem 113 applied to \(P\) and \(\mathrm{supp}(L)\).

Theorem 117 Full support case: commutation implies even Z-support cardinality

If a Pauli operator \(P\) commutes with an \(X\)-type logical operator \(L\) whose support is the full set \(\mathrm{Fin}(n)\), then the Z-type support of \(P\) has even cardinality:

\[ \mathrm{supp}(L) = \mathrm{Fin}(n) \land \mathrm{commutes}(P, L) \implies |\mathcal{S}_Z(P)| \equiv 0 \pmod{2}. \]
Proof

From Theorem 116, we obtain \(|\mathcal{S}_Z(P) \cap \mathrm{supp}(L)| \equiv 0 \pmod{2}\). Since \(\mathrm{supp}(L) = \mathrm{Fin}(n)\) by the hypothesis \(\mathrm{hfull}\), we simplify \(\mathcal{S}_Z(P) \cap \mathrm{Fin}(n) = \mathcal{S}_Z(P)\) (using \(\mathrm{Finset.inter\_ univ}\)), yielding \(|\mathcal{S}_Z(P)| \equiv 0 \pmod{2}\).

Definition 118 X-Z exponents
#

Every single-qubit Pauli type can be written as \(X^a Z^b\) for \(a, b \in \{ 0,1\} \) (ignoring phase). The X-Z exponents map assigns:

\[ \mathrm{xzExponents}(p) = \begin{cases} (0, 0) & \text{if } p = I, \\ (1, 0) & \text{if } p = X, \\ (1, 1) & \text{if } p = Y, \\ (0, 1) & \text{if } p = Z. \end{cases} \]
Lemma 119 X exponent characterizes X-type

For a Pauli type \(p\), the first component of \(\mathrm{xzExponents}(p)\) equals \(1\) if and only if \(p\) is X-type:

\[ (\mathrm{xzExponents}(p))_1 = 1 \iff \mathrm{isXType}(p) = \mathrm{true}. \]
Proof

By case analysis on \(p \in \{ I, X, Y, Z\} \), verified by simplification using the definitions of \(\mathrm{xzExponents}\) and \(\mathrm{isXType}\).

Lemma 120 Z exponent characterizes Z-type

For a Pauli type \(p\), the second component of \(\mathrm{xzExponents}(p)\) equals \(1\) if and only if \(p\) is Z-type:

\[ (\mathrm{xzExponents}(p))_2 = 1 \iff \mathrm{isZType}(p) = \mathrm{true}. \]
Proof

By case analysis on \(p \in \{ I, X, Y, Z\} \), verified by simplification using the definitions of \(\mathrm{xzExponents}\) and \(\mathrm{isZType}\).

Definition 121 X-Z decomposition structure

The X-Z decomposition of a Pauli operator \(P\) on \(n\) qubits is a structure witnessing that:

  1. The X-type support of \(P\) is exactly \(\{ i \mid (\mathrm{xzExponents}(P_i))_1 = 1\} \).

  2. The Z-type support of \(P\) is exactly \(\{ i \mid (\mathrm{xzExponents}(P_i))_2 = 1\} \).

This captures the decomposition \(P = i^{\sigma } \prod _{v \in \mathcal{S}_X} X_v \prod _{v \in \mathcal{S}_Z} Z_v\).

Theorem 122 Every Pauli operator has an X-Z decomposition

Every Pauli operator \(P\) on \(n\) qubits admits an X-Z decomposition.

Proof

We construct the decomposition by verifying both fields. For the X-support correctness: by extensionality on an arbitrary qubit \(i\), we simplify the definitions of \(\mathrm{xSupport}\) and the filter, and the equivalence follows from the symmetric form of Lemma 119 applied to \(P_i\). For the Z-support correctness: similarly, by extensionality and simplification, the equivalence follows from the symmetric form of Lemma 120 applied to \(P_i\).

Lemma 123 Z-type support of pure X is empty

For any set \(S \subseteq \mathrm{Fin}(n)\), the Z-type support of \(\mathrm{pureX}(S)\) is empty:

\[ \mathcal{S}_Z(\mathrm{pureX}(S)) = \emptyset . \]
Proof

By extensionality on an arbitrary qubit \(i\). We unfold \(\mathrm{zSupport}\) and \(\mathrm{pureX}\), then split on whether \(i \in S\): if \(i \in S\), then \(\mathrm{pureX}(S)_i = X\), which has \(\mathrm{isZType}(X) = \mathrm{false}\); if \(i \notin S\), then \(\mathrm{pureX}(S)_i = I\), which has \(\mathrm{isZType}(I) = \mathrm{false}\). In either case, \(i\) is not in the Z-type support.

Theorem 124 Two pure X operators always commute

For any sets \(S, T \subseteq \mathrm{Fin}(n)\),

\[ \mathrm{commutes}(\mathrm{pureX}(S), \mathrm{pureX}(T)). \]
Proof

By Theorem 112, it suffices to show \(|\mathcal{S}_Z(\mathrm{pureX}(S)) \cap T| \equiv 0 \pmod{2}\). By Lemma 123, \(\mathcal{S}_Z(\mathrm{pureX}(S)) = \emptyset \), so \(\emptyset \cap T = \emptyset \) which has cardinality \(0\), and \(0 \bmod 2 = 0\).

Lemma 125 X-support intersect Z-support gives Y positions

For a Pauli operator \(P\) on \(n\) qubits,

\[ \mathcal{S}_X(P) \cap \mathcal{S}_Z(P) = \{ i \in \mathrm{Fin}(n) \mid P_i = Y\} . \]
Proof

By extensionality on an arbitrary qubit \(i\). We unfold the definitions of \(\mathrm{xSupport}\) and \(\mathrm{zSupport}\) as filters, and express intersection membership. By case analysis on \(P_i \in \{ I, X, Y, Z\} \): only \(Y\) satisfies both \(\mathrm{isXType}(Y) = \mathrm{true}\) and \(\mathrm{isZType}(Y) = \mathrm{true}\).

For a Pauli operator \(P\) on \(n\) qubits,

\[ \mathrm{supp}(P) = \mathcal{S}_X(P) \cup \mathcal{S}_Z(P). \]
Proof

By extensionality on an arbitrary qubit \(i\). We unfold the definitions of \(\mathrm{support}\), \(\mathrm{xSupport}\), and \(\mathrm{zSupport}\) as filters and express union membership. By case analysis on \(P_i \in \{ I, X, Y, Z\} \): \(I\) is in neither support (and not in \(\mathrm{supp}(P)\)), \(X\) is in \(\mathcal{S}_X\) only, \(Z\) is in \(\mathcal{S}_Z\) only, and \(Y\) is in both. In all cases, the nontriviality condition for \(\mathrm{supp}(P)\) matches the disjunction.