Manuscript Offprint
arXiv:2611.05489Stabiliser codes over prime fields as weighted graphs and as quantum sets of lines
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We further develop the theory of quantum stabiliser codes and its links with graph theory and finite geometry. We prove that an stabiliser code over a finite field with elements, prime, gives rise to a graph on vertices together with two disjoint independent sets of size . Its edges are weighted with elements of a finite field of size . If , such codes are known as graph states. Second, we view stabiliser codes as so-called quantum sets of lines in projective space, allowing us to determine their minimum distance geometrically. We describe two geometrical operations to obtain new quantum sets of lines from given quantum sets of lines. As an application, we list the number of stabiliser codes up to equivalence, for given small parameters.
1 Introduction
Stabiliser codes were introduced by Calderbank, Rains, Shor and Sloane [8] and Gottesman [14] independently. They are a special type of quantum error-correcting codes. A stabiliser code is a subspace of a Hilbert space that is the intersection of the eigenspaces of eigenvalue one of an abelian subgroup of , where is a nice error basis. These codes are widely used in quantum error-correction, partly because it is often easier to work with the subgroup , rather than with a basis for the subspace . In this article, we restrict ourselves to the case where is prime. In this case, the stabiliser formalism allows us to interpret the abelian subgroup as a classical additive code that is contained in its symplectic dual, see [2, 3, 8, 20].
One-dimensional binary stabiliser codes are called graphical states or graph states since they can be represented by a simple graph. Graph states have been well studied, see for example [1, 12, 16, 21]. There have been many proposals to use graphs to represent stabiliser codes of general dimension, including [18, 19, 21, 27].
In this article, we prove that an stabiliser code over a prime field can be interpreted as a weighted graph on vertices containing two independent sets of size that induce a (non-weighted) matching. As far as we are aware, this equivalence has not been previously noted.
We go on to consider quantum sets of lines, sets of lines in projective space, associated to such a stabiliser code, from which it is possible to give a geometrical description of the minimum distance . These ideas are inspired by the work of Glynn, Gulliver, Maks and Gupta [15] and build on the
*Supported by the Spanish Ministry of Science, Innovation and Universities grant PID2023-147202NB-I00. †This research was funded in whole or in part by the Austrian Science Fund (FWF) [10.55776/ESP4162324]. ‡Supported by the Research Foundation Flanders (FWO) through the grant 11PG724N.
generalisations of Ball, Centelles and Huber [3]. See also the work of Bierbrauer, Faina, Giulietti, Marcugini and Pambianco [6].
As an application, we present some tables on the number of stabiliser codes of dimension and local dimension (qubit) and (qutrit), expanding on the known classifications for and by Danielsen and Parker [11] and and by Danielsen [10].
2.1 Stabiliser formalism
Let denote the finite field of order , where is prime. Consider the standard symplectic inner product on the vector space given by
Given a subspace , let for all . A subspace is called totally isotropic if . The symplectic weight of a vector is defined as
Definition 1. An stabiliser code is a totally isotropic subspace of of dimension . The minimum distance of is
If the minimum distance is specified, we call an code.
Definition 2. A stabiliser matrix of an stabiliser code is an matrix whose rows form a basis of . A parity check matrix of an stabiliser code is an matrix whose rows form a basis of .
We denote a stabiliser matrix by and a parity check matrix by .
2.2 Equivalent stabiliser codes
Definition 3. Two stabiliser codes are (local Clifford) equivalent if they can be obtained from one another by:
-
Permutations of the pairs of positions.
-
For each pair, a symplectic transformation on that pair. That is, a change of basis of that preserves the symplectic inner product.
We use the term “parity check matrix” in analogy with the term for classical codes, when considering the stabiliser matrix as a generator matrix. However, one could also regard the stabiliser matrix as the parity check matrix. After all, the minimum weight depends mostly on the minimum symplectic weight of .
The maps yielding equivalence are the elements of the local Clifford group . For example, for a given , we can replace by within every vector . Another possibility is to replace by within every vector . These two operations are in fact enough to generate the whole group of symplectic transformations, since is generated as a multiplicative group by all products of the matrices
Equivalent codes have the same parameters.
3 Stabiliser codes as graphs
A particular type of one-dimensional stabiliser codes are graph states. Given a graph on n vertices, we can construct from it a stabiliser matrix that has the identity matrix on the left and the adjacency matrix A of the graph on the right:
Bahramgiri and Beigi [5] proved that every stabiliser code, p prime, is equivalent to a graph state. This was proved already by Schlingemann [22] for the binary case. We generalise this result to multidimensional stabiliser codes.
3.1 Multidimensional graph states
Theorem 4. Consider an stabiliser code and let r = n - k. Up to equivalence, its stabiliser matrix has the form
where is a symmetric matrix with zeroes on the diagonal and and are matrices.
Proof. After row reduction and permutations of pairs of columns, we may assume that the code has stabiliser matrix
for some . Here, the part below C may be assumed zero, since otherwise we can swap the columns containing B and C and increase the rank of the left part. The rowspace of G is symplectic self-orthogonal if and only if where . Thus,
We deduce that , and hence , and that , where . Finally, we can replace any non-zero elements on the diagonal of the matrix by zero, by adding the th column to the th column if needed (preserving the symplectic inner product of rows).
More explicitly, we can always put the stabiliser matrix in the form
\begin{pmatrix}1&\cdots&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&1\end{pmatrix}\begin{array}{cccc}b_{11}&\cdots&b_{1k}\\ \vdots&&\vdots\\ b_{r1}&\cdots&b_{rk}\end{array}\left\|\begin{array}{cccc}a_{11}+\sum_{i=1}^{k}b_{1i}c_{1i}&\cdots&a_{1r}+\sum_{i=1}^{k}b_{1i}c_{ri}\\ \vdots&\ddots&\vdots\\ a_{r1}+\sum_{i=1}^{k}b_{ri}c_{1i}&\cdots&a_{rr}+\sum_{i=1}^{k}b_{ri}c_{ri}\end{array}\right|\begin{array}{cccc}c_{11}&\cdots&c_{1k}\\ \vdots&&\vdots\\ c_{r1}&\cdots&c_{rk}\end{array}\right)where for all . The matrix gives rise to an (undirected, loopless) weighted graph on vertices with weights in . The matrices and can be seen as two empty graphs and on vertices each, with a matching between them (this matching has no weights) and weighted edges between and (resp. ), indicating the entries of (resp. ). Let be the union (not disjoint) of , and . An example is given in Figure 1. Label its vertices as follows:
Beware of the difference in notation with weights of the edges between the vertices. For example, is the weight of the edge between the vertices and .

Figure 1: A multidimensional graph state is represented by a graph on vertices containing two independent sets of size with a matching in between. In this figure, , and (the graph is not weighted).
Example 5. Consider the stabiliser code generated by
Swapping column 4 and column 9 and using row operations, yields an equivalent code with generator matrix
which, by adding columns 2-3 to columns 7-8, is equivalent to
We deduce that
The corresponding graph is given in Figure 2.

Figure 2: A graph describing a stabiliser code.
Vice versa, any graph on vertices and two disjoint copies of the empty graph on vertices, with a matching between them and with edges joined to the subset of vertices, gives rise to an stabiliser code. We call such codes multidimensional graph states. Theorem 4 says that every stabiliser code is equivalent to a multidimensional graph state.
3.2 Parity check matrix
Given the standard form
from Theorem 4, we can determine a parity check matrix as follows.
Lemma 6. An code with stabiliser matrix
has parity check matrix
Proof. has full rank and rows. We check that its rows are symplectic orthogonal with those of . We have
A parity check matrix is not unique. The following construction has the advantage that the parity check matrix contains .
Lemma 7. An code with stabiliser matrix
has parity check matrix
Proof. has full rank and rows. The first rows form the matrix itself, which is symplectic self-orthogonal. The remaining rows are the same last rows as in Lemma 6.
3.3 The Calderbank-Shor-Steane construction
The CSS construction of stabiliser codes is a construction of stabiliser codes introduced by Calderbank and Shor [7] and Steane [25] using two classical linear codes where the dual of one is contained in the other. The stabiliser matrix G for this construction has the form
where and have full rank and .
We proved in Theorem 4 that an stabiliser code is equivalent to a graph on vertices which has two copies of the empty graph on vertices and an induced subgraph on vertices. In the following theorem, we prove that the graph for the CSS construction is bipartite.
Theorem 8. A stabiliser matrix is obtained from a CSS construction if and only if, up to equivalence, it is of the form
where
A=\left(\frac{O}{A^{\prime}}\left|\begin{array}{c}A^{\prime}^{T}\\ O\end{array}\right.\right),B=\left(\frac{B^{\prime}}{O}\right)\quad and C=\left(\frac{O}{C^{\prime}}\right).Proof. Let be a stabiliser matrix constructed using the CSS construction. We can use row operations and a re-ordering of the columns to put it in the form
where is the rank of and is the rank of . Since the symplectic inner product of the -th row () and the -th row () is zero, we deduce that and hence . Swapping (and adding a minus sign on one side) the th and th column for all , we obtain
Comparing this matrix with the matrix from Theorem 4, we get
and is symmetric. By doing the inverse operations, a stabiliser matrix is of the given form can be obtained from the CSS construction with and .
As in the discussion after the proof of Theorem 4, we can interpret as describing an induced subgraph of a graph on vertices. For the CSS construction, Theorem 8 implies that the graph is bipartite with bipartitions of size and . The graph is bipartite with bipartitions of size and , where each bipartition contains an independent set on vertices.
Example 9. The Steane code is a stabiliser code, obtained via a CSS construction where
is the parity check matrix of the binary [7,4,3] Hamming code. Its stabiliser matrix is
By elementary row operations on the last three rows, we get
Switching columns 4, 5 and 6 with columns 11, 12 and 13 respectively, we get
Using the notation of Theorem 4, we have
Therefore, the Steane code is given by the bipartite graph in Figure 3.

Figure 3: A graph describing the Steane code.
3.4 Local complementation
We define two graphs to be stabiliser-equivalent if they give rise to equivalent stabiliser codes. Recall that two stabiliser codes are equivalent if they can be obtained from one another by permutations of the pairs of positions, and, for each pair, a symplectic transformation on that pair.
In the case and , equivalent graph states have attracted attention in [9, 23, 26] for example. For and general primes , Bahramgiri and Beigi [5, Theorem 5] describe this stabiliser-equivalence as a sequence of graph operations. Let denote the adjacency matrix of a graph whose edges have weights over . For every vertex and constant , consider the following local complementation operations on the stabiliser matrix:
- Weighted local complementation:
- Rescaling the neighbourhood:
They correspond to the following operations on the stabiliser code S:
-
replacing by within every vector ,
-
replacing by within every vector ,
and after each operation, putting the stabiliser matrix back in the standard form
through row operations, and, in the case of weighted local complementation, making the diagonal of zero again by replacing with within every vector , for all . These two types of operations are enough to generate the entire local Clifford group:
Theorem 10 ([5, Theorem 5]). Two (one-dimensional) graph states are equivalent if and only if there exists a sequence of local complementation operations to obtain one from the other.
3.5 Stabiliser-equivalence for multidimensional graph states
In this section, we work out what equivalence means for the multidimensional case. Recall from Theorem 4 that an stabiliser code corresponds to a graph on vertices, containing two independent sets of size with a matching between them. More precisely, with such that and . The induced graphs on and are empty and there is a non-weighted matching between and . This graph should be regarded as unlabelled on the vertices within each of the parts , and , but this partition (colouring) is fixed. In particular, we cannot simply interchange the and parts.
Recall that we can always put the stabiliser matrix in the form
\begin{pmatrix}1&\cdots&0&\left|\begin{array}{ccc}b_{11}&\cdots&b_{1k}\\\vdots&\ddots&\vdots\\0&\cdots&1\end{array}\right|b_{r1}&\cdots&b_{rk}\end{pmatrix}\left|\begin{array}{cccc}a_{11}+\sum_{i=1}^{k}b_{1i}c_{1i}&\cdots&a_{1r}+\sum_{i=1}^{k}b_{1i}c_{ri}\\\vdots&&\ddots&\vdots\\a_{r1}+\sum_{i=1}^{k}b_{ri}c_{1i}&\cdots&a_{rr}+\sum_{i=1}^{k}b_{ri}c_{ri}\end{array}\right|\begin{array}{cccc}c_{11}&\cdots&c_{1k}\\\vdots&&\vdots\\c_{r1}&\cdots&c_{rk}\end{array}\right)and label the vertices of the graph as follows:
We consider three operations, and prove that a successive application of these three is enough to obtain every equivalent multidimensional graph state, similar to [5, Theorem 5].
Note that isomorphic graphs (but with the same partition) are equivalent. This corresponds to permutations of the pairs of positions. In what follows, isomorphic graphs are considered as the same.
Theorem 11. Two multidimensional graph states are equivalent if and only if they can be obtained from one another through a sequence of the following operations.
- (Local complementation on a vertex of or ). Given , do
Similarly for a vertex .
In particular, we can always make a given vertex of non-adjacent to a given vertex of (or ).
- (Local complementation on a vertex of ). Given , if for all (which can always be accomplished by operation 1), do one of the following operations:
(a) Weighted complementation:
(b) Rescaling the neighbourhood with :
- (Swapping a vertex of with a vertex of ). Given and , if for all and (which can always be accomplished by operation 1), swap and (only edges between and are affected by this swap), and change the weights of the edges between and as follows:
for all and .
Proof. We show that the first operation corresponds to adding the first column of to the first column of , that the second operation achieves local equivalence on , and that the third one arises from a transposition of a pair on the first positions and a pair on the last positions.
- Without loss of generality, we may assume that s = 1. Subtracting the first column of B from the first column of C gives
Writing and , this is equal to
\begin{pmatrix}1&\cdots&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&1\end{pmatrix}\begin{array}{cccc}b_{11}&\cdots&b_{1k}\\\vdots&&\vdots\\b_{r1}&\cdots&b_{rk}\end{array}\left\|\begin{array}{cccc}a_{11}^{\prime}+\sum_{i=1}^{k}b_{1i}c_{1i}^{\prime}&\cdots&a_{1r}^{\prime}+\sum_{i=1}^{k}b_{1i}c_{ri}^{\prime}\\\vdots&\ddots&\vdots\\a_{r1}^{\prime}+\sum_{i=1}^{k}b_{ri}c_{1i}^{\prime}&\cdots&a_{rr}^{\prime}+\sum_{i=1}^{k}b_{ri}c_{ri}^{\prime}\end{array}\right|\begin{array}{cccc}c_{11}^{\prime}&\cdots&c_{1k}^{\prime}\\\vdots&&\vdots\\c_{r1}^{\prime}&\cdots&c_{rk}^{\prime}\end{array}\right).- Without loss of generality, we may assume that . Since for all and , the stabiliser matrix is given by
(a) Subtracting column from column 1 gives the matrix
\begin{pmatrix}1&0&\cdots&0\\-a_{12}&1&\cdots&0\\\vdots&\vdots&\ddots&\vdots\\-a_{1r}&0&\cdots&1\end{pmatrix}\begin{array}{c|cccc}b_{11}&\cdots&b_{1k}&&\\b_{21}&\cdots&b_{2k}&&\\ \vdots&&\vdots&&\vdots\\b_{r1}&\cdots&b_{rk}&&\end{array}\left\|\begin{array}{cccc}0&a_{12}+\sum_{i=1}^{k}b_{1i}c_{2i}&\cdots&a_{1r}+\sum_{i=1}^{k}b_{1i}c_{ri}\\a_{21}&a_{22}+\sum_{i=1}^{k}b_{2i}c_{2i}&\cdots&a_{2r}+\sum_{i=1}^{k}b_{2i}c_{ri}\\\vdots&&\vdots&\ddots&\vdots\\a_{r1}&a_{r2}+\sum_{i=1}^{k}b_{ri}c_{2i}&\cdots&a_{rr}+\sum_{i=1}^{k}b_{ri}c_{ri}\end{array}\right|\begin{array}{cccc}0&\cdots&0\\c_{21}&\cdots&c_{2r}\\\vdots&&\vdots\\c_{r1}&\cdots&c_{rk}\end{array}\right),which, after row operations, becomes
\begin{pmatrix}1&0&\cdots&0\\0&1&\cdots&0\\\vdots&\vdots&\ddots&\vdots\\0&0&\cdots&1\end{pmatrix}\begin{array}{c c c c|c c c c}b_{11}^{\prime}&\cdots&b_{1k}^{\prime}&&\\b_{21}^{\prime}&\cdots&b_{2k}^{\prime}&&\\ \vdots&&\vdots&&\vdots\\b_{r1}^{\prime}&\cdots&b_{r k}^{\prime}&&\end{array}\left\|\begin{array}{c c c c}a_{11}^{\prime}&a_{12}^{\prime}+\sum_{i=1}^{k}b_{1i}^{\prime}c_{2i}&\cdots&a_{1r}^{\prime}+\sum_{i=1}^{k}b_{1i}^{\prime}c_{r i}\\a_{21}^{\prime}&a_{22}^{\prime}+\sum_{i=1}^{k}b_{2i}^{\prime}c_{2i}&\cdots&a_{2r}^{\prime}+\sum_{i=1}^{k}b_{2i}^{\prime}c_{r i}\\\vdots&&\vdots&\ddots&\vdots\\a_{r1}^{\prime}&a_{r2}^{\prime}+\sum_{i=1}^{k}b_{r i}^{\prime}c_{2i}&\cdots&a_{r r}^{\prime}+\sum_{i=1}^{k}b_{r i}^{\prime}c_{r i}\end{array}\right|\begin{array}{c c c c}0&\cdots&0\\c_{21}&\cdots&c_{2r}\\\vdots&&\vdots\\c_{r1}&\cdots&c_{r k}\end{array}\right),where and . After making the diagonal entries of equal to zero, this is a graph state.
(b) Multiplying column 1 by and multiplying column by , yields the matrix
\begin{pmatrix}\lambda^{-1}&0&\cdots&0\\0&1&\cdots&0\\\vdots&\vdots&\ddots&\vdots\\0&0&\cdots&1\end{pmatrix}\begin{array}{c|cccc}b_{11}&\cdots&b_{1k}\\\hline b_{21}&\cdots&b_{2k}\\\vdots&&\vdots&\\b_{r1}&\cdots&b_{rk}\end{array}\left\|\begin{array}{cccc}0&a_{12}+\sum_{i=1}^{k}b_{1i}c_{2i}&\cdots&a_{1r}+\sum_{i=1}^{k}b_{1i}c_{ri}\\ \lambda a_{21}&a_{22}+\sum_{i=1}^{k}b_{2i}c_{2i}&\cdots&a_{2r}+\sum_{i=1}^{k}b_{2i}c_{ri}\\\vdots&&\vdots&\ddots&\vdots\\ \lambda a_{r1}&a_{r2}+\sum_{i=1}^{k}b_{ri}c_{2i}&\cdots&a_{rr}+\sum_{i=1}^{k}b_{ri}c_{ri}\end{array}\right|\begin{array}{cccc}0&\cdots&0\\c_{21}&\cdots&c_{2r}\\\vdots&&\vdots\\c_{r1}&\cdots&c_{rk}\end{array}\right).Multiplying the first row by , we get
This is a graph state when substituting every for and every for .
- Without loss of generality, we may assume that . Since for all and and , the stabiliser matrix is given by
Swapping column 1 and the first column of B and swapping column and the first column of C, gives
Bringing it in row echelon form, we get
where is defined as in the statement. This is equivalent to a graph state where and are swapped.
Now, consider two equivalent stabiliser codes. By definition, they can be obtained from one another by a permutation of the coordinate positions and a symplectic transformation on each of the coordinate pairs.
• Permutations on the positions correspond to graph isomorphism and the second operation.
-
Symplectic transformations on the first positions correspond to the third operation, by Theorem 10.
-
Symplectic transformations on the last positions can be realized by the first operation since is generated multiplicatively by
Note that the order of the operations is important, since the first one is sometimes necessary before applying the other two.
Corollary 12. Two binary multidimensional graph states are equivalent if and only if they can be obtained from one another through a sequence of the following operations.
- (Local complementation on a vertex of or ). Given , do
Similarly for a vertex .
- (Local complementation on a vertex of ). Given , if for all (which can always be accomplished by operation 1), do a local complementation (but keeping the induced subgraph on empty):
- (Swapping a vertex of with a vertex of ). Given and , if for all and (which can always be accomplished by operation 1), swap and (only edges between and are affected by this swap), and change the weights of the edges between and as follows:
for all and .
Remark 13. We cannot simply swap and to obtain an equivalent state. For example, if we change the roles of and in the stabiliser code with stabiliser matrix
\begin{pmatrix}1&0&0&\left|0\right|\left\|0&0&0&\left|1\right.\right.\\0&1&0&\left|1\right|\left\|1&1&1&\left|1\right.\right.\\0&0&1&\left|1\right|\left\|1&1&1&\left|1\right.\right.\end{pmatrix},then we get the stabiliser code with stabiliser matrix
\begin{pmatrix}1&0&0&\left|1\right|\left\|0&1&1&\left|0\right.\right.\\0&1&0&\left|1\right|\left\|0&1&1&\left|1\right.\right.\\0&0&1&\left|1\right|\left\|0&1&1&\left|1\right.\right.\end{pmatrix}.These codes have a different minimum distance, so they cannot be equivalent. Note that , so is edgeless.
Remark 14. It is not necessarily so that is determined up to local complementation (independent of and ), as it is for the case . For example, the stabiliser code with stabiliser matrix
\begin{pmatrix}1&0&0&0&\left|0\right|\left\|0&1&1&1&\left|1\right.\right.\\0&1&0&0&0&\left|1&0&1&1&1\right.\\0&0&1&0&1&\left|0&0&1&0&1\right.\\0&0&0&1&\left|1\right|\left\|0&0&0&1&1\right.\end{pmatrix}corresponds to a graph where is a triangle plus one pendant vertex (leaf). However, one can check (by computer; there are 24 graph states in its equivalence orbit) that it is not equivalent to a multidimensional graph state where the base graph is a path on four vertices.
4 Stabiliser codes as quantum sets of lines
Let denote the -dimensional projective space over the finite field , obtained from an -dimensional vector space over . Given a stabiliser matrix of an code, we can look at its columns as points in . These columns appear in pairs, so we can consider the (multi)set of lines , where is spanned by the -th and -th column of . Such a set of lines is called quantum:
Definition 15. A (multi)set of lines in is quantum if there exists a stabiliser matrix with elements in such that its th and th column span for all .
Glynn, Gulliver, Maks and Gupta [15] gave a description of these quantum sets of lines for .
Theorem 16 ([15, Theorem 1.13], see also [3, Theorem 3.7]). A set of lines in is quantum if and only if every codimension two subspace is skew to an even number of its lines (see Figure 4).

Figure 4: A quantum set of lines in has the property that every codimension two subspace is skew to an even number of its lines.
Binary stabiliser codes are equivalent if and only if their quantum sets of lines are projectively equivalent. However, if , then projective equivalence is no longer the same as local Clifford equivalence. Indeed, multiplying a column with a nonzero scalar different from one, changes the symplectic inner product. Also Theorem 16 fails when . Still, we can use the geometry to determine the minimum distance of a code, even if . This is explained in the next section.
4.1 The minimum distance of a quantum set of lines
Recall that points are independent if they span an -dimensional subspace; they are dependent otherwise. The following theorem is a generalisation of [3, Theorem 3.8], which itself was a refinement of [15, Proposition 1.14].
Theorem 17. Let be a quantum set of lines coming from an stabiliser code. If , then is the minimum size of a set of dependent points on distinct lines of . If , then is the minimum size of a set of dependent points on distinct lines of such that there is no hyperplane containing these points and all the lines of that do not contain one of these points.
The span of two columns is not necessarily a line if they are scalar multiples. However, this means that the stabiliser code is degenerate: deleting that coordinate gives a smaller code with an equal or larger minimum distance.
Proof. This is a straightforward generalisation of the proof of [3, Theorem 3.8], replacing by . The main idea is that
where is the th column of , together with the observation that .
4.2 Projecting quantum sets of lines
The projection of an object in geometry is a common operation. In this section, we show how a quantum set of lines projects onto a quantum set of lines . In terms of the stabiliser matrix, a projection is equivalent to deleting rows. To see this, consider a basis in which the final coordinates span the subspace from which we are projecting. The projection is nothing more than deleting those coordinates. In the stabiliser matrix, this removes the final rows and we get an matrix . The following theorem demonstrates how we can bound the minimum distance of the projected code knowing only and .
Theorem 18. Let be a quantum set of lines in and let be a subspace skew to the lines of . The projection of from is a quantum set of lines. Its minimum distance is equal to the minimum size of a set of points on distinct lines such that they are either dependent or their span intersects , that is, , without there being a hyperplane containing and all the lines of that do not contain one of these points.
Proof. Projection is equivalent to deleting a row of a stabiliser matrix, so it preserves the quantum property. The claim about the minimum distance follows from Theorem 17, together with the fact that the pre-image of dependent projected points corresponds to points that sum to a point of or sum to zero.
We now demonstrate how the graphs associated to X and its projection are related. Suppose that the stabiliser matrix is in the standard form
from Theorem 4, and let be the standard basis of . The elements of are points on different lines. Let be a basis of . We can extend it with elements of to complete it to a basis of . Suppose, without loss of generality, that does the trick. The change of basis matrix from to is of the form
Let
be the stabiliser matrix associated to X. It is equivalent to the matrix
where the last positions correspond to . Hence the matrix associated to is
Comparing this with the standard form
from Theorem 4, we have
In particular, if we start from a one-dimensional graph state, we have
Moreover, if the vertices whose adjacency is given by , is an independent set, then and the graph is obtained from by making that independent set equal to and adding the vertices , the weight of the edges being determined by .
4.3 Extending and shortening quantum sets of lines
The standard form
from Theorem 4 gives rise to a construction to extend or shorten quantum sets of lines by one line. We can add columns b and c to B and C respectively to obtain the stabiliser matrix
of an code. Vice versa, we can remove any two corresponding columns in B and C to shorten the code.
Let and be the codes generated by and respectively.
Lemma 19. Let and . If , then .
Proof. If , then for some . Since the coordinate on position is zero, we have that and hence . Thus, .
Lemma 20. If , then the above extension operation can increase the minimum distance by at most one, that is, .
Proof. First observe that the operation changes the parity check matrix of Lemma 6 into
(Empty blocks correspond to zeroes.) Choose a minimum weight vector that is contained in the centraliser of the original code, but not contained in the code itself (for this we need ). It is a linear combination of rows of the parity check matrix. The corresponding vector in the new parity check matrix is either or .
In the first case, the (symplectic) weight does not change. By Lemma 19, the vector in the new parity check matrix is not contained in the code.
In the second case, the vector
belongs to the centraliser and has weight one more than . By Lemma 19, it is not contained in the code.
The extension operation can be described geometrically if (this condition is needed for step 3 below). Given a quantum set of lines in , where , we can add a line and adjust the other lines such that they form a quantum set of lines again, as follows:
-
Choose a basis of points on different lines .
-
Choose two different points and such that : . Let be the line spanned by them.
-
For each replace the line by the line .
-
Now is a quantum set of lines in .

Conversely, we can also remove a line from a quantum set of lines in , where and , such that it is still a quantum set of lines, as follows:
-
Choose a basis of points on different lines .
-
Pick another line from the quantum set of lines and two different points and on that line such that : .
-
For each replace the line by the line .
-
Now is a quantum set of lines in .
Note that, in the above operation, and not interchangeable. The following example illustrates this.
Example 21. Consider the star graph . It corresponds to the graph state with stabiliser matrix
and the corresponding set of lines is a point pencil through , whose projection from is a frame in the hyperplane . Suppose that we want to extend the set with another line through , say the line with and . If we follow the above operation, we get the stabiliser matrix
but if we would change the roles of and in the construction, we would get the matrix
These quantum sets of lines are not equivalent because the second one contains the line with multiplicity 2, while the first one contains every line only once.
Note that the choice of the basis matters. See also Remark 14.
5 Application: classifying stabiliser codes up to equivalence
Using Theorem 4 and Theorem 11, we can classify all multidimensional graph states of a certain small size up to equivalence by computer.
We provide tables containing the number of graph states, up to equivalence, for and , generalising computational results for and by Danielsen and Parker [11] and for and by Danielsen [10]. These tables were obtained with SageMath [24] by a straightforward implementation of the local complementation strategy from Theorem 11. Our implementation can most probably be optimised with better code. But we do not focus on performance. Our goal is mostly to illustrate that, with the newly established graph formalism, it becomes easier to classify stabiliser codes with a given set of parameters for larger dimensions () as well.
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 2 | 3 | 6 | 11 | 26 | 59 | 182 | 675 | 3990 | 45,144 |
| 2 | 1 | 1 | 3 | 4 | 13 | 29 | 107 | 416 | 2618 | 27,445 | 615,180 | |
| 3 | 1 | 1 | 4 | 11 | 69 | 577 | 11,202 | 467,519 | ||||
| 4 | 1 | 5 | 8 | 120 | 2506 | 195,456 | ||||||
| 5 | 1 | 63 | ||||||||||
| 6 | 1 | |||||||||||
| All | 1 | 2 | 3 | 6 | 11 | 26 | 59 | 182 | 675 | 3990 | 45,144 | 1,323,363 |
Table 1: The number of stabiliser codes up to equivalence. Table taken from [11, Table 4].
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 2 | 5 | 11 | 29 | 78 | 260 | 1023 |
| 2 | 2 | 6 | 35 | 169 | 1170 | |||
| 3 | 1 | 2 | 19 | 178 | ||||
| All | 1 | 2 | 5 | 13 | 36 | 115 | 448 | 2371 |
Table 2: The number of stabiliser codes up to equivalence.
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 2 | 3 | 7 | 13 |
| 2 | 1 | 1 | 3 | 5 | 20 | |
| 3 | 1 | 1 | 5 | |||
| 4 | 1 | |||||
| All | 1 | 2 | 3 | 7 | 13 | 39 |
Table 3: The number of stabiliser codes up to equivalence. The last row agrees with the values in [10, Table 2].
| 1 | 2 | 3 | 4 | 5 | |
|---|---|---|---|---|---|
| 1 | 1 | 2 | 5 | 12 | 37 |
| 2 | 1 | 4 | 20 | ||
| 3 | 1 | ||||
| All | 1 | 2 | 6 | 16 | 58 |
Table 4: The number of stabiliser codes up to equivalence.
6 Final comments and further work
We proved that an stabiliser code is equivalent to a graph on vertices, which has two independent sets on vertices with a matching in between, and whose edges are weighted with elements of (Theorem 4). We translated local Clifford equivalence to a set of operations on such graphs (Theorem 11).
It does not appear to be easy to deduce the minimum distance of a stabiliser code directly from the associated graph. However, it can be calculated using the geometry of quantum sets of lines (Theorem 17).
The graph formalism allowed us to define two operations on quantum sets of lines to obtain other sets of quantum sets of lines. As an application, we classified stabiliser codes for some given small parameters.
We propose the following directions for future work:
-
Can one extend the ideas of this article to prime powers that are not primes? For geometrical objects equivalent to stabiliser codes of fields of non-prime order, see [4, 17].
-
Extend the tables in Section 5. Something that might prove interesting, is an algorithm to calculate a canonical representative of a stabiliser code, similarly to the work of Feulner [13] for linear codes.
-
Can we lower bound the minimum distance of a stabiliser code using graph parameters of the corresponding graph state? What are families of graphs for which the associated stabiliser codes have a large minimum distance?
-
The projection and extension operations from Section 4.2 and Section 4.3 can be used to find codes with a large minimum distance in a recursive way. For example, we can follow the path
while optimizing for the largest possible minimum distance.
To our knowledge, the existence of a stabiliser code is still open. We applied the extension operation on every stabiliser code to see if a could be obtained by walking the path
After going through all possibilities, we conclude that it is impossible. This gives some evidence (but not a proof) that a stabiliser code does not exist.
The drawback with this strategy is that there are many ways to choose a line that extends a given quantum set of lines. For the given values, this was possible, but in general it seems like walking every possible path towards a stabiliser code is infeasible on a normal computer.
Acknowledgements We would like to thank Oriol Farràs and Cristina Fernández for their careful reading of the doctoral thesis of Ricard Vilar, on which the results in this paper are partially based.
AI declaration We did not use any AI-assisted technologies in the research, writing, or editing of the manuscript.
References
[1] S. Anders and H.J. Briegel, Fast simulation of stabilizer circuits using a graph state representation, Phys. Rev. A, 73 (2006) 022334.
[2] A. Ashikhmin and E. Knill, Nonbinary quantum stabilizer codes, IEEE Trans. Inf. Theory 47 (2001) no. 7, 3065–3072.
[3] S. Ball, A. Centelles and F. Huber, Quantum error-correcting codes and their geometries, Ann. Inst. Henri Poincare D, 10 (2023) 337–405.
[4] S. Ball, E. Moreno and R. Simoens, Stabiliser codes over fields of even order, IEEE Trans. Inf. Theory 71 (2025) 3707–3718.
[5] M. Bahramgiri and S. Beigi, Graph States Under the Action of Local Clifford Group in Non-Binary Case, arXiv:quant-ph/0610267 (2006).
[6] J. Bierbrauer, G. Faina, M. Giulietti, S. Marcugini and F. Pambianco, The geometry of quantum codes, Innov. Incidence Geom. 6+7 (2008) no. 1, 53–71.
[7] A.R. Calderbank and P. Shor, Good quantum error-correcting codes exist, Phys. Rev. A, 54 (1996) 1098–1105.
[8] A.R. Calderbank, E.M. Rains, P.W. Shor, and N. Sloane, Quantum error correction via codes over GF(4), IEEE Trans. Inf. Theory, 44 (1998) 1369–1387.
[9] N. Claudet and S. Perdix, Local equivalence of stabilizer states: a graphical characterisation, arXiv:2409.20183 (2025).
[10] L.E. Danielsen. Graph-based classification of self-dual additive codes over finite fields. Adv. Math. Commun. 3 (2009), no. 4, 329–348.
[11] L.E. Danielsen and M.G. Parker, On the classification of all self-dual additive codes over GF(4) of length up to 12, J. Comb. Theory A 113 (2006), Issue 7, 1351–1367.
[12] M.B. Elliot, Stabilizer states and local realism, PhD Thesis, University of New Mexico, USA (2008).
[13] T. Feulner. The Automorphism Groups of Linear Codes and Canonical Representatives of Their Semilinear Isometry Classes. Advances in Mathematics of Communications 3 (2009) no.4, 363–383.
[14] D. Gottesman, Class of quantum error-correcting codes saturating the quantum Hamming bound, Phys. Rev. A 54 (1996) 1862–1868.
[15] D.G. Glynn, T.A. Gulliver, J.G. Maks and M.K. Gupta, The Geometry of Additive Quantum Codes, unpublished manuscript (available online at https://www.academia.edu/17980449).
[16] M. Hein, J. Eisert and H.J. Briegel, Multi-party entanglement in graph states, Phys. Rev. A, 69 (2004) 062311.
[17] M. Heinrich, On stabiliser techniques and their application to simulation and certification of quantum devices, University of Cologne, PhD Thesis (2021).
[18] A.T. Hu and A.B. Khesin, Improved graph formalism for quantum circuit simulation, Phys. Rev. A, 105 (2022) 022432.
[19] T. McElvanney and M. Backens, Complete flow-preserving rewrite rules for mbqc patterns with pauli measurements, arXiv:2205.02009 (2022).
[20] A. Ketkar, A. Klappenecker, S. Kumar and P.K. Sarvepalli, Nonbinary stabilizer codes over finite fields, IEEE Trans. Inf. Theory, 52 (2006) 4892–4914.
[21] A.B. Khesin, J. Lu and P. Shor, Universal graph representation of stabilizer codes, arXiv:2411.14448v3 (2025).
[22] D. Schlingemann, Stabilizer codes can be realized as graph codes, Quantum Inf. Comput. 2 (2002) no. 4, 307–323.
[23] M. Van den Nest, J. Dehaene and B. De Moor, Graphical description of the action of local Clifford transformations on graph states, Phys. Rev. A, 69 (2004), no. 2, 022316.
[24] The Sage Developers, SageMath, the Sage Mathematics Software System (Version 10.1), https://www.sagemath.org.
[25] A.M. Steane. Simple quantum error correcting codes, Phys. Rev. Lett. 77 (1996) 793–797.
[26] L. Vandré, J. de Jong, F. Hahn, A. Burchardt, O. Gühne, A. Pappa, Distinguishing graph states by the properties of their marginals, arXiv:2406.09956 (2025).
[27] S. Yu, Q. Chen, and C. H. Oh, Graphical quantum error-correcting codes, arXiv:0709.1780 (2007).
SIMEON BALL
DEPARTMENT OF MATHEMATICS UNIVERSITAT POLITÈCNICA DE CATALUNYA C. PAU GARGALLO 14, 08028 BARCELONA, SPAIN E-mail: simeon.michael.ball@upc.edu
ROBIN SIMOENS
DEPARTMENT OF MATHEMATICS: ANALYSIS, LOGIC AND DISCRETE MATHEMATICS GHENT UNIVERSITY KRIJGSLAAN 281, 9000 GENT, BELGIUM DEPARTMENT OF MATHEMATICS UNIVERSITAT POLITÈCNICA DE CATALUNYA C. PAU GARGALLO 14, 08028 BARCELONA, SPAIN E-mail: Robin.Simoens@UGent.be
GÜLIZAR GÜNAY
INSTITUTE OF ANALYSIS AND NUMBER THEORY GRAZ UNIVERSITY OF TECHNOLOGY MÜNZGRABENSTRASSE 36, 8010 GRAZ, AUSTRIA E-mail: gunaymert@math.tugraz.at
RICARD VILAR
DEPARTMENT OF MATHEMATICS UNIVERSITAT POLITÈCNICA DE CATALUNYA C. PAU GARGALLO 14, 08028 BARCELONA, SPAIN E-mail: ricard.vilar@upc.edu