# Is Toffoli a fault tolerant transversal gate of the repetition code on bit-flip-error-only qubits?

Suppose you have physical qubits that only have bit flip noise (no phase flip noise, no unwanted measurements, no leakage, no amplitude decay, etc; just unwanted X rotations). Such qubits can be kept alive, protected from the bit flip noise, using just the repetition code. And you are doing so.

A transversal Toffoli between logical qubits A, B, C works by applying physical Toffoli gates pairwise (tripletwise?) across the physical qubits making up A, B, and C.

You attempt to apply a logical Toffoli between your repetition code qubits by applying transversal Toffolis across them. Is this correct? Is the transversal Toffoli a fault tolerant logical Toffoli, when applied to repetition codes, given that the only type of noise present is bit flip noise?

The rep code transversal Toffoli is not fault tolerant in this context. For example, here is a circuit which encodes 3 qubits $$|+\rangle|0\rangle|0\rangle$$ into separate distance 3 rep codes, then applies the transversal Toffoli with one X error, then decodes. Note that by the end the $$|+\rangle$$ qubit's state has been destroyed. Specifically it was unintentionally measured by the decoding process, causing it to decay to the center of the Bloch sphere:

A potential point of confusion here is that, normally, transversal gates are trivially fault tolerant. But that assumes we're using a "proper" quantum error correcting code that protects against both X and Z errors, which is not the case here. The rep code is protecting against X error, but it is vulnerable to Z error. Unfortunately, the Toffoli gate can turn X error into Z error. An $$X_1$$ error before $$\text{Toffoli}_{1,2,3}$$ is equivalent to a $$X_1 \cdot \text{CNOT}_{2,3}$$ error afterward. The Pauli sum decomposition of the CNOT error includes Z Pauli terms, and these terms are not corrected by the code.

Another potential point of confusion is that classically the rep code transversal Toffoli is fault tolerant. But that's only because the uncorrected Z errors are irrelevant classically.

Yet another potential point of confusion is that the transversal CNOT is fault tolerant in this context, so why shouldn't the Toffoli be? But note that $$X_1$$ before $$\text{CNOT}_{1,2}$$ is equivalent to $$X_1 \cdot X_2$$ after. In the Toffoli case an X error on the control propagated into an error that had Z terms in its decomposition, but in the CNOT case it propagates into an error that still only has X terms. Everything ends up working out because the CNOT "preserves noise bias" (X begets X, Z begets Z, but never do they cross). The Toffoli doesn't preserve noise bias.

• Presumably this is also a feature of transversal c-NOT, not just toffoli? (Just for the sake of having the simplest possible case) Nov 26, 2021 at 11:46
• @DaftWullie I'll add a note about that. The transversal CNOT is fault tolerant in this context, because it can't propagate X error terms into Z error terms. Nov 26, 2021 at 11:48
• Ah yes! fair enough. Nov 26, 2021 at 11:49
• The simplest possible case is probably $CZ$ (which is transversal if the block size $n$ is odd), because it sends $XI$ error to $XZ$ error. Nov 26, 2021 at 17:25
• @mgn Oh you're objecting to the question title not saying "fault tolerant". Yeah that makes sense; done. Nov 26, 2021 at 19:07