# Can all stabilizer and logical generators of a stabilizer code be written without any Pauli $Y$s?

For an $$[[n,k,d\ge2]]$$ error-detecting qubit stabilizer code there are $$n-k$$ stabilizer generators and $$2k$$ logical generators ($$k$$ logical $$X$$ generators and $$k$$ logical $$Z$$ generators). Allowing for conjugation by local Clifford gates and some valid choice of logical $$X$$ and logical $$Z$$ can we always write the stabilizer and logical generators of this code without using any Pauli $$Y$$ operators?

• Since every qubit stabilizer state is LC equivalent to a graph state which only has $X$s and $Z$s in its generators we know that for all the stabilizer generators and half (the logical $X$s or logical $Z$s) this conjecture is true. Commented May 21, 2023 at 20:36

A surface code with twists has data qubits that are depended on in the X, Y, and Z bases. So it's impossible to get rid of the Y with single qubit rotations.

In this diagram:

• white squares are X basis stabilizers
• black squares are Z basis stabilizers
• The rectangles with four bulbs are mixed 4 body stabilizers with X on one end and Z on the other
• The end rectangles with five bulbs are the twists: 5 body stabilizers with 2 Xs, 2 Zs, and a Y
• The lines are the anticommuting pair of observables forming the qubit. There's a horizontal one and a vertical one, which meet in the bottom right.
• The red parts of the observables are X basis components
• The blue parts of the observables are Z basis components
• The purple parts of the observables are Y basis components
• When these three different colors meet at one location that's Y basis component of the observable

The code extends beyond what's shown. It can terminate in normal boundaries somewhere else, as long as they're not too close to the twists.

• Thanks for this example! One question: while I definitely see that I cannot use LC gates to remove the $Y$ on a twist, it's not obvious to me that a non-canonical (i.e. non-local) set of stabilizer generators wouldn't do the trick. Is there an easy way to show this cannot be accomplished? Commented May 21, 2023 at 20:55
• @JonasAnderson I would rephrase your question as "does the size of gate required to remove the Y grow with the code distance (the separation between the twists)?". If you can use non-local gates, you can turn any code into any other code or even decode it entirely, so it's vacuously possible to remove the Y that way. I don't know the answer to the former question. Commented May 21, 2023 at 21:19
• Sorry to be confusing. I only allow LC gates, but do allow any choice of stabilizer generators which gives the same codespace. So you can multiply canonical generators together to make new stabilizer generators, but the codespace (at least up to LC gates) remains the same. Non-local gates could change the distance of the code while the operations I just mentioned do not change the distance or rate of the code. Commented May 21, 2023 at 21:27

Starting with a general presentation (stabilizer and logical generators) of an $$[[n,k,d]]$$ qubit stabilizer code $$\left[ \begin{array}{c|c} H^{n-k,n}_X & H^{n-k,n}_Z \\ \hdashline L^{k,n}_{X|X} & L^{k,n}_{X|Z} \\ L^{k,n}_{Z|X} & L^{k,n}_{Z|Z} \\ \end{array} \right],$$ where $$H$$ denotes stabilizer generators and $$L$$ denotes logical generators. We can apply the following operations without changing the codespace:

$$I$$: Multiply any row by a stabilizer generator.

$$II$$: Multiply two anticommuting logicals. $$l_{X_1}\rightarrow l_{X_1}l_{Z_1}$$.

$$III$$: Multiply two logicals of the same type. $$(l_{X_1}, l_{X_2}, l_{Z_1}, l_{Z_2}) \rightarrow (l_{X_1}, l_{X_2}l_{X_1}, l_{Z_1}l_{Z_2}, l_{Z_2})$$.

$$IV$$: Multiply two logicals of the different type. $$(l_{X_1}, l_{X_2}, l_{Z_1}, l_{Z_2}) \rightarrow (l_{X_1}l_{Z_2}, l_{X_2}l_{Z_1}, l_{Z_1}, l_{Z_2})$$.

Local Clifford (LC) operations are also allowed. I believe this list is exhaustive for operations that preserve the codespace.

Now using rule $$I$$ we can transform the matrix above to: $$\left[ \begin{array}{cc|c} I^{n-k} & H_X^{k,k}& H^{n-k,n}_Z \\ \hdashline L^{k,n}_{X|X} & & L^{k,n}_{X|Z} \\ L^{k,n}_{Z|X} & & L^{k,n}_{Z|Z} \\ \end{array} \right],$$ where $$I^m$$ is the $$m\times m$$ Identity matrix.

Let $$\tilde{M}$$ denote a matrix with only zero entries on the diagonal. Then using LC operators (conjugation at the appropriate qubits by $$S$$) and using rule $$I$$ to `clear' rows of the logicals we have:

$$\left[ \begin{array}{cc|cc} I^{n-k} & H_X^{k,k}& \tilde{H}^{n-k,n-k} & H^{n-k,k}_Z \\ \hdashline 0^{n-k} & L^{k,k}_{X|X} & L^{k,n-k}_{X|Z} & L^{k,k}_{X|Z} \\ 0^{n-k} & L^{k,k}_{Z|X} & L^{k,n-k}_{Z|Z} & L^{k,k}_{Z|Z} \\ \end{array} \right].$$

Now, we can use rule $$III$$ and conjugation by LC operators to clean up the logical $$X$$s:

$$\left[ \begin{array}{cc|cc} I^{n-k} & \color{red}{H_X^{k,k}}& \tilde{H}^{n-k,n-k} & \color{red}{H^{n-k,k}_Z} \\ \hdashline 0^{n-k} & I^k & L^{k,n-k}_{X|Z} & \tilde{L}^{k,k}_{X|Z} \\ 0^{n-k} & \color{red}{L^{k,k}_{Z|X}} & L^{k,n-k}_{Z|Z} & \color{red}{L^{k,k}_{Z|Z}} \\ \end{array} \right].$$

The generators are now guaranteed free of $$Y$$s except for the $$k$$ locations indicated by the $$\color{red}{red}$$ matrices. Using the rules above I don't think it's possible to remove the $$Y$$s entirely. This result also agrees with the well known result that any stabilizer state is LC equivalent to a graph state (graph states have no $$Y$$s in their stabilizer generators). We see that if $$k=0$$ we recover that result. Also, for $$k>0$$ we can choose stabilizer and logical generators such that $$Y$$s have support on at most $$k$$ qubits.

Note: This is not a proof, since I haven't shown that the rules are complete and that the rules cannot be used to remove all $$Y$$s above.