For a system of \(n\)  qubits, we can consider the group \(\mathcal {P}^n\)  of all
\(n\) -fold tensor products of single-qubit real-valued Pauli operators \(\lbrace I, X, iY,Z\rbrace \)  and including the phases \(\lbrace \pm 1\rbrace \) .
A stabilizer code (see e.g. [1]})
is the joint \(+1\)  eigenspace of a group of commuting Pauli operators
\(\mathcal {S}= \langle S_1,\ldots ,S_l\rangle \) , where the \(S_i\)  label a
generating set for the group. (To avoid trivial codes, we require that
\(-I \notin \mathcal {S}\) .)
If each of the \(l\)  generators are independent, then
the code space is \(2^{k}\) -dimensional where \(k = n-l\) , and there exist
\(k\)  pairs of logical operators which generate a group \(\mathcal {L}=\langle X_1, Z_1, \ldots , X_k, Z_k \rangle \) . In general, the logical
group is isomorphic to \(N(\mathcal {S})/\mathcal {S}\)  where \(N(\mathcal {S})\)  is the normalizer
of \(\mathcal {S}\)  in \(\mathcal {P}^n\) , meaning the set of all Paulis that commute with \(\mathcal {S}\)  as a set.
The logical group is isomorphic to \(\mathcal {P}^k\) , meaning that for each logical
operator in \(\mathcal {L}\)  we have that \([L_i, L_j ] = 0\)  for all \(i\ne j\) ,
and \(X_i Z_i = - Z_i X_i\)  for all \(i\) . The fact that \(\mathcal {L}\subseteq N(\mathcal {S})\)  means that
\([L_i,S_j] =0\)  for all \(S_j \in \mathcal {S}\) .
The weight of a Pauli operator is the number
of non-identity tensor factors, and the distance of a code is
the weight of the minimum weight element among all possible
non-trivial logical operators (i.e. those which are not pure
stabilizers).
