In this work, we compute the number of [[n,k]]d stabilizer codes made up of d -dimensional qudits, for arbitrary positive integers d . In a seminal work by Gross \cite{Gross2006} the number of [[n,k]]d stabilizer codes was computed for the case when d is a prime (or the power of a prime, i.e., d=pm , but when the qudits are Galois-qudits). The proof in \cite{Gross2006} is inapplicable to the non-prime case. For our proof, we introduce a group structure to [[n,k]]d codes, and use this in conjunction with the Chinese remainder theorem to count the number of [[n,k]]d codes. Our work overlaps with \cite{Gross2006} when d is a prime and in this case our results match exactly, but the results differ for the more generic case. Despite that, the overall order of magnitude of the number of stabilizer codes scales agnostic of whether the dimension is prime or non-prime. This is surprising since the method employed to count the number of stabilizer states (or more generally stabilizer codes) depends on whether d is prime or not. The cardinality of stabilizer states, which was so far known only for the prime-dimensional case (and the Galois qudit prime-power dimensional case) plays an important role as a quantifier in many topics in quantum computing. Salient among these are the resource theory of magic, design theory, de Finetti theorem for stabilizer states, the study and optimisation of the classical simulability of Clifford circuits, the study of quantum contextuality of small-dimensional systems and the study of Wigner-functions. Our work makes available this quantifier for the generic case, and thus is an important step needed to place results for quantum computing with non-prime dimensional quantum systems on the same pedestal as prime-dimensional systems.
Galois qudits are
q-dimensional quantum systems whose choice of Pauli group encodes the arithmetic of some finite field
Fq. They differ from the more familiar modular qudit, which are the same quantum system but whose choice of Pauli group are the clock and shift operators, which encode the arithmetic of integer addition and multiplication modulo
q. Galois qudits are a useful mathematical construct that allow us to leverage the mathematical tools that are native to the larger qudit while only physically building smaller qudits. In particular, a Galois qudit of dimension
q=2s is exactly the same thing as a collection of
s qubits, not only in its Hilbert space, but also in its Pauli group, and Clifford hierarchy. This formalism has found a lot of utility recently in constructing quantum error-correcting codes over qubits with useful properties.
In this review, we build on existing literature to collect and formalise facts and proofs about Galois qudits over binary extension fields. We define them and their Clifford hierarchies, describe what it means to measure their Pauli operators, describe their stabiliser tableaux, formally define qudit-to-qubit mappings, and finally describe quantum Reed-Solomon codes.
We prove that on any two-dimensional lattice of qudits of a prime dimension, every translation invariant Pauli stabilizer group with local generators and with the code distance being the linear system size is decomposed by a local Clifford circuit of constant depth into a finite number of copies of the toric code stabilizer group (Abelian discrete gauge theory). This means that under local Clifford circuits, the number of toric code copies is the complete invariant of topological Pauli stabilizer codes. Previously, the same conclusion was obtained under the assumption of nonchirality for qubit codes or the Calderbank–Shor–Steane structure for prime qudit codes; we do not assume any of these.
Bravyi and Gosset [S. Bravyi and D. Gosset, Phys. Rev. Lett. 116, 250501 (2016)] recently gave classical simulation algorithms for quantum circuits dominated by Clifford operations. These algorithms scale exponentially with the number of
T gates in the circuit, but polynomially in the number of qubits and Clifford operations. Here we extend their algorithm to qudits of odd prime dimension. We generalize their approximate stabilizer rank method for weak simulation to qudits and obtain the scaling of the approximate stabilizer rank with the number of single-qudit magic states. We also relate the canonical form of qudit stabilizer states to Gauss sum evaluations and give an
O(n3) algorithm for calculating the inner product of two
n-qudit stabilizer states.
Recent work has shown that quantum double models can be used to circumvent the Bravyi-Koenig bound. In particular, this is achieved through code-switching protocols in which non-Pauli stabilizer phases appear as intermediate codes. We introduce the
XCd(k) stabilizer formalism, which generalizes the Pauli stabilizer formalism by combining Pauli-
X operators with diagonal operators drawn from a fixed level
k of the Clifford hierarchy on prime-dimensional qudits. This yields a natural class of beyond-Pauli stabilizer models, including many twisted quantum double phases. We classify a large class of these
XCd(k) stabilizer states, showing that they are uniform superpositions over affine-linear subspaces with diagonal phases. In particular, when the stabilizers of a state require operators from level
k of the Clifford hierarchy, we show that the diagonal gates required to produce the phases in the wavefunction sit one level higher. We further show that every 2D twisted quantum double
Dω(Zpn) with
ω a product of type-III cocycles and
p an odd prime admits a realization using only Clifford (
k=2) stabilizers, and we conjecture that phases where
ω contains a type-I or type-II cocycle require level-
p Clifford-hierarchy stabilizers for
p-dimensional qudits. Finally, we demonstrate that a pair of qudit toric codes may be deterministically prepared in a logical magic state by measuring
XCd(k) stabilizers. Together, these results provide a concrete stabilizer framework for topological codes beyond Pauli stabilizer models and their logical gates.
We describe the symmetry group of the stabilizer polytope for any number n of systems and any prime local dimension d. In the qubit case, the symmetry group coincides with the linear and anti-linear Clifford operations. In the case of qudits, the structure is somewhat richer: For n = 1, it is a wreath product of permutations of bases and permutations of the elements within each basis. For n > 1, the symmetries are given by affine symplectic similitudes. These are the affine maps that preserve the symplectic form of the underlying discrete phase space up to a non-zero multiplier. We phrase these results with respect to a number of a priori different notions of “symmetry,” including Kadison symmetries (bijections that are compatible with convex combinations), Wigner symmetries (bijections that preserve inner products), and symmetries realized by an action on Hilbert space. Going beyond stabilizer states, we extend an observation of Heinrich and Gross [Quantum 3, 132 (2019)] and show that the symmetries of fairly general sets of Hermitian operators are constrained by certain moments. In particular: the symmetries of a set that behaves like a 3-design preserve Jordan products and are therefore realized by conjugation with unitaries or anti-unitaries. (The structure constants of the Jordan algebra are encoded in an order-three tensor, which we connect to the third moments of a design). This generalizes Kadison’s formulation of the classic Wigner theorem on quantum mechanical symmetries.
Nonstabilizerness (magic) is the quantum resource that, together with stabilizer operations, makes universal quantum computation possible. However, quantifying nonstabilizerness is difficult. The standard measure sums over exponentially many Pauli operators, and for quantum codes no quantitative theory has been available. A structural observation removes this obstacle: the Clifford sector carries no magic and can be removed by a Clifford transformation, leaving an order-three object whose magic is an exactly evaluable fourth moment. Removing this inert background yields closed forms for several code families: a formula for all Dicke states, reducing a 100-qubit case from
4100 terms to a short binomial sum; a bound for cubic-phase codes (twisted quantum doubles and non-Abelian topological order), saturated only by the
D4 code; and a cyclic/zero criterion for group multiplication states. For codeword-stabilized (CWS) codes, the companion paper \cite{Liu26arXiv} carries this reduction to its conclusion: the most magical codes are exactly the Sidon sets, and the nonstabilizerness bounds the code's transversal non-Clifford power. Together these results reduce the computation of nonstabilizerness for a broad class of codes to finite classical counting problems, and identify the maximally magical codes among them.