# Correctability of X, Y, and Z Errors in Quantum Surface Codes and Color Codes

In surface codes and color codes, when the code distance is $$d$$, you can correct up to $$[(d-1)/2]$$ Pauli errors. I would like to know what this $$[(d-1)/2]$$ Pauli errors means for $$X$$, $$Y$$, and $$Z$$. Here we consider the case where $$d=3$$. I understand that one $$X$$ error can be corrected, two $$X$$ errors cannot be corrected, one $$Z$$ error can be corrected, and two $$Z$$ errors cannot be corrected. However, if one $$X$$ error and one $$Z$$ error occur on different qubits, or if one $$X$$ error and one $$Z$$ error occur on the same qubit (i.e., a $$Y$$ error), is it definitely correctable? I would appreciate it if you could also explain the reason for this.

• A single $X$, $Y$ or $Z$ is a Pauli error. Provided there are no more than $\lfloor(d-1)/2\rfloor$ of these, they can be corrected. (Two errors on the same qubit = 1 error). Jun 6, 2023 at 14:22
• @DaftWullie Surface codes and color codes have defined X stabilizers and Z stabilizers, allowing them to correct X errors and Z errors separately. If an X error can be corrected, then a Z error can also be corrected. I think that two errors, one X error and one Z error, occurring on separate qubits can be corrected. Am I misunderstanding something? Jun 6, 2023 at 14:45
• One X and one Z error occurring on separate qubits = 2 Pauli errors (just as it does for two X errors on different qubits). Provided $2\leq\lfloor(d-1)/2\rfloor$, they can both be corrected. Jun 7, 2023 at 6:33