# (Why) does every CSS code allow for transversal measurement?

I recently encountered the statement that

any CSS code [that encodes single-qubit logical states] has a property that measurements can be performed qubit-wise, but the measurement outcome of every qubit must be communicated classically to obtain the result of the logical measurement.

Can someone point me to some references about why that is and what kind of classical communication is used?

• Do you know how to construct/define the logical $Z$ operator for a CSS code? Sep 21 '20 at 15:21
• As far as I know, for any stabilizer code the logical Z operator can be applied by applying the Z operator to every physical qubit. How does that help in performing a measurement? Sep 21 '20 at 15:27
• If you know that 5 qubits are in the state $|01101\rangle$, what is the expectation value of the operator $Z\otimes Z\otimes Z\otimes Z\otimes Z$? Sep 21 '20 at 15:36
• $\langle01101|Z^{\otimes 5}|01101\rangle = -1$. I'm sorry it seems I am missing the connection between applying and measuring an operator, could you elaborate? Sep 22 '20 at 8:49
• Think about how the projectors onto the $\pm 1$ eigenspaces would look like. What is the connection between the Born probabilities and the expectation value? Sep 22 '20 at 11:14

The standard construction for measurement of arbitrary tensor products of Pauli operators that works in any stabilizer code and that achieves fault-tolerance using the so-called "cat" states $$(|0\dots 0\rangle + |1\dots 1\rangle)/\sqrt{2}$$ is described in section 10.6.3 in Nielsen & Chuang.

However, the quote in the question and the subsequent reference on the following page to the use of "error correcting procedure for the classical linear codes" to process measurement results suggest that the authors refer to the following simpler fault-tolerant scheme that works for any CSS code and obtains the correct logical measurement outcome distribution, but does not produce the appropriate post-measurement state.

The key idea behind the scheme is that if we are only concerned with measurement outcome then we can exploit the fact that CSS codes split the stabilizer generators into the $$X$$ and $$Z$$ sectors to replace quantum error correction with classical error correction on measurement results.

Consider a logical qubit encoded into a block of $$n$$ physical qubits using a $$CSS(C_1, C_2)$$ code for two classical linear codes $$C_1$$ and $$C_2$$ with $$C_2^\perp \subset C_1$$. Denote the Hilbert space of the block by $$\mathcal{H}$$ and the code subspace by $$\mathcal{G} \subset \mathcal{H}$$ (thus, $$\dim \mathcal{G} = 2$$ and $$\dim \mathcal{H} = 2^n$$). Let $$S$$ be the stabilizer group of $$\mathcal{G}$$ and $$N(S)$$ the normalizer of $$S$$ in the $$n$$-qubit Pauli group $$G_n$$.

All operators in $$G_n$$ are transversal, so stabilizers and logical Pauli operators are transversal. Moreover, since $$\mathcal{G}$$ is a CSS code, we can choose stabilizer generators that are tensor products of identity and $$X$$ or identity and $$Z$$. Similarly, we can choose the logical $$\overline X$$ to be a tensor product of identity and physical $$X$$ operators and logical $$\overline Z$$ to be a tensor product of identity and physical $$Z$$ operators. For a $$Z$$ type stabilizer generator $$g_z$$, define $$b(g_z) \in \mathbb{Z}_2^n$$ to be a binary vector with $$0$$ in positions corresponding to identity and $$1$$ in positions corresponding to $$Z$$. Define $$b(\overline Z)$$ similarly.

First, take the tensor product of per-qubit operators

$$I_i = \sum_{k_i\in\{0, 1\}}|k_i\rangle\langle k_i|=|0\rangle\langle 0| + |1\rangle\langle 1| \\ Z_i = \sum_{k_i\in\{0, 1\}}(-1)^{k_i}|k_i\rangle\langle k_i|=|0\rangle\langle 0| - |1\rangle\langle 1|$$

where $$i$$ identifies a qubit, to compute the $$Z$$-type stabilizer generators

$$g_z = \sum_{k \in \mathbb{Z}_2^n} (-1)^{k \cdot b(g_z)} |k_1\rangle\langle k_1|\otimes|k_2\rangle\langle k_2|\otimes\dots\otimes|k_n\rangle\langle k_n|\tag1$$

and the logical $$Z$$ operator

$$\overline Z = \sum_{k \in \mathbb{Z}_2^n} (-1)^{k \cdot b(\overline Z)} |k_1\rangle\langle k_1|\otimes|k_2\rangle\langle k_2|\otimes\dots\otimes|k_n\rangle\langle k_n|\tag2$$

where $$\cdot$$ represents the dot product in $$\mathbb{Z}_2^n$$ (i.e. componentwise multiplication modulo $$2$$).

The procedure begins by measuring each qubit individually in the computational basis. The results form a binary vector $$m \in \mathbb{Z}_2^n$$ with $$m_i \in \{0, 1\}$$ corresponding to the measurement outcome on the $$i$$th qubit. From equation $$(1)$$ we see that given $$m$$ we can classically compute the measurement outcomes associated with all $$Z$$-type stabilizer generators using the formula $$(-1)^{m\cdot b(g_z)}$$. Next, we employ the classical error correction techniques using the code $$C_1$$ which is the classical code associated with the $$Z$$ sector of the stabilizer to identify and correct a certain number of bit flip and measurement errors in $$m$$ producing a corrected vector of measurement outcomes $$m'$$. From equation $$(2)$$ we see that given $$m'$$ we can compute the outcome of logical measurement using formula $$(-1)^{m'\cdot b(\overline Z)}$$.

Note that this measurement procedure takes the qubits into a product state thus destroying the entanglement that protects the code subspace. Therefore, the post-measurement state is not guaranteed to be in $$\mathcal{G}$$. In particular, it is neither $$|\overline 0\rangle$$ nor $$|\overline 1\rangle$$.