# Logical effect of gate on logical operators for the $[[4,2,2,]]$ code

The $$S$$ gate has the following effect (when applied to a Pauli operator $$P$$ by conjugation $$SPS^{\dagger}$$):

$$S: X \rightarrow Y$$ $$S: Z \rightarrow Z$$

The logical operators for the $$[[4,2,2]]$$ code can be defined as follows: $$X_{L1}= XIXI$$ $$X_{L2}=XXII$$ $$Z_{L1}=ZZII$$ $$Z_{L2}=ZIZI$$

I have introduce $$SSSS$$ as a potential new logical gate for the $$[[4,2,2]]$$ code. I want to find its logical effect on the logical operators.

I know that $$SSSS: XIXI \rightarrow YIYI$$ $$SSSS: XXII \rightarrow YYII$$ $$SSSS: ZZII \rightarrow ZZII$$ $$SSSS: ZIZI \rightarrow ZIZI$$

In other words, if we denote $$SSSS$$ as $$S_{L}$$, then:

$$S_{L}: X_{L1} \rightarrow - X_{L1}Z_{L2}$$ $$S_{L}: X_{L2} \rightarrow - X_{L2}Z_{L1}$$ $$S_{L}: Z_{L1} \rightarrow Z_{L1}$$ $$S_{L}: Z_{L2} \rightarrow Z_{L2}$$

I have read on this post that $$S_{L}$$ implements a logical $$CZ$$ times a logical $$ZZ$$. However, I do not understand how this is the case.

Let me implement a logical $$CZ$$ followed by a logical $$ZZ$$ on the following, to check if the effect is the same:

$$X\otimes I \xrightarrow{CZ} X \otimes Z \xrightarrow{ZZ} ZX \otimes I$$ $$I \otimes X \xrightarrow{CZ} Z \otimes X \xrightarrow{ZZ} I \otimes ZX$$ $$Z \otimes I \xrightarrow{CZ} Z \otimes I \xrightarrow{ZZ} I \otimes Z$$ $$I \otimes Z \xrightarrow{CZ} I \otimes Z \xrightarrow{ZZ} Z \otimes I$$

Which instead seems to have the effect:

$$X_{L1} \rightarrow -X_{L1}Z_{L1}$$

$$X_{L2} \rightarrow -X_{L2}Z_{L2}$$

$$Z_{L1} \rightarrow Z_{L2}$$

$$Z_{L2} \rightarrow Z_{L1}$$

Can anyone identify where I am going wrong?

When checking the effect of $$CZ$$ and $$ZZ$$ on the 4 Pauli strings, you have to use conjugation for each of the two transformations (as you do it for $$S$$).
You applied this correctly for the $$CZ$$ conjugations, for example: $$CZ (X\otimes I) CZ = X \otimes Z$$.
But your $$ZZ$$ conjugations are incorrect. It should be:
$$(Z\otimes Z) (X \otimes Z) (Z \otimes Z) = - X\otimes Z$$
and likewise for the others. With correct application of $$ZZ$$ conjugation, the two results will agree.