I am following Litinsky's paper explaining the 15-to-1 distillation protocol.
The usual "trick" done to distill, say the $|T \rangle \equiv T |+ \rangle$ magic state, is to use a code admitting a transversal $T$ gate. Basically we start by encoding $|+\rangle$ (only Clifford operations are needed), then we implement the transversal $T$ and we finally decode the state and reject it if an error has been detected.
If Clifford operations are perfect, the only errors could have been introduced during the transversal $T$. Yet, because it is precisely transversal, one fault can only introduce one error. A code of distance $3$ being able to detect $2$ errors we can guarantee a fidelity of order $p^3$ from $T$ gates having a fault rate of order $p$. For instance, the error rate of the magic state can be reduced from $p$ to $35 p^3$ if one uses the 15-to-1 distillation protocol.
The thing which confuses me is that when we move the Clifford toward the final measurements, the operations we need to do are no longer transversal. Why doesn't it break the previous reasonning?
In practice we have the following equality:
Which can then give the even simpler circuit (the last $10$ qubits can be removed).
In this last circuit, a single failure of the green operations can introduce errors on more than a single-qubit (because we are doing many-body interactions).
My question: Doesn't the commutation rule we use break the transversality aspect? Why is the probability of error of the output magic state reduced from $p$ to $35p^3$ still valid in this case?
: Regarding the answer and comment below it, I am not sure to understand how single gate failure can always be detected. In the image below, I assume that the blue "gate" introduces a $Z$ error on the last qubit only. This error commutes toward the end of the circuit and introduces an error only on the magic state. Hence it would in principle be undetected (but modify the magic state). Why cannot such thing happen?