WorksPhysics and Astronomy
Materialised symmetries of 2D translationally invariant codes
Abstract
There has been significant recent interest in near-term qLDPC codes as high-performance alternatives to surface and color codes. One such class of codes is 2-dimensional translationally invariant (TI) codes, such as bivariate bicycle codes, which share similar properties to topological codes. Fundamental objects in the study of such codes are the materialised symmetries, which can be used for the construction of matching-based decoders. These decoders generalise the minimum-weight perfect matching decoder for toric codes and provide similar asymptotic performance guarantees that heuristic decoders such as BP and its variants lack. Despite this, the mathematical structure of symmetries along with their properties under translation and restriction to finite-sized lattices has not been well-studied. We describe a decomposition of symmetry spaces of 2D CSS TI codes on infinite lattices into translation-invariant subspaces which allow us to write an explicit basis of symmetries in a plane-wave-like form. We then describe how to adapt this infinite lattice basis so that any corresponding rectangular periodic lattice basis can be obtained by restriction to basis elements compatible with the periodic boundaries. This allows us to describe how the symmetry space varies with different rectangular dimensions. We illustrate via examples that it is often straightforward in practice to determine a basis of symmetries on twisted boundaries as well, without needing to recompute the decomposition. We comment on the applications of this framework to matching-based decoders and provide examples of symmetries of such codes as the gross code.
Introduction
Quantum error correction has provided a route to suppressing noise in quantum computers beyond the limits of the hardware [1, 2, 3, 4]. Topological codes, particularly those in 2D, have proven a popular choice of error correcting code due to their modest physical demands, especially their sparse connectivity [5, 6]. Such codes are understood to have tradeoffs between locality and performance [7, 8], and thus recent interest has shifted from traditional nearest-neighbour-connected 2D codes, such as the surface and color codes [9, 10], to longer-range codes in the form of bivariate bicycle (BB) codes and tile codes [11, 12, 13, 14, 15, 16]. These families offer codes implementable in near-term quantum computers with improved parameters and provide an intermediary between traditional 2D codes and asymptotically-good qLDPC codes. Although not local in a nearest-neighbour sense, these codes can be thought of as 2D topological when placed in a family of growing lattices [17, 18, 19] and are in addition translationally-invariant (TI). Leveraging topological and TI algebraic machinery to study these codes has led to fault-tolerant gate constructions [20, 21, 22], to architecture designs for platforms such as neutral atoms [23, 24] and superconducting qubits [25, 26, 27, 28], and to decoders [29, 30].
Studies of the structure of topological codes has motivated interest in materialised symmetries [5, 31] and the closely related concept of metachecks [32], where groups of stabilizer generators multiply to give the identity. Materialized symmetries lead to matchable decoding sub-problems, whose solutions are combined to form a decoding [31, 33, 34, 35, 36]. These decoders are of interest as they have provable thresholds and thus can have arbitrarily high error suppression on sufficiently large lattices [30, 37]. This is in contrast to heuristic decoders such as belief propagation (BP) which may hit error floors at low physical error rates. Materialized symmetries are also relevant in decoupling 2D topological phases [38, 39] and designing planar boundaries [15] [40].
Motivated by the rich translational structure of materialized symmetries in quantum error correcting codes of interest, in this paper we explore this structure through the lens of Haah’s formalism for describing 2D CSS TI codes [17] on an infinite lattice. In this formalism, the checks of the code are described by a group algebra over the lattice, and translation corresponds to multiplication. We first highlight some key translational properties of symmetries, particularly their components closed under translation, with a motivating example in Section II and relate it to the concept of anyon-symmetry duality. We cover necessary background in Section III, in particular formally describing anyon-symmetry duality, and then in Section IV describe a decomposition of the space of symmetries into subspaces closed under translation by leveraging anyon-symmetry duality, and obtain an explicit basis for each subspace. Each subspace corresponds to coordinates in some extension field of , and these coordinates describe the horizontal/vertical frequencies of their corresponding symmetries, which in the simplest cases resemble plane waves. In § 1.4, we describe how to use infinite-lattice symmetries to compute a basis of symmetries after compactifying to any periodic rectangular-lattice configuration. We find that after appropriately adapting the infinite-lattice basis for each subspace, we can efficiently determine finite-lattice symmetries and explicitly describe how the symmetry space varies with boundary dimensions. We also discuss how to use these methods to analyse the case of twisted boundary conditions for less complex decompositions.
Motivating example: 2D Color Code
Let us first consider the motivating example of the 2D hexagonal color code, which we will set on an infinite lattice. We pick this example for the relative simplicity of its materialized symmetries, which nevertheless display interesting patterns on the 2D lattice that are not fully described by standard approaches such as Gaussian elimination. These materialized symmetries and related metachecks are well-known for their application in matching-based decoding [33, 35, 36]. We will also informally introduce some preliminaries relevant to the example such as anyon-symmetry duality, starting with the anyons of the color code and seeing how we can construct metachecks from these.
For our purposes, anyons are a classification of syndromes such that two syndromes describe the same anyon if we can deform one into the other via some finite-weight Pauli operator. In the color code, each violated c-colored X check (with c ) hosts an anyon, named cz. Analogously, violated Z checks host cx anyons. We can also fuse anyons; two anyons a and b fuse to give c if some application of finite-weight Pauli operators converts the former pair into the latter. For example, a single Pauli X error converts a pair of adjacent rx and gx anyons into a bx anyon; indeed for distinct , , (and where represents fusion). A materialised symmetry is an assignment of binary values to anyons that respects the fusion structure. For example, if we assign rx and gx , then we must assign to bx = rx gx. Symmetries describe conservation rules; the total parity of all anyons assigned 1 by a symmetry, within a valid syndrome resulting from finite-weight errors, is even. The above example, which we call the rg Z symmetry (as the violated checks have Pauli label Z), says that the total number of rx and gx anyons is always 0 (mod 2). We analogously have gb and br Z symmetries. We can add symmetries by adding the corresponding assignments pointwise (mod 2); for example the rg and gb Z symmetries add to give to the br Z symmetry.
We can now use these symmetries to construct metachecks, patterns of stabiliser checks that multiply to the identity; these tell us about redundancies between stabiliser checks. In this work, we use the term (materialised) symmetry to describe the objects dual to anyons, and metachecks to refer to subsets of checks that multiply to the identity. Looking at the rg Z symmetry, for example, we know that any error must create rx and gx anyons in pairs. Consider a pattern consisting of all stabilisers whose violations are rx/gx anyons, i.e. the red and green Z checks. Any X error will commute with this pattern due to this corresponding conservation rule (explicitly, it violates an even number of checks in the pattern), and thus the pattern must be a metacheck. Indeed, every symmetry gives a unique metacheck and vice versa, so we regard the two as equivalent. We show the metachecks constructed from the rg, gb, and br Z symmetries in Figure 1.
Figure 1. The , , and X or Z symmetries of the hexagonal color code. The arrow is a translation that cycles between symmetries.
A standard way to construct metachecks is as follows: viewing the group of anyons as a vector space with addition corresponding to fusion, we compute a basis of anyons (e.g. {rx, gx}). We can then compute the dual basis of the symmetries: for each basis anyon a, define the dual basis element to assign a to 1 and all other basis anyons to 0. We then acquire a basis of metachecks by including exactly the checks whose violations correspond to anyons assigned 1 (i.e., red and green Z plaquettes for symmetries dual to rx and gx anyons).
What this method does not generally provide, however, is insight into the translational structure of these metachecks. For instance, we can observe that there exists a translation which cycles between the three metachecks of each Pauli label (Figure 1). This suggests a translational periodicity of 3 and thus tells us that when introducing periodic boundary conditions, we need these boundary lengths to be multiples of 3 in order to support these metachecks. As the dimension of the space of metachecks is proportional to the logical dimension; it is very much necessary that the color code is placed on such suitable boundary conditions. We would thus like to explore the symmetries of 2D codes, not just considering the pointwise addition but also the translational data via a multiplication operation. We will decompose the symmetry space into ‘components’; each component is a subspace of symmetries closed under translation such that the entire symmetry space is a direct sum of these components. Loosely speaking, we can think of these components as the frequencies/periodicities that make up an arbitrary symmetry/metacheck. In the color code, there is only one component of X (or Z) symmetries.
Background
In this section, we briefly describe the chain complex formulation of CSS codes, and the additional module structure which the CSS chain complex is equipped with when considering TI codes on a square lattice. We then introduce 2D TI codes in this framework, along with key concepts such as anyons and metachecks/symmetries, which we show to be dual to each other.
CSS codes as chain complexes
A chain complex is a sequence of objects and maps called differentials such that . Typically, each will be a -vector space and the differentials will be -linear maps. Of interest are length-2 complexes [41]:
which describe CSS codes [3, 4] after selecting bases of , , and to represent the X checks, qubits, and Z checks respectively. Here, takes an X stabiliser to its support in qubits and is represented by the transposed X parity check matrix. Also, takes the support of an X operator to its Z syndrome, and is represented by the Z parity check matrix. In , the X logical operators have no Z syndrome and are thus given as . When quotiented by the X stabilisers (as their qubit supports) we get the homology at representing the X logical classes. We can also construct the dual complex:
where and . This is the Z/X flipped counterpart of the original CSS chain complex and takes Z stabilisers to qubits, and qubits to their X syndromes.
2D translationally invariant codes
We briefly review CSS codes on an infinite 2D square lattice, using Haah’s Laurent polynomial formalism [17]. By replacing periodic boundaries with the infinite lattice, we can explore properties that are shared between families of codes across different lattices, particularly anyons and symmetries.
The sites of this lattice are labelled by the group , we write the site at co-ordinates as ; as a group action, these elements describe translations. If we use the elements of to label our checks or qubits, then they form a basis spanning the Laurent polynomial ring . This ring allows us to describe any finite set of co-ordinates in . We will consider a setup with two qubits on each site, such that . Although one can construct examples with more qubits per site, the vast majority of 2D TI codes of interest (e.g., BB codes) fall under this construction. We will demand that all translations of a stabiliser are themselves stabilisers, a condition called translational-invariance. Suppose there is one type of X check, and all X checks are translations of this one type. We may choose to label one such check as 1, and then its -translations as . Under this labelling , and is not only -linear but -linear, that is . Similarly, setting one type of Z check we get that and is -linear. We then have that the CSS chain complex is a complex of -modules.
We will additionally demand that the CSS complex is exact at , which is to say that (this will ensure that we have a growing distance when compactifying to finite lattices). This then forces the complex to take the following form:
where are Laurent polynomials satisfying [16, 18]. Swapping X and Z, we get:
where . We can ‘compactify’ this code to periodic code boundaries by replacing with where describes a rectangular torus with dimensions . More generally, we might have describing a twisted torus occupying a parallelogram with corners , and .
Anyons and symmetries
We will now review the dual notions of anyons and symmetries in the context of Haah’s formalism. In our infinite lattice setting, an anyon refers to any syndrome pattern that can be produced by an infinite-support Pauli operator [17]; for all codes we consider, this is simply all syndrome patterns. Let us start by considering Z check syndrome patterns, which we call m-anyons. We can classify these m-anyons into ‘sectors’; two m-anyons share a sector if we can turn one into the other by some finite-support X operator. We can obtain the space of -anyon sectors by quotienting out the space of Z syndromes by all possible syndromes created by a finite-support X operator, to get [17, 18]. Analogously, X syndrome patterns or -anyons are classified by .
A metacheck is a pattern of stabiliser checks which multiply to the identity. We call such a pattern of Z checks an -metacheck and its X counterpart an -metacheck. We can describe the space of finite-support or local -metachecks with (in our construction, is injective so there are no local metachecks), however as only supports finite collections of lattice sites, we need to extend it to consider infinite-support or global metachecks. To this end, we will need to describe the dual of an -module .
Definition III.1. Given an -module (with a Laurent-polynomial ring), the dual of , denoted , is the -vector space dual of equipped with the -multiplication operation for , , and .
In particular, identifying and with their -vector space duals (the dual of being the function taking to 1 and all other monomials to 0), we can think of as containing ; while only permits finite sums of monomials, allows any infinite series of monomials as we can map as many monomials to 1 as we like. By replacing with in the CSS chain complex, we can then write the space of global -metachecks as where
is represented by the same matrix as but acts on instead of . Analogously, we can describe the space of global -metachecks as . We now state a result connecting metachecks to anyons:
Proposition III.2 (Anyon/metacheck duality). The -anyons are dual to the -metachecks, that is:
Proof. See Appendix A.1
As discussed in the motivating example, this picture allows us to think of metachecks as anyon conservation rules, a context in which they are often referred to alternatively as symmetries. We can also think of metachecks as stabiliser patterns following a consistency rule enforced by the anyon structure; if a metacheck has odd overlap with some syndrome pattern, then it must have odd overlap with all syndrome patterns belonging to the same anyon sector and vice versa. As the anyon structure informs the metacheck structure, once we have computed the former the latter follows; a straightforward way to obtain a basis of metachecks is to first compute a basis of anyons and then take the dual. The anyon basis, as demonstrated in recent works [18], can be readily computed by taking the monomials irreducible by a Gröbner basis of , although such a basis does not generally provide insight into the translational structure of metachecks. We therefore take a different approach, outlined below.
Symmetries on the infinite lattice
Overview of the procedure
We will in this section consider symmetries on the infinite lattice. Although these symmetries have infinite support, we will see that upon decomposing the symmetry space into components closed under translation, each component will become ‘local’ under a change of basis and thus admit a compact description.
First, we solve the system of equations as its solutions label the components of the decomposition. The solutions may fall in field extensions of , but there is some sufficiently large finite field that contains all such solutions. Upon extending to this finite field to get what we informally call -anyons (as opposed to the original -anyons), we may decompose our anyon space into a direct sum of components, each of which is labelled by some point that is a common root of and . These points organise into orbits of Galois conjugates, analogous to complex conjugate pairs when solving systems of real polynomials. We then take the dual of each component, to get a similar decomposition of the -symmetry space. We then apply a map called the field trace to return to -symmetries, upon which components within an orbit collapse to a single component. We can thus also associate each component on the -symmetry space with an orbit; the component will describe a subspace closed under translation that is irreducible in the sense that it cannot be further decomposed. The points composing the associated orbit as well as the local structure of the component at these points will allow us to determine properties of the subspace such as translational periodicity.
Decomposing the symmetry space
We will focus on -symmetries, which we will for convenience simply refer to as symmetries or metachecks. The procedure for computing -symmetries follows analogously.
As we have seen, the -symmetries are associated with elements of the ring . We will from here onwards define:
so that the symmetries are . In this ring, polynomials and are identified with zero. Consider, therefore, the system of equations . There exists some finite field in which all solutions lie. As we are working in the Laurent polynomial ring where and are invertible, we ignore solutions where or . Let us denote the set of remaining solutions by . Under our assumption that the CSS complex is exact at , there will be finitely many such solutions. After extending by to get , our anyon space extends to , where is the extension ideal of . We informally call this space the -anyons. The ideal admits a primary decomposition:
with a unique ideal associated to each point of such that (we define ). This leads to the following decomposition of the -anyon space:
Proposition IV.1 (Chinese remainder theorem decomposition [42]).
Computing such a decomposition is a standard task in computational commutative algebra. Importantly, each component of is associated with some point in , and can be thought of as describing the local neighbourhood of at this point. When
, we say that is a fat point (Figure 2), corresponding to a root with non-trivial multiplicity. We will from now onwards, when describing centre our coordinates at the relevant point and write its elements in terms of and instead of and . Note that each component is closed under translation by virtue of being an -module. Something that will become relevant later when returning to is that the points of organise themselves in orbits of the form . These are the finite field analogue of complex conjugate pairs from solving systems of real polynomials.

Figure 2. Schematic illustration of the decomposition of . Each component corresponds to polynomial functions at a point , but fat points () include additional structure in their neighbourhood. The points occur at the intersection of (black) and (blue).
Definition IV.2 (Galois orbits of roots). An orbit of is a length- sequence of solutions in taking the form where and . can be partitioned into finitely many orbits.
The smallest field in which each orbit can be embedded is . We can now make the move from -anyons to -symmetries by taking the dual (the space of -symmetries is then , where denotes the -vector space rather than -vector space dual), and doing so preserves the decomposition by taking -anyon components to -symmetry components.
Proposition IV.3.
Proof. See Appendix A2.
If we have computed a basis of each -anyon component, then its dual is a basis of the corresponding -symmetry component. We will now look to return to the space of -symmetries via a -linear map that takes an -vector space basis (-basis) of -symmetries onto a basis of -symmetries in a way that takes components to components. We will thus need to first turn our -vector space basis (-basis) into a -basis of the same space. This is achieved by taking the setwise product of a -basis with the -basis of our -symmetries to get . Before we describe this map, let us first define the field trace:
Definition IV.4. Given a finite field and some , the field trace is a -linear map given by the sum over an orbit:
where has size . We overload notation to define the trace of a -symmetry as follows:
which is to say that we take the trace pointwise.
We can now describe the map returning us to symmetries. Given a symmetry , we take its field trace and then restrict it to via the natural embedding of within (concretely, is embedded as ). We claim that this map takes -symmetry components belonging to the same orbit onto the same -symmetries and thus we only need to apply it to one component per orbit.
Theorem IV.5. Let the image of a K-symmetry component under the -linear map (where is the natural embedding of into ) be denoted . Then for and belonging to the same orbit and we can label these by orbits . Here, is an -module (it is closed under translation) and
Proof. See Appendix A 3.
This theorem concludes our procedure: compute a decomposition of K-anyons, take duals to get a decomposition of K-symmetries, and then apply the above map to get a decomposition of -symmetries. Practically, we will want to choose the field K component-by-component, to be the smallest field containing the orbit associated with each component. This ensures that when taking the trace-restriction of the -basis of K-symmetries to get a spanning set of -symmetries, we will not get any redundant elements and it will be a basis. To find each orbit in its smallest field, we take the primary decomposition of (where are the primary components and ). Each pair is associated with some orbit, and the smallest field containing that orbit is where . Instead of a single , we will select for each orbit, whose -symmetries can then be computed by decomposing , where .
Let us now illustrate this procedure with some examples.
Example: 2D hexagonal color code
We will begin with the motivating color code example of Section II, and will show how the observed translational structure is made apparent by this procedure.
By separating the two qubits at each lattice site by a shift, (Figure 3), we can implement the hexagonal color code on a square lattice with the polynomials , [43].

Figure 3. A patch of color code on a planar lattice, as described by the polynomials , . Note how each color of check lives along sets of diagonals with for red, for green, and for blue.
We first solve the system of equations . Taking , we have . Substituting this back into , we get . This gives solutions and , where is a primitive element of satisfying . Note that these two points form a single orbit. Writing , we see that none of the points are fat. As we only need to select a single orbit representative, we select , with corresponding component (with , ). Its sole basis element is , and thus a basis of the dual component of -symmetries is (being the map taking and all other monomials in and to ). This -metacheck evaluates on as .
An -basis of is and thus we can write a -basis of -symmetries: . We then take the field trace of this basis to obtain the following basis of the component of -symmetries: , forming a 2D space with three non-trivial elements . As there is only one orbit in , this is the sole component of the -symmetry space. These three non-trivial elements correspond to our three colors of metacheck, and any unit translation (e.g. ) will cycle between these. As
we can see that each metacheck is supported on two ‘colors’ of diagonal (Figure 3).
Example: gross code
The gross code [11] is described by polynomials and . The solutions of form two orbits in ; the first is generated by and the second is generated by (we can think of this as a reflection of and indeed reflecting the previous example’s choice of color code polynomials in any axis changes its orbit to this). decomposes into two ideals; is with , . This is identical to that of the color code and produces the same metachecks. is with , . We have a basis of the corresponding component of -anyons which gives rise to the basis of the component of -metachecks (the relation couples and , as well as and together). Changing from - coordinates to - coordinates, we have that becomes . We have that becomes , where we take the values of and modulo 2 on the right-hand side. Similarly, becomes . Ultimately, we get the following basis of -metachecks:
with , giving an 8-dimensional space of metachecks on the infinite lattice. The -symmetries (e.g. ) supply the shape of the metacheck, whereas the prefactor describes the linearly independent shifts of this shape. The first four symmetries are the color code symmetries (with being a reflection of ). The next two basis metachecks have a factor which is periodic under horizontal/vertical translations of 2. Combined with the factor we see they are periodic under translations with . The next two basis metachecks are periodic under translations with . We can see that the smallest rectangular lattice hosting all metachecks is , and the standard gross code lattice does not support the last two basis metachecks.
Translational periods of symmetries
As illustrated in the gross code example, upon computing a basis of symmetries via the decomposition, we are then able to determine translations which act trivially on each basis element and thus determine a basis of translations which act trivially on the symmetry space, called a coarse-graining of the code family [17, 39]. Coarse-grainings are used to determine the scales at which 2D codes decouple in toric codes. To determine the periods of a symmetry, we determine the periods of the plane wave factor (e.g. ) and the local structure factor (e.g. ) and intersect the corresponding lattices.
Let us begin with the periods of the plane wave factor, ; if the orbit of has length and , for integers and , where is a primitive element of , then the periods of the factor are given by the lattice (i.e., translations by these lattice vectors leave the factor unchanged).
Now, let us consider the local structure factor. It has the following form:
By finding horizontal and vertical periods of the and terms respectively, we can then take the lowest common multiple of all horizontal and all vertical periods to get a rectangular period of the local structure factor. The period of in is (this is a consequence of Lucas’ theorem [44] that exactly when where and are written as bit-strings), and analogously for in . We thus have that the smallest rectangular period of the local structure factor is , which is a sub-lattice of the lattice of all periods.
Let us call the lattice of rectangular periods of the local structure factor , and the lattice of all periods of the structure factor . is a sub-lattice of , but the two are not necessarily identical as may contain diagonal periods. Then, for any but not in , there exists such that . Let and . Then we can check whether is a period. If it is, then we update the basis as , now covering all such that . We can repeat this; at any stage if our basis is , we check whether or are periods and update the basis accordingly (we always keep ). On the -th iteration we will have covered all such that , and upon termination we will have a basis of . Intersecting with the lattice of periods of the plane wave factor, we then have the lattice of periods of the symmetry space. In Table I, we illustrate the coarse-grainings of various codes.
Symmetries on periodic boundaries
As seen in the gross code example of Section IV D, our representation of the infinite-lattice metachecks provides insight into which metachecks are supported on some periodic lattice configuration, as well as the smallest lattice required to support all metachecks. In this section, we approach this systematically with the goal of identifying bases of metachecks on rectangular lattices. In particular, having precomputed an infinite lattice basis of metachecks, we would like to determine the rectangular-lattice basis of metachecks from a boundary configuration with minimal computation. As we will see, there are two parts of this problem: the first is determining which components of the decomposition ‘survive’ on the rectangular lattice (which is to say some nonzero subspace is supported), and the second is determining the surviving subspace of each such component. The idea is that
| Code family | K-syms. | Gen. periods | C.G. periods | ||
| Toric code | <br> | <br> | |||
| BB5 code [45] | <br> | <br> | |||
| Color code | <br> | <br> | |||
| Gross code [11] | <br> | <br> | <br><br><br> | $(1,-1),(1,2)(1,1),(1,-2)(2,2),(2,-4)(4,4),(4,-8)$ | <br> |
| Two-gross [11] | <br> | <br><br> | <br><br><br> | $(1,-1),(1,2)(1,1),(1,-2)(2,2),(2,-4)(6,3),(7,-7)$ | <br> |
| BB code [11] | <br> | <br><br><br> | <br><br><br> | $(1,-1),(1,2)(1,1),(1,-2)(2,-1),(7,12)(3,4),(4,-5)$ | <br> |
| Generalised T.C [18] | <br> | <br> | <br> | <br> | <br> |
| Generalised T.C [18] | <br> | <br> | <br> | <br> | <br> |
| Generalised T.C [18] | <br> | <br><br> | <br><br><br> | $(1,1),(1,-2)(2,2),(2,-4)(1,-1),(3,4)(1,-16),(16,-1)$ | <br> |
Table 1. Infinite-lattice symmetries of various 2D code families. We include the defining polynomials and , one component from each orbit in the symmetry space decomposition, the K-basis of symmetries (i.e., the image of under the symmetry map) which produces -symmetries , the generating lattice periods of each symmetry basis element, and the generating periods of the entire symmetry space for coarse-graining (C.G.). We construct larger fields as the univariate polynomial ring modulus some polynomial, wherein is the image of . We define the following: , , , and .
we can think of the boundary ideal as having its own space of ‘-metachecks’ . Our goal is then to compute the intersection of infinite-lattice and -metachecks, which will be the space of surviving metachecks.
First, let us explore the structure of ; given its simple form we expect the decomposition to be correspondingly simple. Let and be the largest powers of 2 dividing and . Then given a point satisfying , the corresponding component of is . This is because we can write ; so the multiplicity of roots in is given by (analogously for ). So a basis of -symmetries of is given by . Let us call this space .
This suggests the following procedure; for each point satisfying , we test that the point satisfies the boundary equations . If the point satisfies the equations, then we intersect the corresponding component of -symmetries with . After repeating for every component/point, we can then convert back to -symmetries to get a decomposition of the symmetries on rectangular boundaries.
Example V.1 (Gross code symmetries). Consider the gross code on 6 × 12 rectangular boundaries. , so the component survives. Its basis is , which is unchanged by intersection with . In general, unless a surviving point is fat, its associated space of -symmetries will be , fit in every box, and thus be unchanged on rectangular boundaries. The component, however, has a basis element which pokes outside the box formed by (Figure 4). So the surviving subspace is spanned by the other two basis elements and . Thus, of our infinite-lattice basis of symmetries, all except for survive on the lattice.
Figure 4. Computing symmetries of the gross code on boundaries. (Left) The -component of the gross code K-symmetries is spanned by (blue). This fits in any non-zero box. (Right) The -component of the gross code K-symmetries is spanned by (blue, green, and pink respectively). The pink basis element does not fit inside the box.
In the above example, the basis after intersecting with is the subset of the infinite-lattice basis that lies in . As in Figure 5, this is not generally true for an arbitrary basis. We can however adapt the basis of infinite-lattice -symmetries within each component to make this true. To see this, consider the following ordering of basis elements of
Figure 5. Adapting a basis for rectangular boundaries. (Left) An example of a basis where neither basis element (highlighted in pink and blue respectively) survives intersection with , but their sum does. (Right) An ‘adapted’ basis of the same subspace where upon intersection with , the blue basis element survives and the pink does not. The blue basis element spans the subspace after intersection.
As it resembles the monomial order , we also call it the ordering. We can similarly conceive a ordering. Our goal is to ensure that the leading term of each basis element of our infinite-lattice -symmetries under both orderings is distinct; that this is possible is a standard result about bases bi-adapted to two flags ([46], Theorem 2.1) (the flags in our instance are the sequences of nested subspaces induced by either ordering). First, we write our basis of -symmetries as a matrix with the columns ordered . We then convert to row echelon form by Gaussian elimination, so that the leading terms of each basis element under are distinct. We reorder the columns under the ordering and again perform Gaussian elimination to put it in row echelon form. When doing this, however, if we have two rows sharing a leading term, we always pivot off the row whose leading term in the ordering is last. Pivoting in this way will ensure that the leading terms of each row under the ordering remain distinct.
What we need to precompute then is a bi-adapted basis of -symmetries on the infinite lattice (to be precise, we do not need the whole basis as we ignore redundant components in the same orbit) as well as the corresponding basis of infinite-lattice -symmetries. We can then take any rectangular boundary configuration and first, for each point test it against the boundary equations. For points satisfying the equations, we then select the sub-basis that lies in . The corresponding -symmetries then form a basis on the rectangular lattice. In Table II, we explicitly describe the symmetries of various examples from the literature. Although the procedure outlined above is specific to rectangular boundaries, we have in Table II codes on non-rectangular or twisted boundaries; in many cases, the components are either all trivial (in the sense that there are no fat points) or relatively simple, and thus we can easily determine how the symmetry space varies with different choices of twisted boundary. We can also determine the logical dimension or number of logical qubits of these codes, which is double the dimension of the symmetry space. Suppose for each (with one point per orbit, and the field being the smallest for that orbit), -symmetry basis elements survive. Then the logical dimension is . We can thus explicitly describe how the logical dimension varies with rectangular lattice size.
| Code | Lattice periods | |||
| Toric code | <br> | <br> | (1) | |
| BB5 [45] | <br> | <br> | (2) | |
| Color code [43] | <br> | <br> | (2) | |
| Gross code [11] | <br> | <br> | (2)<br> (4) | <br> |
| Gross [47] | <br> | <br> | (2)<br> (6) | <br> |
| Gross [11] | <br> | <br> | (2)<br> (4) | <br> |
| Two-gross [11] | <br> | <br> | (2)<br> (4)<br> | <br><br> |
| BB code [11] | <br> | <br> | (2)<br> (2)<br><br> | <br><br><br> |
| Generalised T.C [18] | <br> | <br> | (4)<br> | <br> |
| Generalised T.C [18] | <br> | <br> | (7)<br> | <br> |
| Generalised T.C [18] | <br> | <br> | (2)<br> (3)<br> | <br><br> |
Table II. A table of the infinite-lattice symmetries of various 2D codes with the ones surviving compactification to the finite lattice highlighted in red. The -symmetries are given instead of the -symmetries for compactness. In all cases, the surviving elements form a basis of finite-lattice symmetries. In parentheses we put the dimension of the component associated with each orbit after compactification. We also define , , , and .
Example V.2 (Counting logical qubits). Consider the family of codes with gross polynomials on lattice dimensions , with odd, the logical dimension is 0 unless both and are multiples of 3. If , then the logical dimension is 8, with each orbit contributing 4. If , then the logical dimension is 12, with the orbit contributing 8, and if , then the logical dimension is 16. More generally, for twisted boundaries with corners , we have four logical qubits from the point if . We additionally have logical qubits from the point if .
Conclusion
In this work, we have described a procedure to compute the infinite-lattice materialised symmetries/global metachecks of BB codes by decomposing the symmetry space into components closed under translation. Furthermore, we gain explicit expressions for the symmetries resembling plane waves that reveal their translational structure. This builds on prior methods based on Gröbner bases [18] that return -vector space bases that describe the additive but not translational properties of symmetries. These bases can be used to determine
coarse-grainings to decouple bivariate bicycle codes into toric codes. We show how to easily compute a minimal rectangular coarse-graining, i.e., a smallest rectangular boundary configuration that preserves all infinite-lattice symmetries. We also compute a basis of all coarse-grainings, including twisted coarse-grainings, although this is more computationally involved.
We show how to use the infinite-lattice symmetries to efficiently compute the symmetries of the associated family of codes on different rectangular periodic lattices: first, appropriately adapt the bases of each component, then by determining whether each basis element ‘survives’, determine a sub-basis of the infinite-lattice symmetries that describes the finite-lattice symmetries. A byproduct of this is that we can compute the number of logical qubits on finite lattices, and can thus given a family of 2D TI codes describe how its logical dimension varies as a function of the lattice dimensions.
We note that our method for finding infinite-lattice symmetries also generalises to trivariate-tricycle code families [48, 49] with growing distances. Here, we have a duality between the module of point excitations and (X) global symmetries, and decomposing the module of pointlike excitations gives us an analogous decomposition of the symmetry space. For example, the code in [48] has symmetries given by for and (we thus see that as its symmetry space is 2-dimensional, it must have at most logical qubits). In 3-dimensions, we cannot however adapt the basis to cheaply determine finite-lattice bases of symmetries; this is because we can at most adapt a basis to 2 flags (in the 2D case, these came from our orderings and ). In many cases, such as the above example, it should be fairly straightforward to identify how the basis changes on periodic boundaries.
Our method does not apply in full generality to twisted boundaries; the twisted boundary ideals do not appear to admit an elegant decomposition. If the infinite lattice components do not include fat points or the twisted boundaries have odd width and height, then restricting to any boundary is straightforward and amounts to checking which points satisfy the boundary condition equations. Even when this is not the case, one can often determine how the symmetry space changes across different twisted boundaries by examining the explicit expressions for the infinite symmetry basis, as demonstrated with the gross code and its variants, given these expressions are sufficiently uncomplicated.
We have considered only 2D codes following a 2-block CSS form. However, we expect that our work should generalise to non-CSS codes. It is known that for a 2D code on a square lattice with growing distance, stabiliser generators can be chosen so that the code has exclusively global metachecks ([17] Lemma 7.1). In such codes, we expect anyon-symmetry duality to hold, and thus we can decompose the anyon module into local pieces to get a symmetry decomposition. The anyon module in this general case is obtained by quotienting the module of excitations by the excitation/syndrome map that takes Pauli operators to their respective syndromes.
Our results will likely find direct application in developing and improving matching-based decoders [29, 30] for 2D codes, and also understanding what makes certain BB codes amenable to such decoders. Matching-based decoders have provable thresholds and therefore avoid having error floors on sufficiently large lattices [30], in contrast to heuristic decoders where such guarantees may not exist. In practice, performance of matching decoders can suffer due to the decrease in effective distance incurred by decoupling the code into symmetries. Heuristically, by including as many low periodicity symmetries as possible in the selected basis, the performance could be improved [30]. As each component in the symmetry-space decomposition corresponds to an irreducible periodicity (in the sense that we cannot write a symmetry with this periodicity as a sum of lower periodicity symmetries), the resulting basis satisfies these demands. Should we want to design BB codes as matching-friendly as possible, we might want the components of the symmetry space to be as low in periodicity as possible. It may thus be interesting to select ideals with low-periodicity decompositions, and test matching-based decoders on BB codes where .
Another future direction would be to port this framework to understand open-boundary BB codes [14, 15, 16] and design a larger variety of boundary configurations beyond rough-smooth boundaries. If we include all boundary gauge operators, the symmetries are consistent with those on the infinite lattice. Excluding boundary gauge operators to gap the boundary then ‘breaks’ certain symmetries, so the surviving symmetries classify the boundary.
It would also be interesting to explore the global metachecks/symmetries of fracton codes such as Haah’s cubic code [50], where the ideal decomposition is significantly more complex and we encounter 1D curves in addition to points (see Figure 2); the component associated with each 1D curve is an infinite-dimensional vector space. Understanding metachecks in such codes could pave the way to matching-based decoders of fracton codes, as well as improving our understanding of how the code properties vary with different boundary configurations.
Author Contributions
AL developed the procedure described and obtained all results in this manuscript. CKM led the project. All authors contributed towards the writing of the manuscript and the direction of the project. OpenAI ChatGPT 5.4/5.6 and Claude Opus 4.8 was used to identify relevant mathematical literature and tools. The authors take full responsibility for the content of the manuscript.
Acknowledgements
We thank Benjamin Brown, Kaavya Sahay, and Dominic Williamson for discussions. This work is supported by the Defence Science and Technologies Group (DSTG) and Advanced Strategic Capabilities Accelerator (or ASCA) through its Emerging and Disruptive Technologies (EDT) Program, and the Intelligence Advanced Research Projects Activity (IARPA) through the Entangled Logical Qubits program Cooperative Agreement Number W911NF-23-2-0223.
References
Proofs
Proof of Proposition. III.2
Proof. We will show that ; the second statement follows analogously. The isomorphism is defined as follows: where is the class of in . First, we show is well-defined; that if . Let . We have that , and thus . It is easily checked that and for a monomial . It follows that is a homomorphism.
Let us similarly define , with . This is readily checked to also be a homomorphism, and it can also be verified that it is the inverse of .
Proof of Proposition. IV.3
Proof. We want to show that . As sends direct sums to direct sums in our finitely-many summand case, we have that the two are isomorphic as -vector spaces; the isomorphism takes a tuple of functions to the function with . It is clear that this respects -multiplication; if is mapped to , then gets mapped to with .
Proof of Theorem. IV.5
First, we show some intermediate but elementary results. We will use a different notation from the theorem statement. Applying a CRT decomposition to gives us ; we can then write the CRT decomposition of as , where form an orbit (these are what we would write as ) such that . Our 's will turn out to be the components .
Lemma A.1.
Proof. Suppose we order the components so . Consider the Frobenius automorphism that squares the coefficients of polynomials. Then, as , and noting , we see that gives an alternate decomposition of with the primes corresponding to each being cycled. However, as the local decomposition of is unique, must permute components . It follows that as consists fixed points under . Thus .
Lemma A.2. Given a -vector space , and a -linear map , there exists a -linear map such that .
Proof. We use the fact that all -linear maps from to can be written as . Given an -linear map for a -vector space , we can consider the map for and some , which we must be able to write as for some . Let us denote this as , thus defining . We can show is -linear as follows: taking , we have that for all , . As the trace pairing is non-degenerate, we have that . Similarly, , and thus by non-degeneracy. As we see that is -linear. As , we are done.
Now, we can show the main result.
Proof. Consider the map . It is readily seen that this takes a component such as into , but what we need to show is that it surjects. Consider the map from to . It follows from Lemma. A.1 that this map is injective and thus takes a basis of to a linearly independent set in . We can thus extend some map to a map such that . Applying Lemma A.2, we have that for any , we have such that .
References
- [1]P. W. Shor, Scheme for reducing decoherence in quantum computer memory, Phys. Rev. A 52, R2493(R) (1995).pubmed.ncbi.nlm.nih.gov/9912632
- [2]E. Knill, R. Laflamme, and L. Viola, Theory of quantum error correction for general noise, Physical Review Letters 84, 2525–2528 (2000).pubmed.ncbi.nlm.nih.gov/11018926
- [3]A. R. Calderbank and P. W. Shor, Good quantum error-correcting codes exist, Physical Review A 54, 1098–1105 (1996).pubmed.ncbi.nlm.nih.gov/9913578
- [4]A. M. Steane, Simple quantum error-correcting codes, Physical Review A 54, 4741–4751 (1996).pubmed.ncbi.nlm.nih.gov/9914038
- [5]A. Kitaev, Fault-tolerant quantum computation by anyons, Annals of Physics 303, 2–30 (2003).DOI
- [6]E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, Journal of Mathematical Physics 43, 4452–4505 (2002).DOI
- [7]S. Bravyi, D. Poulin, and B. Terhal, Tradeoffs for reliable quantum information storage in 2d systems, Physical Review Letters 104, 10.1103/physrevlett.104.050503 (2010).
- [8]S. Dai and R. Li, Locality vs quantum codes (2024), arXiv:2409.15203 [quant-ph].arxiv.org/abs/2409.15203
- [9]S. B. Bravyi and A. Y. Kitaev, Quantum codes on a lattice with boundary (1998), arXiv:quant-ph/9811052 [quant-ph].DOI
- [10]H. Bombin and M. A. Martin-Delgado, Topological quantum distillation, Physical Review Letters 97, 10.1103/physrevlett.97.180501 (2006).DOI
- [11]S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, and T. J. Yoder, High-threshold and low-overhead fault-tolerant quantum memory, Nature 627, 778–782 (2024).DOI
- [12]A. A. Kovalev and L. P. Pryadko, Quantum kronecker sum-product low-density parity-check codes with finite rate, Phys. Rev. A 88, 012311 (2013).DOI
- [13]P. Panteleev and G. Kalachev, Degenerate quantum ldpc codes with good finite length performance, Quantum 5, 585 (2021).DOI
- [14]V. Steffan, S. H. Choe, N. P. Breuckmann, F. R. F. Pereira, and J. N. Eberhardt, Tile codes: High-efficiency quantum codes on a lattice with boundary (2025), arXiv:2504.09171 [quant-ph].arxiv.org/abs/2504.09171
- [15]Z. Liang, J. N. Eberhardt, and Y.-A. Chen, Planar quantum low-density parity-check codes with open boundaries (2025), arXiv:2504.08887 [quant-ph].arxiv.org/abs/2504.08887
- [16]R. Wang and L. P. Pryadko, Algebra of bivariate-bicycle surface codes (2026), arXiv:2606.08771 [quant-ph].arxiv.org/abs/2606.08771
- [17]J. Haah, Commuting pauli hamiltonians as maps between free modules, Communications in Mathematical Physics 324, 593–399 (2013).
- [18]Z. Liang, K. Liu, H. Song, and Y.-A. Chen, Generalized toric codes on twisted tori for quantum error correction, PRX Quantum 6, 10.1103/rmy6-9n89 (2025).DOI
- [19]K. Chen, Y. Liu, Y. Zhang, Z. Liang, Y.-A. Chen, K. Liu, and H. Song, Anyon theory and topological frustration of high-efficiency quantum low-density parity-check codes, Physical Review Letters 135, 10.1103/86j7-cmsw (2025).DOI
- [20]J. N. Eberhardt and V. Steffan, Logical operators and fold-transversal gates of bivariate bicycle codes (2024), arXiv:2407.03973 [quant-ph].arxiv.org/abs/2407.03973
- [21]Z. Liang and Y.-A. Chen, Self-dual bivariate bicycle codes with transversal clifford gates (2026),arxiv.org/abs/2510.05211
- [22]A. W. Cross, Z. He, P. J. Rall, and T. J. Yoder, Improved qldpc surgery: Logical measurements and bridging codes (2025), arXiv:2407.18393 [quant-ph].arxiv.org/abs/2407.18393
- [23]J. Viszlai, W. Yang, S. Lin, J. Liu, N. Nottingham, J. Baker, and F. Chong, qsieve: Efficient qldpc memory via systolic movement in atom arrays, ACM Transactions on Quantum Computing 7, 1–26 (2026).DOI
- [24]M. Wang and F. Mueller, Coprime bivariate bicycle codes and their layouts on cold atoms, Quantum 10, 2009 (2026).DOI
- [25]T. J. Yoder, E. Schoute, P. Rall, E. Pritchett, J. M. Gambetta, A. W. Cross, M. Carroll, and M. E. Beverland, Tour de gross: A modular quantum computer based on bivariate bicycle codes (2025), arXiv:2506.03094 [quant-ph].arxiv.org/abs/2506.03094
- [26]M. H. Shaw and B. M. Terhal, Lowering connectivity requirements for bivariate bicycle codes using morphing circuits, Physical Review Letters 134, 10.1103/physrevlett.134.090602 (2025).DOI
- [27]G. M. Nixon, C. K. McLauchlan, and C. C. L. van Rest, Vine codes: Low-overhead quantum ldpc codes on a planar square grid (2026), arXiv:2606.20263 [quant-ph].arxiv.org/abs/2606.20263
- [28]B. Gu, T. Noszko, V. Steffan, J. N. Eberhardt, J. Roffe, J. Eisert, and S. Koutsioumpas, Nearest-neighbour gates are all you need: High-rate quantum low-density parity-check codes on a planar grid (2026), arXiv:2606.19482 [quant-ph].arxiv.org/abs/2606.19482
- [29]K. Sahay, D. J. Williamson, and B. J. Brown, A matching decoder for bivariate bicycle codes (2026), arXiv:2602.22770 [quant-ph].arxiv.org/abs/2602.22770
- [30]S. J. S. Tan, I. Gill, E. Huang, P. Liu, C. Zhao, H. Dehghani, A. Kubica, H. Zhou, and A. Dua, Generalized matching decoders for 2d topological translationally-invariant codes (2026), arXiv:2603.05402 [quant-ph].arxiv.org/abs/2603.05402
- [31]B. J. Brown and D. J. Williamson, Parallelized quantum error correction with fracton topological codes, Phys. Rev. Res. 2, 013303 (2020).DOI
- [32]E. T. Campbell, A theory of single-shot error correction for adversarial noise, Quantum Science and Technology 4, 025006 (2019).
- [33]N. Delfosse, Decoding color codes by projection onto surface codes, Physical Review A 89, 10.1103/phys-reva.89.012317 (2014).DOI
- [34]B. J. Brown, Conservation laws and quantum error correction: Toward a generalized matching decoder, IEEE BITS the Information Theory Magazine 2, 5–19 (2022).DOI
- [35]K. Sahay and B. J. Brown, Decoder for the triangular color code by matching on a möbius strip, PRX Quantum 3, 10.1103/prxquantum.3.010310 (2022).DOI
- [36]A. Kubica and N. Delfosse, Efficient color code decoders in d ≥ 2 dimensions from toric code decoders, Quantum 7, 929 (2023).
- [37]N. Raveendran and B. Vasić, Trapping sets of quantum ldpc codes, Quantum 5, 562 (2021).DOI
- [38]A. Kubica, B. Yoshida, and F. Pastawski, Unfolding the color code, New Journal of Physics 17, 083026 (2015).DOI
- [39]Y. Wang, Z. Ni, M. He, J. Liu, and Y. Gu, Decoupling 2d translational-invariant topological css codes (2026), arXiv:2608.09915 [quant-ph]. Z. Liang, B. Yang, J. T. Josue, and Y.-A. Chen, Operator algebra and algorithmic construction of boundaries and defects in (2+1)d topological pauli stabilizer codes (2026), arXiv:2410.11942 [quant-ph].
- [41]S. Bravyi and M. B. Hastings, Homological product codes (2013), arXiv:1311.0885 [quant-ph].arxiv.org/abs/1311.0885
- [42]D. Eisenbud, Localization, in Commutative Algebra: with a View Toward Algebraic Geometry (Springer New York, New York, NY, 1995) pp. 57–86.
- [43]J. N. Eberhardt, F. R. F. Pereira, and V. Steffan, Pruning qldpc codes: Towards bivariate bicycle codes with open boundary conditions (2024), arXiv:2412.04181 [quant-ph].arxiv.org/abs/2412.04181
- [44]E. Lucas, Théorie des fonctions numériques simplement périodiques, American Journal of Mathematics 1, 184 (1878).
- [45]M. Ye and N. Delfosse, Quantum error correction for long chains of trapped ions, Quantum 9, 1920 (2025).DOI
- [46]F. Glaudo, N. Kravitz, and C. Lowen, Simultaneous generating sets for flags (2025), arXiv:2502.09530 [math.CO].arxiv.org/abs/2502.09530
- [47]J. Cruz-Benito, A. W. Cross, D. Kremer, and I. Faro, Evolutionary discovery of bivariate bicycle codes with ill-posed search (2026), arXiv:2606.02418 [quant-ph].
- [48]A. Jacob, C. McLauchlan, and D. E. Browne, Single-shot decoding and fault-tolerant gates with trivariate tricycle codes (2026), arXiv:2508.08191 [quant-ph].arxiv.org/abs/2508.08191
- [49]V. Menon, J. P. Bonilla Ataides, R. Mehta, A. Gu, D. B. Tan, and M. D. Lukin, Magic tricycles: Efficient magic-state generation within finite block-length quantum ldpc codes, Physical Review X 16, 10.1103/ghhp-cytl (2026).DOI
- [50]J. Haah, Local stabilizer codes in three dimensions without string logical operators, Physical Review A 83, 10.1103/physreva.83.042330 (2011).


