Does the ability to correct $Y$ error follow from the ability to correct $X$ and $Z$ errors? I suspect, that in general the answer is no. Are there examples, then? If there are no examples, is there a proof?

  • $\begingroup$ In the standard cases of CSS or non-degenerate, ability to correct X and Z implies ability to correct Y as you get distinct syndromes for the two errors. Outside of that, coming up with an example possibly stretches the definition of what it means to be an error correcting code: if a single Y cannot be corrected, then your error correcting code is distance 1, which is not really en error correcting code! $\endgroup$
    – DaftWullie
    Jun 13, 2022 at 9:17
  • $\begingroup$ @DaftWullie, thx I see. But disagree on stretching, in principle I can definitely an ecc for an arbitrary linear space of errors. My motivation comes from playing with a simple ML model to learn ecc from a scratch. I noticed that if it is trained on X errors alone, it won't correct Z and Y errors, but training on X and Z errors gives a model which can correct all errors. Not sure if this is a coincidence or a pattern. The model assumes no special structure like CSS at all. $\endgroup$ Jun 13, 2022 at 11:55
  • $\begingroup$ @NikitaNemkov maybe you can try to narrow your question a bit closer to your problem at hand. $\endgroup$
    – Mauricio
    Jun 13, 2022 at 15:38

2 Answers 2


I've understood from the comments that the OP is willing to consider a more general error set, rather than focussing specifically on the more standard case of distance being a measure of the number of single-qubit errors that can be tolerated. In that context, the following construction may be of assistance:

Consider a standard distance 5 CSS code, $C$. This code can correct an error $X_1Z_2Z_3$ or an error $Z_1Z_4$ because CSS codes are independently distance 5 on the two X/Z types. On the other hand, the product of the two errors is $Y_1Z_2Z_3Z_4$, which contains 4 $Z$ errors. So, the code will not be able to correct this error (or, at least, there surely exist codes that do not correct this error).

Next, let's introduce a unitary $U$ such that \begin{align*} U(X_1Z_2Z_3)U^\dagger&=X_1 \\ U(Z_1Z_4)U^\dagger&=Z_1 \end{align*} Defining a new code $C'$ as $UCU^\dagger$ (please allow the abuse of notation; I hope it's clear what I mean), it must be able to correct errors $X_1$ and $Z_1$. However, it will not be able to correct the product error $$U(Y_1Z_2Z_3Z_4)U^\dagger=U(X_1Z_2Z_3)U^\dagger U(Z_1Z_4)U^\dagger=Y_1.$$

Does such a $U$ exist? Yes

enter image description here

Note that, throughout, I've been lazy about imaginary numbers appearing, and have instead written $XZ=Y$. This makes no difference to what we're after.

  • $\begingroup$ Thanks! The construction looks a bit artificial, how did you come up with it? $\endgroup$ Jun 15, 2022 at 18:31
  • $\begingroup$ Yes, very artificial. I think all cases of what you asked for will be. I simply said to myself "For a CSS code, can I make two errors which anti-commute and which are correctable, but whose product is not correctable? Then, is there a unitary transformation that maps these errors to Pauli operators?" (I needed the anti-commutation because that's something that's preserved under unitary transformations) $\endgroup$
    – DaftWullie
    Jun 16, 2022 at 8:02
  • $\begingroup$ Great, your explanation does help! Very cool to have you around:) $\endgroup$ Jun 16, 2022 at 10:26

They can be detected if a sign and bit flip are detected. A Y-error is the simultaneous occurrence of X and Z errors. As $ZX=iY$.

  • $\begingroup$ Well, that a linear combination of correctable errors is correctable is usually straightforward to show, because most things are linear in quantum mechanics. However, that this applies to the multiplication of errors is not obvious to me. $\endgroup$ Jun 12, 2022 at 15:16
  • $\begingroup$ @NikitaNemkov Here is a link where they discusses Shor 9 qubit code: quantum.phys.cmu.edu/QCQI/qitd213.pdf and why it also decodes Y-errors $\endgroup$
    – Mauricio
    Jun 12, 2022 at 17:59
  • 2
    $\begingroup$ This works for the Shor code because Z and X errors can be detected and corrected independently. Why should that work for an arbitrary code? $\endgroup$ Jun 12, 2022 at 18:24
  • 1
    $\begingroup$ Another argument : similarly to Y=XZ two-qubit error is a product of two single qubit errors, but is not expected to be corrected by distance 3 code. $\endgroup$ Jun 12, 2022 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.