# How to distinguish logical X vs logical Z in the stabilizer code with $k=1$?

Let's say I have a stabilizer code with $$k=1$$. I calculate the normalizer and find the values of $$A,B$$ that are anticommuting and are not in the stabilizer group. How do I know which one to assign to $$\bar X$$ and which one to $$\bar Z$$? Would an arbitrary choice work?

An arbitrary choice will work. Note that your choice will affect the logical basis (i.e. the eigenbasis of $$\bar{Z}$$), so some choices might be more convenient for you.
• That's what I suspected. Someone added the $k=1$ restriction in the question title but I think this is true in general : if you have two sets $A$ and $B$ with the right commutation relations then you can arbitrarily assign one of them to $\bar X$ and the other to $\bar Z$ Jun 30 at 14:12
• Yes, the $k=1$ restriction does not matter. You can choose your logical qubit operators for each logical qubit independently of the others (given that they commute with the operators on the other logical qubits, of course) Jun 30 at 18:22