# If a quantum error correcting code can correct every single-qubit $X$ and $Z$ error, can it also correct every single-qubit $Y$ error?

Let $$\mathcal{C}$$ be a given arbitrary $$n$$ qubit quantum error correcting code which can correct any single qubit $$X$$ error and any single qubit $$Z$$ error, i.e., $$\{X_i\}_{i=1}^n$$ & $$\{Z_i\}_{i=1}^n$$.

Should this code also be able to correct $$\{Y_i\}_{i=1}^n$$ errors?

I agree that $$\mathcal{C}$$ can correct any linear combination, $$a X_i + b Z_j$$ where $$a,b \in \mathbb{C}$$, and can also detect any $$X_iZ_j$$ or $$Z_iX_j$$ errors. But should it always be able to correct $$Y_i$$ errors?

I can convince myself that this holds true for some stabilizer codes, but what about any arbitrary code? The discussion here is not satisfactory enough for me. How can we formally approach this?

One approach I could think of is using the Knill-Laflamme theorem. Let $$E$$ be the set of correctable errors of $$\mathcal{C}$$ (Kraus operator for correctable noise channel). $$E =\{X_1, X_2 , \cdots, X_n, Z_1, Z_2, \cdots, Z_n\} \equiv \{E_\alpha\}\,.\tag{1}$$

Then, from the Knill-Laflamme theorem, we know that $$P E_\alpha^{\dagger}E_\beta P = \gamma_{\alpha \beta} P \tag{2}$$ holds true, where $$[\gamma]$$ is hermitian and $$P$$ is the projector on the codespace of $$\mathcal{C}$$.

But what can we conclude about the following, $$\forall i,j,\alpha$$?

$$P Y_i E_\alpha P =\, ? \tag{3.1}$$ $$P E_\alpha^{\dagger} Y_j P=\, ?\tag{3.2}$$ $$P Y_i Y_j P=\, ? \tag{3.3}$$

• Not sure I fully understand your question. But take the '$Y$ repetition code' on $n$ qubits where the stabilizer generators are $S_i=Y_i Y_{i+1}$. This is a distance 1 quantum code since a single $Y$ is a logical operator but all up to $n-1$ purely $X$ and $Z$ errors are detected errors. Commented Nov 10, 2023 at 15:02
• @JonasAnderson Thank you for your comment. The question I am asking is, if a code can correct any one qubit $X$ error and also one qubit $Z$ error, does this imply that the code should also have the ability to correct any one qubit $Y$ error? If so, how can we prove that rigorously? Commented Nov 10, 2023 at 19:13

TL;DR: No. The ability to correct single-qubit $$X$$ and $$Z$$ errors does not imply the ability to correct single-qubit $$Y$$ errors.

## Stabilizer generators

Consider the $$[\![7,3]\!]$$ code with stabilizer group $$S$$ generated by \begin{align} G_0&=IIIYYYY\\ G_1&=IYYIIYY\\ G_2&=YIYIYIY\\ G_3&=XXXXXXX. \end{align} This is like the Steane code where the $$X$$ and $$Z$$ sectors have been replaced with the $$Y$$ sector and where $$X^{\otimes 7}$$ has been introduced to tell $$X$$ and $$Z$$ errors apart. The maneuver adds two logical qubits, but will turn out to reduce the code distance.

Any single-qubit $$X$$ and $$Z$$ error gives rise to a syndrome $$g_3g_2g_1g_0$$ where the three least significant bits identify the affected qubit and the most significant bit discerns between $$X$$ and $$Z$$. Thus, there is a simple and effective recovery procedure for these errors.

On the other hand, every single-qubit $$Y$$ error gives rise to the same syndrome $$1000$$. If there is degeneracy in the code, this information could perhaps be sufficient for successful diagnostics and recovery. Not here. Logical operators live in $$N(S)\setminus S$$, but $$N(S)$$ contains many weight-two operators while $$S$$ contains none. Therefore, the code has distance two. But then some single-qubit errors cannot be corrected. Since all single-qubit $$X$$ and $$Z$$ errors can be corrected, then some single-qubit $$Y$$ errors can't be.

Thus, we have a stabilizer code that corrects all single-qubit $$X$$ and $$Z$$ errors but fails to correct some single-qubit $$Y$$ errors.

## Logical operators

Another, less rigorous, but perhaps more pedagogical way to see this is to find a viable set of logical operators, such as \begin{align} \overline{X}_1&=IIIXXXX\\ \overline{Z}_1&=IIYIIIY\\ \overline{X}_2&=IXXIIXX\\ \overline{Z}_2&=IIIIYIY\\ \overline{X}_3&=XIXIXIX\\ \overline{Z}_3&=IIIIIYY. \end{align} Clearly, certain pairs of single-qubit $$Y$$ errors combine to give a logical operator. But all such errors yield the same syndrome, so no decoder can tell them apart. However, failure to tell them apart is now a logical error.

Once again, we conclude that our stabilizer code corrects all single-qubit $$X$$ and $$Z$$ errors but fails to correct some single-qubit $$Y$$ errors.

## Intuition

This is a special case of a general fact: errors corrected by a quantum error correcting code form a vector space, but not necessarily an algebra. Less abstractly, if $$E_1$$ and $$E_2$$ can be corrected, then so can $$aE_1+bE_2$$, but not necessarily $$E_1E_2$$. The general case is of course easy to see because $$E_1E_2$$ may have a higher weight than $$E_1$$ and $$E_2$$.

The code above demonstrates that this fact is deeper than the simple observation about weight. Instead of considering the weight one should consider what gives rise to syndrome information. Non-trivial syndrome arises when an error operator and a check operator anticommute. However, if both $$E_1$$ and $$E_2$$ anticommute with a check operator $$G$$ then $$E_1E_2$$ commutes with $$G$$. This may deny the decoder useful syndrome information preventing $$E_1E_2$$ from being correctly diagnosed.