# Stabilizer codes and 1,-1 coefficients

A lot of well known codes (5 qubit code, 7 qubit Steane code, 9 qubit Shor code) have logical zero and local one which can be written as (a global scalar times) a linear combination of computational basis kets with only $$\pm 1$$ as coefficients.

Is it true that for any stabilizer code there always exists a choice of logical code words that can be written as (a global scalar times) a linear combination of computational basis kets where every coefficient is $$\pm 1, \pm i$$?

Here is my reasoning for why this should be true :

Suppose that we have a stabilizer code with stabilizer $$S$$. Then we can form a projector onto the codespace by $$P=\sum_{g \in S} g$$ We can take the image of the computational basis under this projector $$P$$. For any given $$g$$ and any computational basis ket $$v$$ then $$gv=\pm v'$$ for some other computational basis ket $$v'$$ (or possibly $$\pm i$$ if $$g$$ has some factors of $$Y$$). Adding all this up then $$Pv$$ must be some $$\mathbb{Z}[i]$$ linear combination of the computational basis kets. Is there always a way to factor out a global scalar and just get $$\pm 1,\pm i$$ relative coefficients?

• I think this can even be generalized : the entire encoding matrix has entries from +1,-1,0 (and maybe an overall normalizing scalar). You can take $k$ rows of encoding matrix as basis for codespace. Maybe an even larger generalization : any matrix derived from a tableau will also have this form. I don't have a proof but I did notice the pattern. A possible path to a proof could be looking at the form of the clifford gates involved in building the encoder Commented Aug 1, 2022 at 16:42

Any stabilizer state has a power of 2 non-zero amplitudes, which are $$\pm 1, \pm i$$ up to a common factor. See Eq. (2) in https://arxiv.org/abs/0811.0898
• Very elegant to observe that you can always pick stabilizer codewords to be stabilizer states stabilized by the $k$ generators of the code stabilizer $S$ and $n-k$ of the $\pm \overline{Z}_i$ logical Z operators from $N(S)/S$ ( $\pm$ depending on whether you want 0 o 1 for the ith logical qubit). Then corollary 2 of thm 9 (which is really appendix A of the other paper they cite arxiv.org/abs/0811.0898) completes the picture by listing facts about stabilizer states like their $\pm 1, \pm i$ coefficients. Interesting answer and a great reference! Commented Aug 2, 2022 at 15:15
• Do you know of any code that uses coefficients other than $\pm1$ in an essential way? The class of stabilizer states where exactly half the nonzero entries are $\pm i$ seems to indicate that such codes exist. But perhaps any code with some complex coefficients is just equivalent by a local unitary to a stabilizer code with all $\pm 1$ coefficients? Bottom line: I'd love to see any example code you know that uses $\pm i$ coefficients. If not then I'll just ask another question about $\pm i$ versus just $\pm 1$. Commented Aug 2, 2022 at 15:40
• Also am I missing something or is part (iv) of Thm 9 Corollary 2 just totally not true (even with footnote h)? They don't provide a proof or really any explanation so I can't try to follow their logic. But it seems like the stabilizer state for \begin{align*} &XZZXI \\ &IXZZX \\ &XIXZZ \\ &ZXIXZ \\ &ZZZZZ \end{align*} is a clear counterexample. This stabilizer state is the logical 0 for the 5 qubit code en.wikipedia.org/wiki/Five-qubit_error_correcting_code. It has 6 $1$s and 10 $-1$s. 6 and 10 are not powers of 2. You only use part (ii) so your answer is fine. Just an observation. Commented Aug 2, 2022 at 16:36
• An error in Thm 9 of arxiv.org/pdf/1711.07848.pdf misplaces a factor of 2. The proper text is $i^{(c^Ty+2y^TQy)}$. That means that the linear functional $c^T$ controls the presence of $i$ (which explains/ proves that part (iii) of corollary 2 is correct since the kernel of a linear functional is either everything or it is a codimension 1 subspace) while the quadratic part controls the sign $i^{2y^TQy}=(-1)^{y^TQy}$. There's no reason for the kernel of a quadratic form to be a power of 2 (i.e. no reason for it to be a binary linear subspace), so that's why (iv) is nonsense. Commented Oct 21, 2022 at 21:40