Counting stabiliser codes for arbitrary dimension

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 (Ref. [23]) 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=p^m$, but when the qudits are Galois-qudits). The proof in Ref. Ref. [23] 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 Ref. Ref. [23] 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.


Introduction
The stabilizer formalism (which will be explained in detail in Section 2) has become an indispensable part of the study of quantum computing.Some of its salient applications are as follows: it forms the bedrock for the vast field of quantum error correcting codes (QECC) [30].Randomising over stabilizer states or Clifford unitaries (see Eq. (18) for the definition of a Clifford unitary) serves as an important application, for instance, for computing capacities of quantum channels [1], data hiding [2] and the study of noise-compounding in quantum circuits (randomized benchmarking) [3,4].It also demarcates a boundary between the classical simulability of quantum computations via the Gottesmann-Knill theorem [5], and the onset of quantum complexity for which some non-stabilizerness is necessary.The non-universal nature of stabilizer operations [6] and the need to compensate this deficiency with non-stabilizer operations manifests in a resource theory of "non-stabilizerness", a.k.a., magic (see Ref. [45,46,47]), where stabilizer operations are the free resource (see Subsection 1.1 for an explanation of stabilizer operations and the resource theory with respect to which it is defined).While the basic mathematical preliminaries which support all the above have been developed in many works (for e.g.see Ref. [9], [23]), there remain some gaps, particularly for quantum computing with multiqudit systems for arbitrary d.And while qubit systems are envisaged as the paradigmatic building blocks of quantum computing, qudits of larger dimensions may offer their own benefits (for e.g.see Ref. [10,11,12,13,14,15]), owing to which it is imperative to study them.Among these, it is easier to study multiqudit systems when the dimension d is a prime number, or when d is the power of a prime, i.e., d = p m , while, simultaneously, the configuration space of the qudit system is the Galois field F p m .We call such a qudit a Galoisqudit [17].Many important results which were obtained for qubits may be easily generalised to such qudit systems (this has been noted in many places, for e.g. in the introduction in Ref. [62]).This contrasts with qudit systems, whose configuration space is Z d , when d is not a prime number.We refer to such qudit systems simply as qudits since this work is about such qudits, but wherever disambiguation is required, we may instead refer to them as modular qudits [18].While there has been a lot of seminal work on such modular qudit systems [19,20,21,22,23,24,25,26,27,28], some significant gaps remain.For instance, one of those gaps is the computation of the number of [[n, k]] d stabilizer codes of such qudits (stabilizer codes are defined in Subsection 2.4).We will label this number as C[[n, k]] d (see Remark 1 for disambiguation on the usage of the symbol d).C[[n, k]] 2 was computed in a seminal paper Ref. [6] (a recent proof also appeared in Ref. [8]), and for Galois-qudit systems, C[[n, k]] F p m was computed in another seminal paper, Ref. [23].In this work we compute C [[n, k]] d for arbitrary d ≥ 2. Our work overlaps with earlier works [6,23,8] for the case when d is a prime number, and in that case our results match exactly.Typically one is interested in the order of magnitude of C [[n, k]] d since it may act as an important quantifier.For such a reader, we present here the main result.
Corollary 1 (Corollary 4).Let c = 2.17.Then the number of [[n, k]] d stabilizer codes scales as +c , (1) the number of [[n, k]] d stabilizer code spaces scale as +c , (2) and thus the number of stabilizer states scale as Here we make a distinction between an [[n, k]] d stabilizer code, and the corresponding stabilizer code spaces, which is one of the d n−k subspaces associated with such a stabilizer code.[[n, k, d]] code, wherein parameter d stands for the distance of the code.In our usage, d refer to the dimension of the Hilbert space of a single qudit, and not the distance of the code.

Remark 1. One often encounters the phrase
The number of stabilizer states, i.e., C state [[n]] d , plays the role of an important quantifier in quantum computing.Before this work, C state [[n]] d was known only for prime d (and for F p m number systems), and, thus, its application as a quantifier was limited to these cases.We list below the salient topics where it has been used as a quantifier before.

Resource theory of magic
To initiate the interested reader into the resource theory of stabilizer-operations we refer them to a short summary in Appendix A. For more comprehensive treatments on the topic, see Ref. [46,47,49].For some recent interesting developments in the topic, we further refer the reader to Ref. [63].The most significant application of C state [[n]] d is that stabilizer states are the extremal points of the stabilizer polytope, and many measures of magic are defined as optimizations over this polytope.Since C state [[n]] d scales super-exponentially for prime-dimensional systems (and Galois-qudit systems), computing these measures of magic is an intractable problem for such systems.The earliest known measure in this category is the relative entropy of magic1 [46], after which the robustness of magic was defined in Ref. [47].The robustness of magic has an operational interpretation: it gives an upper bound on the classical simulation complexity of the quantum Clifford+π/8 circuits (see also Ref. [48]), and scales exponentially in the number of π/8 gates.It may also be used for the optimality of π/8-gate counts in the gate-synthesis problem.In Ref. [49] the regularised robustness of magic was introduced, and its computation, while superpolynomially faster, still suffers from an exponential run-time.We also refer the reader to a recent work Ref. [51] which tries to optimize the classical simulability of Clifford+π/8 circuits, in the manner introduced by Ref. [48].The intractability of these measures has also encouraged the search for new quantifiers of magic, for instance, see Ref. [50]

Classical simulation of stabilizer-only operations
The resource theoretic perspective of Subsection 1.1 deems stabilizer operations to be a free resource.The freeness of this resource comes into question if the classical simulation of stabilizer operations has appreciable costs.It is with the aim of minimizing this simulation cost that a qubit stabilizer simulator such as STIM (see Ref. [52]) was developed.Any such simulation requires as a pre-requisite adequate memory to store the stabilizer state.Ref. [6,23] inform us that this is O n 2 bits for qubit systems.Our work supplies this knowledge for qudit systems for general d.

Frame potentials for stabilizer states
In Ref. [53], Kueng and Gross established that a uniform ensemble of multiqubit stabilizer states are complex projective 3-designs.To prove this, they computed explicitly the frame-potential associated with this ensemble of states.And this frame potential was computed using C state [[n]] 2 , which was borrowed from Ref. [6] and Ref. [23].While for d ≥ 3, it is known that multi-qudit stabilizer states aren't projective 3-designs, one may nevertheless still be interested in the projectivedesign which this ensemble gives rise to.While the result in Ref. [23] may be employed for this purpose for only prime values of d, our results allows one to obtain the result for arbitrary values of d.

de Finetti theorem for stabilizer states
In Ref. [54] a de Finetti theorem for stabilizer states was established for quantum states on tcopes of n-qudit systems, where d is prime.To summarize it, let us consider the action of the t-th tensor power of the n-qudit Clifford group on t-copies of an n-qudit system, i.e., U ⊗t , where n , and let L be the commutant of this tth tensor power of the Clifford group, i.e., L ∈ L implies that U ⊗t L U † ⊗t = L. Let a quantum state ρ commute with all L in L. Then ρ has the following property.Define ρ s = Tr i 1 ,i 2 ,•••i t−s ρ be the reduced state, which is obtained by tracing out t − s subsystems from ρ.The subsystems which are traced out are arbitrary.Then there exists some probability distribution p σ S on the n-qudit stabilizer states σ S such that where C is some constant, σ S is a stabilizer state of an n-qudit systems and p σ S is a probability distribution on these states.The exponential scaling in the number of traced out subsystems, i.e., t − s contrasts with the ordinary de Finetti result, whose scaling is of the form O (s/t) (see Ref. [55]).The exponential scaling of the stabilizer version of the de Finetti theorem is proved using C state [[n]] d , which was computed in Ref. [23] for prime d (and Galois qudits).We anticipate it to be possible for Corollary 1 to provide a similar exponential scaling for the case when d is nonprime.

Others
We mention some other topics where C state [[n]] d for prime d was employed.We hope that our result could find similar applications for non-prime d.
(i) Quantum contextuality: In Ref. [60], . We believe that this does not exclude it altogether from being a quantity of interest for the quantum computing and information community.For instance see the discussion in Ref. [7]: the question posed there is whether there is a known way to sample efficiently from the set of all [[n, k]] 2 stabilizer groups for arbitrary k.Ref. [23] may be used to give a sampling algorithm for this purpose.
The challenge in computing C[[n, k]] d , for nonprime d, is that Z d is not a field.In particular, only elements which are co-prime with d will have multiplicative inverses.The phase space of an n-modular qudit system is the 2n−fold Cartesian product of Z d , i.e., Z 2n d .We need to treat it like a vector space which is defined over a field.Towards this end, we will borrow some basics terms and definitions from the theory of vector spaces wherever this is appropriate.We stress though, that the jargon we borrow from linear algebra is actually superfluous, and all the necessary concepts can be phrased in terms of more primitive concepts in the theory of abelian groups and its subgroups.Nevertheless, a rigorous justification of viewing Z 2n d as a vector space and applying concepts and definitions from the theory of vector spaces will be justified in the appendix.[58], but for the case when Z d is a field2 .And in this case, we already know simpler methods to compute C[[n, k]] d , for e.g.[6,23].
The paper is organised as follows.In Section 2 we give the necessary preliminaries of the stabilizer formalism: we will introduce the n-qudit Weyl-Heisenberg group (also known as the generalised Pauli group), we define stabilizer codes along with their check matrices and related concepts.In Section 3, we explain the group theoretical structure of [[n, k]] d stabilizer codes, and in Section 4 we show how an arbitrary element of T(2n, k, Z d ) may be decomposed into a product of elements from four different subgroups.In Section 5 we count C[[n, k]] d .We conclude in Section 6.

Preliminaries
Various preliminaries are introduced in this section, along with the notations and explanations of their usage.

The ring Z d
Let Z denote the set of all integers.Let d be an arbitrary positive integer such that d ≥ 2. Z d then denotes the set of integers modulo d: where, on the left hand side of Eq. (5

Using Z n d as a vector space
Let n be a positive integer.The n-fold Cartesian product of d satisfies all the axioms which a usual vector space will satisfy.Thus, any a = (a 1 , • • • , a n ) ∈ Z n d will be called a vector.That being said, since Z d is not necessarily a field, Z n d doesn't form a vector space.Technically, Z n d is called a module over a commutative ring [29].The algebra in Z n d is richer than that for vector spaces defined over fields, and one may not blindly generalise results from vector spaces over fields to Z n d .But we will be able to borrow the following concepts from linear algebra.
We now list some corollaries which follow from Definition 1. (iii) For any m < n, any set of m LI vectors may be extended to form a basis for Z n d .

Corollary 2. (i) Any set of n LI vectors forms a basis for
(iv) If the columns of an n × m matrix are LI, then viewed as a linear map from Despite the fact that Z n d is not necessarily a vector space, the following terms in Corollary 2: basis, linear span, subspace, dimension, matrix, linear map, range and kernel can be applied and used in the same manner as done when working with a vector space over fields.The reader is further directed to the Appendix B for a rigorous justification of these terms.

Generalised Pauli group on n qudits
We introduce the single qudit Pauli group P (d) using its defining representation, which acts on C d , where d is an arbitrary positive integer greater than or equal to 2. The construction of the defining representation of P (d) for arbitrary d has been done earlier in many works [19,20,21,22,23,24,25,26,27,28].Among these, we choose [22].First, let us introduce an orthonormal basis for C d : {|j⟩} d−1 j=0 , where the label j is taken from Z d .With respect to this basis, define the linear operators X and Z as follows.
where ω := exp 2πi/d, (d-th root of unity).Since j ∈ Z d , it is understood that the operation of addition in j + 1 is performed in Z d .The commutation relations between X and Z are given by ZX = ωXZ.( When d = 2, X = ( 0 1 1 0 ), and Z = 1 0 0 −1 , that is, we get the well-known Pauli matrices for the qubit case.When d is odd, P (d) := ⟨X, Z⟩.It is easily seen that an arbitrary element takes the form Group composition is given by ) which is the just the composition rule of the Heisenberg-Weyl group [23].The order of each element is at most d.For the case when d is even, often it is convenient 3 to introduce an additional 3 For even d, the group ⟨X, Z⟩ has some undesirable properties: while , and P (d) := ⟨ζ1, X, Z⟩.Then an arbitrary element in The group composition law of two arbitrary elements is given by .For the odd d case, , whereas for the even d case, we have that P , where X j represents the operator with X on the j-th qudit and 1 on all the remaining qudits.Neglecting the phase factors of ω j and ζ j , we may represent an arbitrary element of the n-qudit Pauli group as where a := (u, v) T ∈ Z 2n d is a 2n-ordered tuple with entries in Z d .It is easily seen that group composition law is given by [22] where and I n is the n × n identity matrix.From Eq. ( 12), the commutation relation for the Pauli operators is where It is cumbersome to keep track of which operator has order d and which has order 2d.By adding ζ to the group, we can obtain another group element ζXZ whose order is d.This is preferable to us because, while ω a XZ ∈ ⟨ζ1, XZ⟩ continues to have order 2d, we can always multiply this with ζ to get an order d element.The important point is that elements like X and ζXZ are put on the same footing.See [64] for a treatment of the even d case without the redundancy ζ phase factor.
Eq. ( 14) implies that which commutes with all elements of Thus the factor group n for an n-qudit system is defined as the normaliser of the Weyl-Heisenberg group in the unitary group over the n-qudit system.
The Clifford group is homomorphic to the group of 2n × 2n symplectic matrices Sp(2n, Z d ) over where Λ is given in Eq. (15).

Stabilizer codes on n qudits
The general framework of stabilizer codes was introduced in [30].Among the many references available in the literature, we refer the reader to [37], for a beginner friendly introduction to quantum error correction.
To define an [[n, k]] d stabilizer code space, we will need to first define a stabilizer group S.
n , with the following properties.(i) they commute with each other, (ii) the order of Often, one includes another condition, i.e., spectrum of each g j always contains +1.If any g j doesn't satisfy this condition, one may replace g j with ω a g j (or ζ a g j , as appropriate), so that ω a g j (or ζ a g j ) has eigenvalues +1.One may associate to S, a subspace of the Hilbert space C(S), which is defined as (20) dim C(S) = d k (see Theorem 1, in [27]).It is easily seen that C(S) is the unique subspace stabilized by S, and is hence called the stabilizer code space corresponding to S. Since dim C(S) = d k , C(S) encodes k qudits within itself, and thus C(S) is said to be an [[n, k]] d stabilizer code space, where the subscript denotes the dimension d of a single qudit (see Remark 1).
is spanned by a single vector, we refer to that vector as a stabilizer state.Remark 4. The case when k = n covers the scenario when we're encoding the whole Hilbert space into itself.We are not interested in this scenario.
Note that g j = g(a j ) for some a j ∈ Z 2n d .Given a j 's instead of g j 's, one may construct the g j 's upto an overall phase factor, from the a j 's using Eq.(11).For now, we ignore the loss of this phase factor in going from g j to a j , and identify the subgroup S in terms of the a j 's instead of the g j 's [37].This is done by arranging the a j 's in a 2n × (n − k) matrix, which is called the check matrix of S. The role played by these phase factors in constructing S from {a j } n−k j=1 is explained after Eq. (25) below.
The aforementioned two conditions on g j 's may be phrased in terms of equivalent conditions on a j 's.
Condition Eq. ( 22) follows from Eq. ( 14), and Condition Eq. ( 23) is equivalent to the fact that a j 's are linearly independent and span an (n−k)dimensional subspace.The 2n × (n − k) matrix H can be extended to a full 2n × 2n symplectic matrix S. A partial construction of this full 2n × 2n matrix can be found in Ref. [37].We refer the reader to Appendix C for such a construction.
where E is a 2n × (n − k) matrix, and L X and L Z are 2n × k matrices.The columns of L X and L Z correspond to the logical X and the logical Z operators respectively, whereas the columns of E may be interpreted as the correctable Pauli errors.An explanation of this may be found in Section 4 in conjunction with Section E of the Appendix.When k = 0, H is a 2n × n matrix, and M takes the following form.
where E is also a 2n × n matrix.
When we alter the generators g j of S as g j → ω a j g j , for a j ∈ Z d , then if a j ̸ = 0 for some j, ω a j g j are the generators of another stabilizer group S ′ .By replacing S with S ′ in Eq. (20), one can associate to S ′ a unique corresponding [[n, k]] d stabilizer code space C (S ′ ).C(S) and C (S ′ ) are orthogonal because the +1 eigenspaces of g j and ω a j g j are orthogonal when a j ̸ = 0.There are d n−k possible choices for a j (including the choice a j = 0 for all j), thus we get d n−k orthogonal code spaces.Since each of these code spaces is of dimension d k , the direct sum of all these code spaces is the full Hilbert space.Since a j do not encode the overall phase factor of the Paulis, the entries in the check-matrix don't change when the phase factors ω a j are changed in the generators.So the check matrix H and its symplectic extension S for all the above codes spaces are the same.We will refer to a code as the aforementioned collection of code spaces without meaning to distinguish among them.Thus a code is associated to a check matrix without any ambiguity.We will refer to a code space C(S) as the subspace of the Hilbert space C d ⊗n associated to a unique stabilizer group S.This is as per Eq.(20).

Group structure of [[n, k]] d stabilizer codes
In this section, we will obtain a group theoretic structure underpinning all [[n, k]] d stabilizer codes.Let H 1 be the check matrix of some [[n, k]] d stabilizer code, and A be an (n − k) × (n−k) invertible matrix.Then H 1 A is the checkmatrix of the same stabilizer code.This is because the columns of H 1 A are merely (invertible) linear combinations of the columns of H 1 , i.e., the generators corresponding to the column vectors of H 1 may be recovered from the generators corresponding to the column vectors of H 2 .Define H 2 = H 1 A. Let S 1 and S 2 be a 2n × 2n symplectic matrix obtained by extending H 1 and H 2 respectively (see Section C of the Appendix).Since S 1 , S 2 ∈ Sp(2n, Z d ), there exists a matrix M such that We first assume that k ≥ 1.Then it is clear that M needs to have the following form so that  19), we get the conditions for M to be symplectic: where Sp(2k, Z d ) denotes the group of 2k × 2k symplectic matrices over Z d .Using Eq. (28) and Eq.(29), M takes the following form The derivation of Eq. ( 30)-( 33) is not essential for this work, and is hence shifted to the Appendix D.
Note that when k = 0, M in Eq. (34) takes the form Theorem 1.The set of all 2n × 2n symplectic matrices of the form given in Eq. ( 34) form a subgroup of Sp(2n, Z d ).
Proof.We use the following subgroup test: if G is a group, H a subset of G, then H is a sub-group if for all h, g ∈ H, h −1 g ∈ H too. First note that the inverse of a symplectic matrix M is given by Λ T M T Λ, since Λ T M T ΛM = Λ T Λ = I.This gives us Thus we see that M −1 has the form given by Eq. (34).Next, consider the composition of two symplectic matrices of the form Eq. (34).
Note that the matrix on the RHS of Eq. ( 37) is symplectic, since it is a product of two symplectic matrices.Also it is of the form given in Eq. (34).
The subgroup given in Theorem 1 will be denoted by T(2n, k, Z d ).It encapsulates the degree of freedom with which one may extend the check matrix of the [[n, k]] d trivial code to a symplectic matrix.
Remark 5.The subgroup T(2n, k, Z d ) has appeared in the quantum computing literature earlier.For instance, in [56], T(2n, 0, 2) (referred to as the Borel subgroup of Sp(2n, Z d ), denoted as B n ) is employed to construct the Bruhat decomposition for Sp(2n, Z 2 ).This decomposition is used to give an asymptotically tight parameterization of arbitrary stabilizer circuits.More recently, it appears in [57], as the subgroup of the Clifford group, whose action does not change the figures of merit of distillation protocols, which are studied in [57].See also Remark 7.
The trivial code is the code corresponding to the stabilizer group At the same time, right multiplying the symplectic matrix of any [[n, k]] d stabilizer code by an element of T(2n, k, Z d ) yields another another sym-plectic matrix of the same stabilizer code.We saw this in Eq. (26).In the next section we show that T(2n, k, Z d ) decomposes as a product of three subgroups, and highlight the roles played by these three subgroups in quantum error correction for stabilizer codes.

Decomposition of T(2n, k, Z d )
The matrix M given in Eq. (34) can be decomposed as a product of four matrices. where and where Furthermore, we have the following.
Corollary 3.For any M ∈ T(2n, k, Z d ), the decomposition in Eq. ( 38) is unique, i.e., there are unique matrices M S , M L , M E and M T such that Eq. (38) holds.
Proof.Since M S and M L are constructed from some of the blocks of M , there is a unique way of obtaining them.Having obtained M S and M L , Since N and L are matrix blocks within M (M L M S ) −1 , and K A is entirely determined by N and L), a unique M E is obtained from M (M L M S ) −1 , which also gives us a unique M T .Hence proved.
We next note that four subsets of matrices of M S , M L , M E and M T form four distinct subgroups, and the intersection of any pair of these subgroups is {1}.43)), are also subgroups of T(2n, k, Z d ).For M T to satisfy Eq. (31), K S has to be symmetric but is otherwise unconstrained, while for M E to satisfy Eq. (31), K A has to be anti-symmetric and moreover satisfies the equation K A = N T L−L T N (see Eq. ( 43)).It is easily verified that both are abelian subgroups, and also commute with each other.We refer to them as the symmetric and anti-symmetric abelian subgroups Remark 6.When k = 0, the B A (n, k, d) and Sp(2k, Z d ) subgroups shrink to the trivial group which contains only the identity.The decomposition of T(2n, k, Z d ) then takes the following form.
The uniqueness of the decomposition (i.e., Corollary 3) holds for this case well.
Remark 7. The group T(2n, k, Z d ) is often referred to in the mathematics literature as the parabolic subgroup associated to a k-dimensional isotropic subspace of Z 2n d [58].Furthermore, there is more structure to it than we mentioned in its decomposition above (see Remark 8).

Remark 8. We borrow this observation from [58]. Let us denote by B the group generated by the union of B S (n, k, d) and B
In the Appendix Section E, we elaborate on the significance of these subgroups in quantum error correction.While the roles played by GL(n − k, Z d ) and Sp(2k, Z Z d ) is easily surmised to those familiar with QEC with stabilizer codes, there has been less spotlight on the roles played by B A (n, k, d) and B S (n, k, d), i.e., the fact that the choice of selecting correctable errors for the code is encapsulated by the group actions of B S (n, k, d) and B A (n, k, d).

Counting [[n, k]] d stabilizer codes
One may employ Lagrange's theorem in theory of finite groups to compute the total number of [[n, k]] d stabilizer codes, which we denote as (47) where |Sp(2n, Z d )| is the order of Sp(2n, Z d ) and |T(2n, k, Z d )| is the order of T(2n, k, Z d ).
Remark 9.For the case when d is a prime, i.e., d = p, the number of [[n, k]] d stabilizer codes was explicitly computed in Ref. [23]

(see Theorem 20 and Corollary 21 therein). The results we obtain below agree with the results in Ref. [23] in this case. There is a discrepancy in the language and notation employed: an [[n, k]] d stabilizer code in our work corresponds to an m-dimensional isotropic subspace in Theorem 20 in Ref. [23], each [[n, k]] d code space in our work is a counted as a distinct code in Corollary 21 in Ref. [23], and finally, we use the notation C[[n, k]] d to count the number of [[n, k]] d stabilizer codes, whereas it is used to count the total number of code spaces in
Ref. [23] 24)).Call this submatrix H. Since M ∈ Sp(2n, Z d ) and satisfies M T ΛM = Λ, H satisfies H T ΛH = 0. Let the j-th column in H be the homomorphic image of some Pauli ω a j g j (see Eq. ( 11)), where g j 's are such that each has a +1 eigenspace, and the a j 's are in Z d and arbitrary.Generate the group S = ⟨ω a j g j ⟩.Note that the construction branches out into d n−k different choices of S, depending on the values of the a j 's.That H T ΛH = 0 is equivalent to the fact that the g j 's commute between themselves.Also, the columns of H are linearly independent since M is an invertible matrix.This ensures that any subset of the ω a j g j 's will generate a strictly smaller subgroup of S. Construct the coding space C(S) from S, and note that dim C(S) = 2 k (see Eq.Note that when the code to coset construction is reversed, one retrieves the original code which one started with.This is true for all codes.This proves the theorem. Using the decomposition of T(2n, k, Z d ) from Sec. 4 we obtain the following theorem.Lemma 2. Let d be a prime power, i.e., d = p m , where p is a prime number and m a positive integer.

The total number of [[n, k]]
where the Gaussian coefficient Proof.Using Lemma 1, the decomposition in Sec. 4 and Lemma 3, It is straightforward to compute that , since in M E from Eq. ( 40), N and L are left completely unconstrained by Eq. ( 43), whereas simultaneously K A is completely determined by N and L. Also note, |B S (n, k, p m )| = p m 1 2 (n−k)(n−k+1) , since in M T from Eq. (39), the only constraint which Eq. ( 43) imposes on K S is that it be symmetric.|GL (n − k, Z p m )| is computed in Corollary 2.8 in Ref. [32] (see also Ref. [40] for a more accessible arguments): |Sp(2n, Z p m )| and Sp(2k, Z p m i i ) (needed for the case k ≥ 1) are explicitly computed in the Appendix Sec.E.1 (which is based on Ref. [39]), which gives us Then putting everything together in Eq. ( 50) gives us Eq. ( 48) Remark 10.In a seminal paper on Wigner distributions on finite dimensional phase-space Ref. [23], Gross computed p m decomposes as a product of 2m cyclic groups, i.e., . Furthermore these decompositions are unique by the structure theorem of finite abelian groups.When m = 1, i.e., d = p, the formula in Theorem 20 in Ref. [23] matches that with Eq. (48), but for larger m, the formula differs on account of the fact that while F p m is a field, Z p m isn't.For completeness, in Appendix H we explain why this renders the proof for Theorem 20 in Ref. [23] inapplicable to our case.

Theorem 2. When d is an arbitrary positive integer with prime factorisation
where p i are distinct primes, m i are positive integers and r, which is the number of distinct prime factors, is also a positive integer.Then total number of Thus we get where Proof.We invoke the Chinese remainder theorem [33], which tells us that is a ring isomorphism.A simple corollary of this ring isomorphism is the following two group isomorphisms.
where the × symbol on the RHS denotes the direct product of groups.To explain Eq. ( 57), we refer the interested reader to Section F of the Appendix.Invoking Eq. ( 57) into Lemma 1 thus proves Eq. ( 53).For Eq. ( 54), we first simplify the RHS of Eq. ( 48) using the following.
It is often important to simply get an order of magnitude of C[[n, k]] d .Towards that result, we obtain the following corollary as a result of Theorem 2.
Corollary 4. Let c = 2.17.Then the number of [[n, k]] d stabilizer codes scales as the number of [[n, k]] d stabilizer code spaces scale as +c , (61) and thus the number of stabilizer states scale as Proof.It is not difficult to upper bound ζ i by a constant which is independent of p i , n and k.For instance, in Appendix Sec.G we show that ζ i < e 1.57 , ∀ n, k, and primes p. ( Thus we now use Eq. ( 58) and Eq. ( 63) in Eq. ( 48) where c 1 = 1.57.Let the number of distinct prime factors of d be denoted by r(d).Then Eq. ( 53) and ( 64) tell us It is known that r(d) may be upper bounded as follows (see Theorem 11, p. 369 in Ref. [43]): where c 2 = 1.38.Thus we get that e c 1 r(d) ≤ d c , where c = c 1 c 2 ≈ 2.17.Thus we get Note that for d = 2, Eq. ( 64) is already satisfied, and hence, d = 2 also satisfies Eq. ( 67).
The number of [[n, k]] d stabilizer code spaces is , and the number of stabilizer states is obtained by setting k = 0 in the number of stabilizer code spaces.

Conclusions
In  [[n]] d scale agnostic of whether d is prime or non-prime.This is surprising since the prime or non-prime nature of d played an important role in our computation.In Section 1 we listed salient topics where C state [[n]] d plays the role as an important quantifier: the resource theory of magic, the classical simulation of stabilizer-only circuits, projective-designs of stabilizer states, a de Finetti theorem customized for stabilizer operations, the study of quantum contextuality for small systems and the study of Wigner functions.Since C state [[n]] d was so far known only for prime d (and Galois-qudits), the results were limited to such cases.For resource theory of magic, our work allows one to make statements for arbitrary d.For the remaining topics, we believe that our computation of C state [[n]] d will prove useful for generalising the corresponding results to arbitrary d.Thus our work also contributes towards the important goal of placing results for arbitrary d qudit systems on the same pedestal as for prime qudit systems or Galois qudit systems.and the LI property guarantees that each distinct linear combination results in a distinct vector in Z n d .Since there are d n vectors in Z n d , each vector must be one of the d n possible linear combinations.
B.2 If a j 's are LI, then their linear span generates a subspace of dimension m By the linear span of the a j 's, we mean the subgroup of Z n d , which the a j 's generate.Since the a j 's are LI and since they are m in number, they generate a subgroup of size d m .However, not all subspaces of size d m are isomorphic.It remains to justify the concept of an m dimensional subspace.We use the term m-dimensional subspace to mean a subgroup of Z n d , which is isomorphic to Z m d .One may easily construct such an isomorphism from span {a j } m j=1 to Z m d as follows: define T : span {a j m j=1 → Z m d as follows: T T is readily seen to be an isomorphism (in the group theoretic sense).
B.3 For any m < n, any set of m LI vectors may be extended to form a basis for Z n d .
We prove this by finding an invertible matrix A whose first m columns are given by the LI vectors a 1 , a 2 , • • • , a m .Then we may simply add the remaining n − m columns to obtain a set of n linearly independent columns.We prove this inductively.
When m = 1.We adapt the arguments given in Ref. [65] 4 to our purpose.To say the a 1 = a is linearly independent means that there is no non-zero x ∈ Z d such that xa = 0.In other words, a is of order We can thus apply Bézout's identity (see Ref. [44]), in the same way that it is applied in Ref. [65].
For completeness, we give the whole proof here.Proceeding inductively, suppose that n = 2 first.Bézout's identity tells us that there exist b 1 , b 2 and Next, suppose that the result is true for n − 1.We need to then prove the result for n.As before g.c.d {a 1 , a 2 , • • • , a n , d} = 1 ∈ Z.There exists some integer g which is a common factor of a 1 , a 2 , • • • and we see that a i /g ′ have no common factors with h ′ (otherwise g ′ would have been larger).Thus the only factors which a 1 /g ′ , a 2 /g ′ , • • • , a n−1 /g ′ have in common with d will occur in g ′ .Writing g.c.d {a 1 /g ′ , a 2 /g ′ , • • • , a n−1 /g ′ , g ′ } =: g′ , and defining g ′′ = g′ g ′ , we examine whether a 1 /g ′′ , a 2 /g ′′ , • • • , a n−1 /g ′′ and d have any common factors.If not, we may choose g = g ′′ , otherwise we iterate recursively.These iterations have to stop at some point since the numbers a 1 , a 2 , • • • , a n−1 are finite.Note that g/g ′ is necessarily a factor of g ′ itself.Since the hypothesis is assumed true for Construct an n × n matrix A in the same fashion as in Ref. [65].
which gives us det A = (sg − a n1 r) det B, and since det Note that g.c.d {g ′ , a n1 , d} = 1, which tells us that g ′ and a n1 are coprime.Since g/g ′ is also a factor of g ′ , we get that g.c.d {g, a n1 , d} = 1 as well.Hence Bézout's identity informs us that there will exist some integers s, r and d ′′ in Z so that sg − a n1 r + d ′′ d = 1.

Hence we get that det
In Z d , det A = 1, which implies that A mod d is invertible.This proves our result for m = 1.
Assumed true for m.To prove for m + 1. a 1 , a 2 , • • • , a m , a m+1 ∈ Z n d , such that they are LI.Our hypothesis is assumed true for m vectors, so a 1 , a 2 , • • • , a m can be placed as the (left-most) columns of an n × n matrix A, which is invertible.Consider the isomorphism on This maps a j = e j for j = 1 to m, where e j are the standard basis vectors whose only non-zero component is the j-th component, and this component is equal to where The diagonal blocks 1 k , 1 and 1 n−k−1 are of sizes k, 1 and n − k − 1 respectively.These determine the sizes of the remaining blocks of T .When T is multiplied on the left of Eq. (70), we get an n × (m + 1) sized matrix whose columns are e 1 , e 2 • • • , e m and e m+1 .Denoting the left matrix in Eq. (70) by A ′′ , and defining Q := T A ′′ A −1 , we see that Q is an invertible matrix, and the action of Q on a j is to produce e j for j = 1 to m + 1.This tells us that a j is the j-th column of the matrix Q −1 .Thus given a j for j = 1 to m + 1, we may extend it to a set of n LI vectors by adding the remaining columns as vectors to this set.This proves our result.
C Extension of a check matrix to a symplectic matrix Remark 11.For the case when d is a prime (or more generally, when Z d is a field), this section reduces to a proof of Witt's extension theorem.A proof of Witt's extension theorem for the general case is hard to find.Thus we include a proof here for the interested reader.
Consider the stabilizer group S for an [[n, k]] d stabilizer code.For a choice of independent generators g j of S and an ordering, one may readily construct the check matrix H using these generators (see Eq. ( 21)).The columns of H are linearly independent and satisfy the commutation relations given by Eq. (22).Our goal in this section of the Appendix is to prove that the 2n × (n − k) matrix H may be extended to a 2n × 2n symplectic matrix S. Proposition 1. Proposition 10.4, [37] For each i = 1, 2 • • • , n − k, there exists some g ∈ P (d) n , such that g i g = ωgg i , and g j g = gg j when j ̸ = i.
Proof.Our proof will be based on the proof in [37], which works perfectly well for the case when d = p is a prime, and Z d = F p is a field.In that case, one simply seeks the solution to the following equation: H T Λx = e i , where x ∈ F 2n p is a column vector whose solution is sought, and e i ∈ F n−k p , is the vector whose only non-zero element is the i-th component, and this component is equal to 1.The existence of the solution the aforementioned equation is based on the fact that dim F n−k p = rankH T Λ, thus the transformation x → H T Λx is surjective in F n−k p .To establish that the same result holds true when d is a composite number, we use the following arguments: since a 1 , a 2 , • • • , a n−k are LI, one may extend this to a basis of 2n columns vectors in Z 2n d (see Subsection B.3). Construct a 2n × 2n matrix H ext , by adding to H T the additional n + k basis vectors, by transposing them and placing the corresponding rows below H T .Since the rows of H ext are linearly independent and since they are 2n in number, by arguments in Subsection B.1 they form a basis.Hence solutions to the equations x T H ext = e j T may be found for all j = 1, 2, • • • , 2n, which implies that H ext has a left-inverse.Since the left-inverse of H ext is also its right inverse, that implies that the columns of H ext are also linearly independent, and since these columns are 2n in number, they also form a basis using the arguments in Subsec.B.1.Thus one may then find the solution to the equation: where Here e ′ i is the vector whose only non-zero entry is the i-th entry, and this entry is equal to 1, whereas x ′ is a vector whose solution is sought.That H ext is invertible tells us that x ′ = H −1 ext e ′ i .Define x := Λ −1 x ′ .Then x satisfies the equation: One may neglect the n + k bottom most rows of H ext and of e ′ i (not of Λ, or of x -their rows must be maintained intact), which then gives us the equation H T Λx = e i .Let g be the Pauli element whose Z 2n d representative is x.The commutation relations between g and the g j 's is then determined by the equation H T Λx = e i : we get that g and g j commute when j ̸ = i and g i g = ωgg i .Hence proved.
Let us obtain the solutions for x for all i = 1, 2, • • • , n − k, and call the corresponding solutions To that end, we perform a Gram-Schmidth orthogonalization procedure in the following way, starting with w 1 := w ′ 1 , and starting with i = 2 to i = n − k, If k = 0, our job is done: to extend H to a 2n × 2n symplectic matrix, we need to add the columns w i to the left (or right) of H, and this will give us our symplectic matrix S. Suppose k = 1, we need to find pairs of vectors a n , w n so that At the moment, we have 2(n − 1) linearly independent vectors a j and w j .Let a ′ be some other vector so that the a ′ , a j and w j form a set of 2n−1 LI vectors in Z 2n d .Define a n := a ′ − n−1 j=1 w j T Λa ′ a j − n−1 j=1 a j T Λa ′ w j .Since the linear independence of a ′ , a j and w j ensures that a n is non-zero.We have also ensured that a n satisfies the conditions a j T Λa n = w j T Λa n = 0 for all j = 1, 2, • • • , n − 1.It remains to find w n with the properties as desired by Eq. (74).Such a w n may be found by using Proposition 10.3 again for an extended check matrix which is obtained by adding a n to the original check matrix H. Thus we have obtained all the column vectors as desired, and the newly obtained column vectors may be arranged suitably to produce a 2n × 2n symplectic matrix S. If k > 1, we may apply the same procedure as above iteratively, to obtain the symplectic matrix S.

D Symplectic conditions for M
In this section of the Appendix, we derive the symplectic conditions Eq. ( 30)- (33) for the matrix M in Eq. (24), which has the form: It will be convenient to label the LHS of Eq. (76) as follows.
Here we only consider blocks Q 13 , Q 23 and Q 43 .That is the conditions given in Eq. ( 28) and ( 29): Substituting Eq. (78) into Eq.( 24) gives us Eq. (34 n .Each element of this subgroup (except the identity) will act non-trivially on the stabilizer code, i.e., codewords are mapped to other codewords under the action of these elements.Thus the purely logical Pauli group is a subgroup of the logical Pauli group N (S), which contains the stabilizer group S. One anticipates that the choice of generators for S (which is realised by the GL(n − k, Z d ) subgroup) is independent of the choice of generators of the purely logical Pauli group (which is realised by the Sp(k, Z d ) subgroup).This agrees with the fact that both subgroups commute with each other.We next explain the significance of M E .Let g E be a Pauli which anti-commutes with some generators of n .Each element g E g L rotates C(S) to the same orthogonal coding space C(S) ⊥ .But for different choices of g L , g E g L performs a distinct internal rotation within C(S) ⊥ .The error correction procedure is unable to distinguish between different internal rotations due to different g L .Thus it can correct only one element in the coset g E L (d) n .This is true for all g E 's which anticommute with elements in S. Which element within g E L (d) n is chosen to be the correctable error depends on the error correction model.We next prove the following.Proof.That the columns of E fix the choice of the correctable errors of the stabilizer code is wellknown in the stabilizer formalism for quantum error correction (see Chapter 10 in [37] for instance or see the beginning in Section III in [38]).What we need to prove is that for each distinct choice of correctable errors, there is a choice of M E ∈ B A (n, k, d) such that right multiplying M with M E produces the corresponding column block of correctable errors in M M E .To this end, suppose that the columns in E are homomorphic images of n (see Eq. ( 11)).Suppose that we wish for g n .These errors may be represented in Z 2n d by the 2n × k matrix where the j-th columns of N ′ and L ′ are determined by how h j decomposes into the generators of L n .Thus N ′ and L ′ are determined entirely by h j 's.Equation (79) may be realised by right multiplying M with a matrix of the form M E with N ′ = N and L ′ = L, and K A determined entirely by N and L as follows: K A = L T N − N T L. This is just Eq. ( 31).Additionally, right multiplying M by any M T ∈ B S (n, k, d) changes the columns in E to E ′ = E + HK S .If g E ′ and g E represent the j-th columns in E ′ and E, then g E ′ = g E g S , where g S ∈ S is some element of the stabilizer group.g S is determined by the j-th column of K S and the choice of generators in H.Note that the error operators g E ′ and g E are both simultaneously correctable since the stabilizer element g S acts trivially on the code.Hence proved.

E.1 Order of Sp(2n, Z p m )
A computation of the order of Sp(2n, Z p m ) is given in Ref. [39].For the interested reader, we reproduce that computation here, while elaborating on some of the definitions and computations to make them clearer.Define a ring homomorphism ψ 1 : Z p m → Z p m−1 as where x ∈ Z p m .The following remark explains Eq. (80).
Remark 12.The ideal generated by p m−1 within Z p m is isomorphic to Z p .We label this ideal as p m−1 Z p m .The factor ring of Z p m /p m−1 Z p m is isomorphic to Z p m−1 .ψ 1 is the map from Z p m → Z p m /p m−1 Z p m .ψ 1 is a ring homomorphism, and ker ψ 1 = p m−1 Z p m .
We define a group homomorphism from Sp(2n, Z p m ) → Sp(2n, Z p m−1 ) as follows.Let M be a 2n × 2n symplectic matrix.Define F Proof that the Chinese remainder theorem implies Eq. (57) F.1 What is the Chinese remainder theorem?
For a reader, who may be unfamiliar with the Chinese remainder theorem (CRT), we briefly explain it in this subsection.
We use the following abbreviation for Since K is a direct product of rings Z p m i i , addition and multiplication are defined component-wise.Let x i , y i ∈ Z p m i i for all i = 1, 2, • • • , r. which we abbreviate as Γ(x) = (x i ) i , where x i ≡ x mod p m i i .CRT states the following.
1. Γ, as defined in Eq. (91), is a bijection from Z d to K.
where by S mod p m i i we mean that matrix in M 2n Z p m i i whose jk-th matrix element is S jk mod p m i i .We will use the abbreviation (S mod p m 1  1 , S mod p m 2 2 , • • • , S mod p mr r ) = (S mod p m i i ) i or simply as (S i ) i whenever convenient.That Γ is a ring isomorphism, is seen from the following.Consider the following scenario.
• We restrict Γ to acting on elements in Sp(2n, Z d ).
• Additionally, we restrict matrix operations to multiplication only.We dispense with addition.
are LI, then their linear span generates a subspace of dimension m.

)
While the order of all group elements is at most 2d in the even d case, one may suitably multiply with ζ to generate another group element with order at most d.The n-qudit Pauli group P (d) n is simply the n-fold tensor product of the single qudit Pauli group.The Hilbert space it acts on will be denoted by H ≃ C d ⊗n

)
if and only if the two Pauli operators g(a) and g(b) commute with each other.The centre of the Pauli group P (d) n , which is the subgroup of P (d) n and one possible homomorphism takes Pauli g(a) ∈ P (d) n to a ∈ Z 2n d .This homomorphism plays a very important role in the formalism of the stabilizer codes.The Clifford group C (d) (20) and the description below it).Thus C(S) is a code space corresponding to an[[n, k]] d stabilizer code.The d n−k distinct choices of S and C(S) correspond to the d n−k different choices within the same stabilizer code.This tells us that the number of cosets is lesser than or equal to the number of[[n, k]] d stabilizer codes.

we get that e 1 ,
e 2 , • • • , e m and c are LI.Consider the following.
the matrix on the left is an n × n matrix.The upper right 0 denotes a block matrix of size m × n − m whose entries are all 0. The lower left 0 denotes another block matrix of size (n − m) × m and whose entries are all 0. A ′ is an (n − m) × (n − m) matrix, as yet unspecified.The matrix on the right is of size n × (m + 1), whose first m columns are the vectors e j ordered from 1 to m, and the (m + 1)-th column is c.Denote c ′ := (c m+1 , c m+2 , • • • , c n ) T .Our hypothesis allows us to choose A ′ to be invertible and such that A ′ c ′ = (1, 0, • • • , 0) T , which is a column vector of size n − m.Defining c ′′ := (c 1 , c 2 , • • • , c m ) T , so that c T = (c ′′T , c ′T ), define an n × n matrix T

Theorem 3 .
The columns E in M in Eq.(24) represent correctable errors.Right multiplying M with different M E ∈ B A (n, k, d) realises the freedom in making different choices of such correctable errors.The action of M T ∈ B S (n, k, d) doesn't affect this choice.

1 .
Γ is a bijection because, firstly, |M 2n (Z d )| = Π r i=1 (p m i i ) 2n = |L|, since d = Π r i=1 p m i i .Secondly, every element in L has a pre-image in M 2n (Z d ).

2 .
Matrix addition and multiplication in M 2n (Z d ) is homomorphic, under Γ, to addition and multiplication defined in Eq. (95) and Eq.(96) respectively.Let S, T ∈ M 2n (Z d ).For addition:Γ(S + T ) = ((S + T ) mod p m i i ) i = (S mod p m i i + T mod p m i i ) i = Γ(S) + Γ(T ), (98)where we used Eq.(95) to obtain the right-most expression from the previous expression.For multiplication:Γ(S.T ) = ((S.T ) mod p m i i ) i = ((S mod p m i i ) .(T mod p m i i ) ) i = Γ(S).Γ(T ), (99)where we used Eq.(96) to obtain the right-most expression from the previous expression.

F. 3
Restricting Γ to Sp(2n, Z d ) . Before our work, it wasn't known how C state [[n]] d scales with n for arbitrary d.Since Corollary 1 states that C state [[n]] d scales super-exponentially in n for all d, we now know that the problem of computing the aforementioned measures of magic is intractable for arbitrary dimension.
Howard and collaborators study quantum stabilizer states, to see if these states exhibit any quantum contextual correlations.For odd prime d, the set of C state [[n]] d twoqudit stabilizer states is partitioned into two classes: separable states and entangled states.Each class is separately studied to see if it exhibits state dependent contextuality, and the number of elements within each class plays an important role in this.
[23] Disambiguation of Wigner functions for odd dimensional qudit systems: While Hudson's theorem for finite dimensional quantum systems was proved in Ref.[23], the choice of the Wigner function with which it was proved wasn't disambiguated.In Ref.[61],Howard establishes that there is a unique choice of the Wigner function which supports Hudson's theorem.The proof of this result employs the explicit formula for C state [[n]] d .Our work readily generalises results for the resource theory of magic and for the classical simulability of stabilizer-only circuits.For other topics mentioned above, we anticipate that our computation of C state [[n]] d will facilitate comparable results for arbitrary d-dimensional systems.Remark 2. In contrast to C state While the proof method depends on whether d is prime or non-prime, the number of stabilizer codes C[[n, k]] d , the stabilizer code subspaces C space [[n, k]] d and the stabilizer states C state [[n]] d

symmetric and antisymmetric abelian subgroups
The GL(n − k, Z d ) subgroup: The set of matrices of the form M S , with A invertible, is readily seen to be a subgroup of T(2n, k, Z d ) (by setting all matrix elements in M 21 , M 24 , M 31 , M 32 , M 34 , M 41 and M 42 as 0, and settingM 22 = M 44 = I n−k ).Moreover, this subgroup is isomorphic to GL(n − k, Z d ), the group of (n − k) × (n − k)general linear matrices over Z d , and hence we refer to it as the GL(n − k, Z d ) subgroup.All matrices of the form M L which satisfy Eq. (30) form a subgroup of T(2n, k, Z d ), and this subgroup is isomorphic to Sp(2k, Z d ).Thus we call it the Sp(2k, Z d ) subgroup.Note that the GL(n − k, Z d ) subgroup and the Sp(2k, Z d ) subgroup commute with each other.B S (n, k, d) and B A (n, k, d): Matrices of the form M T and M E , which satisfy Eq. (31) (see Eq.( d ) subgroup: . which may be extended to a symplectic matrix M .In Sec. 3 we noted that this construction of M from S has a redundancy, and that the degree of freedom within the redundancy is captured by the right action on M by the subgroup T(2n, k, Z d ).
Proof.For a given[[n, k]] d stabilizer code, let's choose a representative code space C(S) with the stabilizer group S = ⟨g j ⟩ n−k j=1 .From S one can construct a check matrix H, the number of [[n, k]] d codes when d = p m , but the phase-space is identi- [23] work we count the number of [[n, k]] d stabilizer codes, C[[n, k]] d for arbitrary d-levelsystems, where the configuration space of such systems is Z d .Since Z d is not a field when d is non-prime, the method we used for this has to differ from earlier works in Ref.[6]for qubits and Ref.[23]for prime-dimensional qudits and Galois-qudits, which relied on d being prime.Z d )| / |T(2n, k, Z d )|, for which we make use of the Chinese remainder theorem.We find that the number of [[n, k]] d stabilizer codes C[[n, k]] d , the number of [[n, k]] d stabilizer code subspaces C space [[n, k]] d and the number of stabilizer states C state Our method is broadly broken up into two parts:(i) proving a bijection between distinct [[n, k]] d QECC and cosets of Sp(2n, Z Z d )/T(2n, k, Z d ), where T(2n, k, Z d ) is a subgroup, which corresponds to the [[n, k]] d trivial code, with

)
Here M 11 , M 31 , M 13 (which is 0) and A are of dimensions (n − k) × (n − k), M 22 , M 24 , M 42 and M 44 are of dimensions 2k × 2k, M 21 , M 41 , M 23 and M 43 (which are both 0) are of dimensions k × (n − k), and finally, M 12 , M 14 , M 32 and M 34 are of dimensions (n − k) × k.M satisfies the following symplectic condition.
(33)w, Eq. (31), Eq.(32)and Eq.(33)are merely the equations for the blocks Q 11 , Q 12 and Q 14 respectively, whereas Eq. (30) is the collective condition onQ 22 Q 24 Q 42 Q 44 .We now explain the significance of each of these subgroups.For an[[n, k]] d stabilizer code, let H be the corresponding check matrix and let a symplectic extension of H be given by M as in Eq.(24).One may obtain another symplectic matrix of the same stabilizer code by right-multiplying M with a matrix inT(2n, k, Z d ) with a decomposition M E M S M L .Suppose that M E = M L = I 2n .Right-multiplying M with M S transforms the check matrix H to another check-matrix HA (of the same code).Thus the GL(n − k, Z d ) subgroup realises the freedom of making different choices of the independent generators of said stabilizer group.Right-multiplying M with M L transforms the columns in L X and L Z , while leaving E and H invariant.Thus the Sp(n − k, Z d ) subgroup realises the freedom of making different choices of the generators of the purely logical Pauli group, which we denote by L E Significance of the subgroups of T(2n, k, Z d ): Sp(2k, Z d ), GL(n − k, Z d ), B A (n, k, d) and B S (n, k, d) 2. Arithmetic of pre-images (in Z d ) is isomorphic under Γ, to arithmetic of the images (in K).That is, for x, y ∈ Z d , and Γ(x) = (x i ) i and Γ(y) = (y i ) i , we haveΓ(x + y) = (x i + y i ) i , and(92)Γ(x.y) = (x i .yi ) i , (93)where x i + y i and x i y i are the addition and multiplication operations, carried out in Z p m i Next, consider the following direct product of matrix rings M 2n Z p m i i for i = 1 to i = r.Addition and multiplication in L are performed component-wise.(S 1 , S 2 , • • • , S r ) + (T 1 , T 2 , • • • , T r ) = (S 1 + T 1 , S 2 + T 2 , • • • , S r + T r ), and(95)(S 1 , S 2 , • • • , S r ).(T 1 , T 2 , • • • , T r ) = (S 1 .T 1 , S 2 .T 2 , • • • , S r .T r ), (96)where S i , T i ∈ M 2n Z p m i i.We may extend CRT to derive a ring isomorphism Γ :M 2n (Z d ) → L as follows.Let S ∈ M 2n (Z d ).Then Γ(S) = (S mod p m 1 1 , S mod p m 2 2 , • • • , S mod p mr r ) , (