Solution (source code)

= Solution

Every element of the $n$-qubit <Pauli group> squares to either $1$ or $-1$. If a stabilizer generator $S_j$ had $S_j^2=-1$, closure of the group would put $-1$ in $S$, contrary to the definition. Thus $S_j^2=1$. Since Pauli operators are unitary,
$$
S_j^{-1}=S_j^\dagger,
$$
and $S_j^{-1}=S_j$ proves $S_j=S_j^\dagger$.

If two stabilizers $g,h$ anticommute and a nonzero vector $|\psi\rangle$ belonged to the codespace, then
$$
gh|\psi\rangle=|\psi\rangle,
\qquad
gh|\psi\rangle=-hg|\psi\rangle=-|\psi\rangle,
$$
a contradiction. Hence a nonzero <stabilizer code> requires $S$ to be Abelian. Its <centralizer of a stabilizer group> is
$$
C(S)=\{P\in\mathcal P_n:Pg=gP\text{ for every }g\in S\}.
$$