MerLean-example

2 Rem 2: Graph Convention

This chapter formalizes the graph convention for the gauging measurement protocol. Given a connected graph \(G = (V_G, E_G)\), we identify vertices with qubits in the support of a logical operator \(L\). Each edge receives an auxiliary gauge qubit initialized in \(\ket {0}\), and dummy vertices (those outside \(\operatorname {supp}(L)\)) receive auxiliary qubits initialized in \(\ket {+}\). The key property is that dummy vertices do not affect the measurement outcome, since measuring \(X\) on \(\ket {+}\) always returns \(+1\).

Definition 36 Qubit Type
#

An inductive type classifying the different types of qubits involved in the gauging measurement protocol:

  • LogicalSupport: Original code qubits in the support of \(L\).

  • EdgeQubit: Auxiliary gauge qubits on edges, initialized in \(\ket {0}\).

  • DummyQubit: Auxiliary qubits for dummy vertices, initialized in \(\ket {+}\).

Definition 37 Initial State
#

An inductive type representing the possible initial quantum states for qubits:

  • zero: The \(\ket {0}\) state (computational basis zero).

  • plus: The \(\ket {+}\) state, i.e., \((\ket {0} + \ket {1})/\sqrt{2}\).

  • encoded: Unspecified state (for logical qubits, determined by the encoding).

Definition 38 Initial State Assignment
#

The function assigning an initial state to each qubit type:

  • \(\mathrm{LogicalSupport} \mapsto \mathrm{encoded}\) (state determined by the code encoding),

  • \(\mathrm{EdgeQubit} \mapsto \mathrm{zero}\) (initialized in \(\ket {0}\)),

  • \(\mathrm{DummyQubit} \mapsto \mathrm{plus}\) (initialized in \(\ket {+}\)).

Definition 39 Graph Measurement Outcome
#

An inductive type representing possible measurement outcomes for \(X\)-basis measurements:

  • plus: Outcome \(+1\).

  • minus: Outcome \(-1\).

Definition 40 Outcome to Sign
#

A function converting a measurement outcome to a sign \((\pm 1)\) as an integer: \(\mathrm{plus} \mapsto 1\) and \(\mathrm{minus} \mapsto -1\).

Definition 41 Outcome Multiplication
#

Multiplication of measurement outcomes, corresponding to the product of signs:

\begin{align*} \mathrm{plus} \cdot m & = m, \\ \mathrm{minus} \cdot \mathrm{plus} & = \mathrm{minus}, \\ \mathrm{minus} \cdot \mathrm{minus} & = \mathrm{plus}. \end{align*}
Definition 42 \(X\) Measurement on \(\ket {+}\) State
#

The result of measuring \(X\) on the \(\ket {+}\) state is defined to be \(\mathrm{plus}\) (i.e., outcome \(+1\)), since \(\ket {+}\) is the \(+1\) eigenstate of the Pauli \(X\) operator.

Theorem 43 \(X\) Measurement on \(\ket {+}\) is \(+1\)

The \(X\) measurement on the \(\ket {+}\) state always returns the \(\mathrm{plus}\) outcome:

\[ \mathrm{xMeasurementOnPlusState} = \mathrm{GraphMeasurementOutcome.plus}. \]
Proof

This holds by definitional equality (reflexivity).

Definition 44 Deterministic Plus Outcome
#

A structure capturing the deterministic outcome property of measuring \(X\) on \(\ket {+}\). It consists of:

  • A state \(\mathrm{is\_ plus\_ state}\) of type \(\mathrm{InitialState}\),

  • A proof that \(\mathrm{is\_ plus\_ state} = \mathrm{plus}\),

  • An outcome of type \(\mathrm{GraphMeasurementOutcome}\),

  • A proof that \(\mathrm{outcome} = \mathrm{plus}\).

Definition 45 Gauging Graph Convention
#

A gauging graph convention specifies how a connected graph \(G\) relates to the logical operator \(L\) being measured. It consists of:

  • A vertex type \(V\) with a \(\mathrm{Fintype}\) instance and decidable equality,

  • A simple graph structure on \(V\) with decidable adjacency,

  • A proof that the graph is connected,

  • A finite set \(\mathrm{logicalSupport} \subseteq V\) representing the support of \(L\),

  • A proof that \(\mathrm{logicalSupport}\) is nonempty (i.e., \(L\) is nontrivial).

This captures the conventions: (1) vertices of \(G\) are identified with qubits in \(\operatorname {supp}(L)\), (2) each edge \(e \in E_G\) gets an auxiliary gauge qubit in \(\ket {0}\), (3) dummy vertices (\(V_G \setminus \operatorname {supp}(L)\)) get auxiliary qubits in \(\ket {+}\), and (4) dummy vertices have no effect on the measurement outcome.

Definition 46 Support Vertex
#

A vertex \(v\) of a gauging graph \(G\) is a support vertex if \(v \in \mathrm{logicalSupport}(G)\).

Definition 47 Dummy Vertex
#

A vertex \(v\) of a gauging graph \(G\) is a dummy vertex if \(v \notin \mathrm{logicalSupport}(G)\).

Theorem 48 Vertex Classification

Every vertex \(v\) of a gauging graph \(G\) is either a support vertex or a dummy vertex:

\[ \forall v \in V_G,\quad G.\mathrm{isSupportVertex}(v) \lor G.\mathrm{isDummyVertex}(v). \]
Proof

We consider whether \(v \in \mathrm{logicalSupport}(G)\). If \(v \in \mathrm{logicalSupport}(G)\), then the left disjunct holds. If \(v \notin \mathrm{logicalSupport}(G)\), then the right disjunct holds.

Theorem 49 Support and Dummy Exclusive

Support and dummy vertex classifications are mutually exclusive:

\[ \forall v \in V_G,\quad \neg \bigl(G.\mathrm{isSupportVertex}(v) \land G.\mathrm{isDummyVertex}(v)\bigr). \]
Proof

Assume both \(G.\mathrm{isSupportVertex}(v)\) and \(G.\mathrm{isDummyVertex}(v)\) hold. Decomposing this conjunction, we have \(v \in \mathrm{logicalSupport}(G)\) (from the support hypothesis) and \(v \notin \mathrm{logicalSupport}(G)\) (from the dummy hypothesis). This is a contradiction.

Definition 50 Dummy Vertices Set

The set of dummy vertices of a gauging graph \(G\) is defined as

\[ \mathrm{dummyVertices}(G) = \{ v \in V_G \mid G.\mathrm{isDummyVertex}(v)\} . \]
Definition 51 Number of Dummy Vertices
#

The number of dummy vertices is \(|\mathrm{dummyVertices}(G)|\).

The vertices of a gauging graph partition into support and dummy vertices:

\[ |V_G| = |\mathrm{logicalSupport}(G)| + |\mathrm{dummyVertices}(G)|. \]
Proof

We first establish that \(V_G = \mathrm{logicalSupport}(G) \cup \mathrm{dummyVertices}(G)\). By extensionality, it suffices to show that for an arbitrary vertex \(v\), \(v \in V_G\) if and only if \(v \in \mathrm{logicalSupport}(G) \cup \mathrm{dummyVertices}(G)\). Simplifying, since every \(v\) is in the universal set, we apply the vertex classification theorem: either \(v\) is a support vertex (left case) or \(v\) is a dummy vertex (right case, using the definition of \(\mathrm{dummyVertices}\) and that \(v \in V_G\)).

Next, we establish that \(\mathrm{logicalSupport}(G)\) and \(\mathrm{dummyVertices}(G)\) are disjoint. By the disjointness criterion for finite sets, suppose \(a \in \mathrm{logicalSupport}(G)\) and \(b \in \mathrm{dummyVertices}(G)\) with \(a = b\). Substituting, the membership in \(\mathrm{dummyVertices}\) (after simplification using its filter definition) gives \(a \notin \mathrm{logicalSupport}(G)\), contradicting \(a \in \mathrm{logicalSupport}(G)\).

Finally, we compute:

\[ |V_G| = |\mathrm{univ}| = |\mathrm{logicalSupport}(G) \cup \mathrm{dummyVertices}(G)| = |\mathrm{logicalSupport}(G)| + |\mathrm{dummyVertices}(G)|, \]

where the last step uses the cardinality formula for disjoint unions.

Definition 53 Vertex Qubit Type Assignment

The qubit type assigned to each vertex \(v\) of a gauging graph \(G\):

\[ \mathrm{vertexQubitType}(v) = \begin{cases} \mathrm{LogicalSupport} & \text{if } G.\mathrm{isSupportVertex}(v), \\ \mathrm{DummyQubit} & \text{otherwise.} \end{cases} \]
Theorem 54 Support Vertex Qubit Type

If \(v\) is a support vertex, then \(\mathrm{vertexQubitType}(v) = \mathrm{LogicalSupport}\).

Proof

By simplification using the definition of \(\mathrm{vertexQubitType}\) and the hypothesis that \(v\) is a support vertex, the conditional reduces to the \(\mathrm{LogicalSupport}\) branch.

Theorem 55 Dummy Vertex Qubit Type

If \(v\) is a dummy vertex, then \(\mathrm{vertexQubitType}(v) = \mathrm{DummyQubit}\).

Proof

Unfolding the definitions of \(\mathrm{vertexQubitType}\) and \(\mathrm{isSupportVertex}\), and simplifying using the negation of membership (from the dummy vertex hypothesis), the conditional evaluates to \(\mathrm{DummyQubit}\).

Definition 56 Edge Qubit Type

All edges are assigned the \(\mathrm{EdgeQubit}\) type: for any edge \(e \in E_G\),

\[ \mathrm{edgeQubitType}(e) = \mathrm{EdgeQubit}. \]
Definition 57 Vertex Initial State

The initial state for a vertex qubit \(v\) is determined by its qubit type:

\[ \mathrm{vertexInitialState}(v) = \mathrm{initialState}(\mathrm{vertexQubitType}(v)). \]
Definition 58 Edge Initial State

The initial state for an edge qubit is always \(\ket {0}\):

\[ \mathrm{edgeInitialState}(e) = \mathrm{zero}. \]
Theorem 59 Dummy Vertex Initial State

Dummy vertex qubits are initialized in \(\ket {+}\): if \(v\) is a dummy vertex of \(G\), then

\[ \mathrm{vertexInitialState}(v) = \mathrm{plus}. \]
Proof

Unfolding the definition of \(\mathrm{vertexInitialState}\), we rewrite using the fact that \(\mathrm{vertexQubitType}(v) = \mathrm{DummyQubit}\) (by the dummy vertex qubit type theorem). Then \(\mathrm{initialState}(\mathrm{DummyQubit}) = \mathrm{plus}\) holds by reflexivity.

Theorem 60 Edge Initial State is Zero

For any edge \(e\), the edge initial state is \(\ket {0}\):

\[ \mathrm{edgeInitialState}(e) = \mathrm{zero}. \]
Proof

This holds by definitional equality (reflexivity).

Definition 61 Dummy Vertex Measurement Outcome

The measurement outcome for a dummy vertex is defined to be \(\mathrm{plus}\) (i.e., \(+1\)), since the dummy qubit is in \(\ket {+}\), which is the \(+1\) eigenstate of \(X\).

Theorem 62 Dummy Measurement Always Plus

Measuring \(X\) on any dummy vertex returns \(+1\):

\[ \forall v \in V_G,\quad G.\mathrm{isDummyVertex}(v) \Rightarrow G.\mathrm{dummyVertexMeasurementOutcome}(v) = \mathrm{plus}. \]
Proof

This holds by definitional equality (reflexivity).

Theorem 63 Dummy Product is One

The product of measurement outcomes over any set of dummy vertices equals \(1\):

\[ \forall S \subseteq V_G,\quad \bigl(\forall v \in S,\; G.\mathrm{isDummyVertex}(v)\bigr) \Rightarrow \prod _{v \in S} 1 = 1. \]
Proof

Let \(S\) be given and assume all vertices in \(S\) are dummy vertices. The product \(\prod _{v \in S} 1 = 1\) follows by simplification using the fact that the product of the constant \(1\) over any finite set equals \(1\).

Definition 64 Number of Edges
#

The number of edges \(|E_G|\) in the gauging graph, which equals the number of gauge qubits.

Definition 65 Number of Auxiliary Qubits

The total number of auxiliary qubits is the sum of edge qubits and dummy qubits:

\[ \mathrm{numAuxiliaryQubits}(G) = |E_G| + |\mathrm{dummyVertices}(G)|. \]
Definition 66 Total Qubits

The total number of qubits involved in the gauging protocol is the sum of logical support qubits and auxiliary qubits:

\[ \mathrm{totalQubits}(G) = |\mathrm{logicalSupport}(G)| + \mathrm{numAuxiliaryQubits}(G). \]

The total number of qubits can be expanded as:

\[ \mathrm{totalQubits}(G) = |\mathrm{logicalSupport}(G)| + |E_G| + |\mathrm{dummyVertices}(G)|. \]
Proof

By simplification using the definitions of \(\mathrm{totalQubits}\) and \(\mathrm{numAuxiliaryQubits}\), the goal reduces to

\[ |\mathrm{logicalSupport}| + (|E_G| + |\mathrm{dummyVertices}|) = |\mathrm{logicalSupport}| + |E_G| + |\mathrm{dummyVertices}|, \]

which follows by integer arithmetic (associativity of addition).

Definition 68 Effective Logical Support

The effective logical support when gauging \(L\) with dummy vertices is the entire vertex set \(V_G\). This captures the convention that we gauge the operator \(L \cdot \prod _{v \in \mathrm{dummy}} X_v\):

\[ \mathrm{effectiveLogicalSupport}(G) = V_G. \]
Theorem 69 Effective Support is All Vertices

The effective logical support equals the universal set of vertices:

\[ G.\mathrm{effectiveLogicalSupport} = \mathrm{univ}. \]
Proof

This holds by definitional equality (reflexivity).

Theorem 70 Logical Support Subset of Effective

The original logical support is contained in the effective logical support:

\[ \mathrm{logicalSupport}(G) \subseteq \mathrm{effectiveLogicalSupport}(G). \]
Proof

Let \(v \in \mathrm{logicalSupport}(G)\). By simplification using the definition of \(\mathrm{effectiveLogicalSupport}\), the goal is \(v \in \mathrm{univ}\), which holds since every element belongs to the universal set.

Theorem 71 Dummy Vertices Do Not Affect Outcome

The main theorem of this remark: dummy vertices have no effect on the gauging measurement outcome. For any finite set of dummy vertices, the product of their contributions is \(1\):

\[ \forall S \subseteq V_G,\quad \bigl(\forall v \in S,\; G.\mathrm{isDummyVertex}(v)\bigr) \Rightarrow \prod _{v \in S} \begin{cases} 1 & \text{if } G.\mathrm{isDummyVertex}(v), \\ 0 & \text{otherwise} \end{cases} = 1. \]
Proof

Let \(S\) be a set of vertices and assume \(\forall v \in S\), \(G.\mathrm{isDummyVertex}(v)\). We first establish that for each \(v \in S\), the conditional expression \((\text{if } G.\mathrm{isDummyVertex}(v) \text{ then } 1 \text{ else } 0) = 1\). This follows by simplification using the hypothesis \(G.\mathrm{isDummyVertex}(v)\), which makes the conditional evaluate to \(1\).

Rewriting the product using this pointwise equality (via \(\mathrm{Finset.prod\_ congr}\)), we obtain \(\prod _{v \in S} 1 = 1\), which holds by the fact that the product of the constant \(1\) over any finite set equals \(1\).

Theorem 72 Dummy Contribution is Neutral

The contribution of each dummy vertex to the measurement outcome is the neutral element: for any dummy vertex \(v\),

\[ \mathrm{toSign}(G.\mathrm{dummyVertexMeasurementOutcome}(v)) = 1. \]
Proof

Let \(v\) be a vertex and \(h_v\) a proof that \(v\) is a dummy vertex. By simplification using the definitions of \(\mathrm{dummyVertexMeasurementOutcome}\) (which equals \(\mathrm{plus}\)) and \(\mathrm{plus\_ toSign}\) (which equals \(1\)), we obtain the result.