# Absorbing Clifford gates in Pauli measurements: we should care about the post-meas quantum state, why no Clifford correction *after* measurement?

I am reading Litinski's paper, in particular the figure 4 shown below:

To implement a computation with surface code, we need to "commute" all the Clifford toward the end of the circuit, then we absorb these in the final Pauli measurements.

I am confused by the property in the red box: for me it is only true if we don't care about the quantum state in the computation (we only care about the classical outcome of the measurement). However, to perform many circuit simplifications it seems we also need to understand how the quantum state evolves through consecutive measurements.

To be specific, the upper equation in the red box, says that if $$P P'=P' P$$ ($$P$$ and $$P'$$ are Pauli), calling $$M_{P'}$$ a measurement of Pauli $$P'$$, then:

$$M_{P'} e^{-i \pi/4 P}=M_{P'}$$

This is not true in general: take $$|\psi\rangle = |00\rangle + |11\rangle$$, $$P'=Z_1 Z_2$$, $$P=Z_1$$.

• Doing the $$Z_1 Z_2$$ measurement will give eigenvalue $$+1$$ and post-measurement state $$|\psi \rangle$$.
• Doing $$e^{-i \pi/4 Z_1}$$ rotation first will give the state $$|\psi\rangle \to |00\rangle + i |11\rangle$$. If I do afterward the $$Z_1 Z_2$$ measurement, I will also find the eigenvalue $$+1$$, but the post-measurement state will be $$|00\rangle + i |11\rangle \neq |\psi \rangle$$.

Hence the post-measurement state is different in both cases, hence the equality is not satisfied in general.

Is it that the equality should only be understood in terms of classical measurement outcomes? If so, how are we sure it doesn't cause any problem in the circuits simplification? For instance, when the circuit goes from (b) to (c) (see blue arrow), a sequence of Pauli measurements appears. It could be that not acknowledging the state evolution through the measurements implies that the circuit simplification is incorrect. How is this issue avoided?

A simple example shows that while the equalities in the red box are true if one discards the measurements, they are not sufficient to perform the simplification that Litinski performs in his paper. This is because during such simplifications, consecutive Pauli measurements occur (and neglecting the post-measurement "Clifford correction" would lead to a wrong following measurement).

To be specific, in the example below, I need to "commute" $$C$$ and $$C'$$ after the first Pauli measurement as it modifies the second Pauli measurement to be performed. Of course we don't care commuting the $$C$$ and $$C'$$ after the last measurement.