The boundaries and twist defects of the color code and their applications to topological quantum computation

The color code is both an interesting example of an exactly solved topologically ordered phase of matter and also among the most promising candidate models to realize fault-tolerant quantum computation with minimal resource overhead. The contributions of this work are threefold. First of all, we build upon the abstract theory of boundaries and domain walls of topological phases of matter to comprehensively catalog the objects realizable in color codes. Together with our classification we also provide lattice representations of these objects which include three new types of boundaries as well as a generating set for all 72 color code twist defects. Our work thus provides an explicit toy model that will help to better understand the abstract theory of domain walls. Secondly, we discover a number of interesting new applications of the cataloged objects for quantum information protocols. These include improved methods for performing quantum computations by code deformation, a new four-qubit error-detecting code, as well as families of new quantum error-correcting codes we call stellated color codes, which encode logical qubits at the same distance as the next best color code, but using approximately half the number of physical qubits. To the best of our knowledge, our new topological codes have the highest encoding rate of local stabilizer codes with bounded-weight stabilizers in two dimensions. Finally, we show how the boundaries and twist defects of the color code are represented by multiple copies of other phases. Indeed, in addition to the well studied comparison between the color code and two copies of the surface code, we also compare the color code to two copies of the three-fermion model. In particular, we find that this analogy offers a very clear lens through which we can view the symmetries of the color code which gives rise to its multitude of domain walls.

Topological phases of matter are of significant interest both from a condensed matter perspective [1] as well as for their potential application in fault-tolerant quantum computation [2][3][4][5][6][7][8][9]. Indeed, among the leading architectures that have been proposed for scalable quantum-information processing are topological quantum error-correcting codes. The physics of these phases is enriched further when their low-energy excitations are connected by symmetries, in which case they give rise to non-trivial domain walls and point-like topological defects [10][11][12][13][14][15][16] that have been utilized in a number of instances [12,[17][18][19][20][21][22][23][24][25][26][27] to improve protocols for topological quantum computation and to reduce overhead requirements. Advancing the study of topological defects and their corresponding symmetries gives us new tools to improve architectures for topological quantum computation and, moreover, extends our understanding of the underlying topological phases that support them.
The color code [28] is a particularly interesting model due to both its symmetries and its ability to realize fault-tolerant quantum computational operations. The importance of the use of different boundaries to implement the Clifford gates faulttolerantly using transversal rotations has been recognized since its inception [28]. Further work on the computational power of color codes and their higher-dimensional counterparts have also been studied directly with various boundary configurations in Refs. [29][30][31]33] and in the guise of the unfolded surface code model in Ref. [32,34]. Remarkably, these models are known to saturate bounds on the computational power of local models using local gates [35][36][37][38]. It has also been shown that the boundaries of the color code can be exploited to perform Clifford gates using code deformation [39,40] either by the braiding of punctures [41] or by use of lattice surgery [42] in Refs. [27,43]. Further to this, certain color code twist defects [17,44], and their application to quantum computation [17,27] have also been studied.
At a more fundamental level, a study in Ref. [45] examines the symmetries of the color code model to identify continuous domain walls; the fundamental objects that are used to generate twist defects. Beyond this, the symmetries and twist defects with the color code model have been expressed using a tensor network formalism in Ref. [46]. This is complemented by Ref. [47] where a general study of twist defects and domain walls using the framework of tensor networks is given.
A recent surge in activity [48][49][50][51][52][53]80] has shown that we may be on the verge of experimental demonstrations of the fault-tolerant components that will make up a scalable quantum computer. Moreover, with its aforementioned versatility for performing logical gates, together with its high threshold error rates [55] and its relatively economical resource demands [56], the color code is regarded among the leading candidate architectures for the realization of topological quantum computation. As such, we have recently seen experimental proposals to realize color code models with a number of physical implementations and platforms. In particular Majorana devices [57][58][59][60][61][62] may be suitable as they allow for the measurement of relatively high-weight stabilizers. The color code model evidently has a very rich structure [45,46] that we may be able to exploit further to discover better and more resource efficient protocols to perform quantum-computational operations in a fault-tolerant manner. It is the primary goal of the present manuscript to systematically explore the different objects that can be realized with modifications to the color code lattice through a study of its underlying topological excitations. We discover three new types of boundary, together with lattice realizations of all 72 different twist defects that can be realized with the color code model. We catalog all of these objects and quantify their properties for use with topological quantum computation.
We go on to find a number of new applications of the boundaries and twist defects of the color code for quantum information processing. For example, we argue that the new boundaries we discover, which we refer to as Pauli boundaries, may be of practical benefit when performing topological quantum computation. Specifically, we find that, like with the surface code model [40], we can move punctures with Pauli boundaries in the color code model using single-qubit measurements. In contrast, to the best of our knowledge, we know of no way that we can move punctures with the known color code boundaries without the use of two-qubit Bell-type measurements [41]. We additionally find a new four-qubit error detecting code as a small instance of a new variant of the color code that has Pauli boundaries, one that could well serve as a blueprint for an experimental realization of quantum error correcting protocols, reminiscent of the ones presented in Refs. [33,50].
Beyond these examples, we find that our study of twist defects reveals new local codes with high encoding rates. It is known that two-dimensional commuting projector codes obey the bound kd 2 ≤ cn [63], where k is the number of encoded qubits, d is the code distance, n is the number of physical qubits in the code and c is a constant to maximize. By considering color codes where we place a twist defect in the center of the lattice, we find a code where c converges towards 4 as the rotational symmetry of the code increases. In particular we present two codes with bounded stabilizer weights w, for w ≤ 8 we find a code with c = 4, and for w ≤ 6 a code with c = 8/3 ≈ 2.7. In contrast, the twisted surface code [22] has a value c = 4/3 and the standard color code has a value c = 2 (c = 4/3) when w ≤ 8 (w ≤ 6). The standard surface code has a value c = 1 for a lattice that is appropriately oriented [20,64], or when punctures are arranged in a suitable pattern [65]. With our simple example we see that there may be many other benefits to be gleaned by exploring all of the twists available with the color code. We present our new family of stellated color codes, as well as our new fourqubit error-detecting code, in self-contained sections that can be understood with only prerequisite knowledge of the stabilizer formalism for the reader interested only in the quantum information applications of our work.
Finally, we study how the new objects we introduce to the color code lattice can be represented on multiple copies of other topological phases through unfolding [26,34,46,[66][67][68]. In particular, in addition to representing the new objects we discover on two copies of the surface code, we also explore a lesser known [69] connection between the color code and two copies of the three-fermion model [70]. We find this connection to give a very natural presentation of the underlying structure of the color code model. Developing the connections between the color code model and copies of other, simpler phases may help to discover new and improved schemes for topological quantum computation. Examples of which have been demonstrated, for instance in Refs. [26,71]. Similar mappings have also provided new ways of writing decoding algorithms for the color code [66].
The remainder of the manuscript is structured as follows. In Sec. II we review the general theory of anyon models and in Sec. III we review the stabilizer formalism, the color code and the low-energy excitations of this model. In Sec. IV we examine the theory of boundaries in abelian topological phases and discover new boundaries with the color code. Using these new boundaries we discuss improved methods of deforming color code punctures and a new four-qubit error-detecting code in Sec. V. In Sec. VI we present the symmetries of the color code model and introduce domain walls to the lattice that map excitations non-trivially while preserving the basic data of the particle model. Then, in Sec. VII we extend the discussion of domain walls by terminating lattice dislocations to introduce the twists of the color code. Through the study of twists we find new two-dimensional codes with high encoding rates, discussed in Sec. VIII. Lastly, in Sec. IX we study the connection between the color code and two copies of the surface code model to show how color code defects are represented in this simpler model. We finally conclude by proposing new directions of research that make use of the toolbox we have elucidated in Sec. X.
We also give supplemental information on the color code in the Appendices. In App. A we discuss the six fermionic excitations of the color code, and in App. B we discuss the connection between the color code and two copies of the threefermion model. In App. C we discuss the dual color-code lattice, and consider systematically introducing certain twists to the model with Pachner moves. Finally, in App. D we present a new family of surface codes, namely, the stellated surface codes, which are related to the new color codes we present.

II. ANYON MODELS
We require notation to describe the anyonic low-energy excitations of the model of interest without explicitly referring to the underlying system. Here we review topological quantum field theory which describes anyonic particles while remaining agnostic of microscopic details. For a more detailed and complete discussion of the theory of anyons see Refs. [4][5][6]15] or the Appendix E of Ref. [10].
The low-energy excitations of a topological phase of matter are described by an anyon model. An anyon model is a set of excitations together with additional data that describes interactions between these excitations. We write a set of labels a, b, c, · · · ∈ C to denote the distinct charges of the system. Included in all anyon models is the vacuum charge, 1 ∈ C. The vacuum is the label that indicates 'no charge'.
Fusion describes the combination of two particles a, b ∈ C. The fusion product of two particles a and b is denoted with the binary operation a × b. The fusion rules of an anyon model are described by the fusion multiplicities N c a,b , such that where c ∈ C. Each anyon a has a unique antiparticle labeled a which can fuse with it to the vacuum charge, N 1 a,a = 1. Anyons have a Hilbert space associated with them known as a fusion space. It is possible for the dimension of the fusion space to increase as anyons are added to the system. The factor with which the fusion space increases for an anyon a is called its quantum dimension, denoted d a ≥ 1, which is determined by the equation where d 1 = 1. Anyon a is abelian if d a = 1 and is nonabelian if d a > 1. An anyon model is abelian if it contains only abelian anyons. In fact, for all abelian anyon models, fusion outcomes are deterministic such that for each a, b there exists a unique label c such that N c a,b = 1, and N d a,b = 0 for all d = c.
Lastly, we address the exchange and braid statistics of anyons. Exchanging two anyons of charge a results in a phase θ a , called the topological spin. Diagrammatically we express this with the equation where the lines indicate the trajectories of particles. Note that θ a = θ a . We call a bosonic if it exchanges trivially with itself, i.e. θ a = +1, and fermionic if θ a = −1.
Braiding two abelian anyons a and b clockwise results in a phase M a,b , called the monodromy. We can similarly express this operation with a diagrammatic equation This equation can be transformed by adding a braid to the two sides of Eq. (4) to obtain an expression which will provide useful to calculate the monodromy of anyons in the considered model. If M a,b = +1, we say a and b braid trivially. Lastly, we can derive the data involving anyons if we know enough about the particles into which we can decompose it. If an anyon c is the only fusion product of a and b, as is the case in abelian anyon models, then its self-exchange statistic is and the monodromy with another anyon d ∈ C is given by

III. THE TWO-DIMENSIONAL COLOR CODE
We next review the two-dimensional color code [28], and summarize how the microscopic description gives rise to its corresponding anyon model. Refs. [29][30][31]56] provide alternative reviews of the model.

A. The stabilizer formalism
A useful tool to describe a large class of quantum errorcorrecting codes and many-body quantum states is the stabilizer formalism [72]. Stabilizer codes are specified by their stabilizer group, S. This is an abelian subgroup of the Pauli group acting on n qubits. We denote the generators of the Pauli group X j and Z j , where indices 1 ≤ j ≤ n denote individual spin-half particles, or qubits, of the system.
The stabilizer group defines a code subspace spanned by basis vectors |ψ . The code subspace, or code-space for short, is the common +1 eigenspace of all the stabilizers of the stabilizer group. Specifically, we have for all s ∈ S. The additional requirement that −1 ∈ S guarantees that the stabilized subspace is non-empty. The dimension of the code-space is 2 k , where k = n − m, is the difference between the number of physical qubits n and the number of independent generators of the stabilizer group m. When interpreting the stabilized subspace as a logical code-space, k is the number of logical qubits it supports. Pauli operators which commute with the stabilizer group but are not included in it are logical operators. More formally, the set of logical operators is such that L := N (S)\S, where N (S) is the normalizer of S. Operators in L preserve the code-space yet act non-trivially on it. The weight w(P ) of a Pauli operator is the number of qubits upon which P acts non-trivially. It allows defining the code distance, d := min P ∈L w(P ), which is commonly used as a first order approximation to quantify the degree of protection provided by the code-space.

B. The color code lattice and stabilizers
The color code is defined on a trivalent three-colorable lattice, regular examples of which are shown in Fig. 1. Specifically, each vertex of the lattice has exactly three incident edges and each plaquette, indexed p, can be assigned one of three colors, red, r; green, g; or blue, b, such that no two plaquettes of the same color touch.
With the lattice defined we consider a system where a qubit is placed on each vertex of the lattice. The stabilizer group of the color code is then generated by operators associated to the plaquettes of the lattice. Specifically we have two stabilizer generators, for each plaquette p, where the product is taken over all the qubits that lie on the boundary of p.
We show examples of stabilizers on the lattice in Fig. 1.

C. Color code anyons
We have claimed that the color code model gives rise to anyonic quasiparticle excitations. However, we have thus far only introduced the color code as a code-space of some larger physical Hilbert space using the stabilizer formalism. In fact, we have also implicitly defined a Hamiltonian system whose low-energy excitations are anyons [2,28]. The code-space of the model is also the ground state subspace of the exactly solvable Hamiltonian H, whose interaction terms are stabilizer generators, which for the color code is Applying Pauli matrices, P , to states in the code-space yields excited eigenstates of H. Plaquettes where at least one stabilizer generator is violated by, i.e., anti-commutes with, P are then interpreted as quasi-particle excitations, namely, anyons. The type of anyonic quasi-particle is determined by which stabilizer(s) are violated on a given plaquette, and the color of the plaquette as we will describe in more detail below. For a detailed discussion on color code excitations, see Ref. [28] and for an in depth discussion on the connection between the stabilizer code and commuting Pauli Hamiltonians see Ref. [8].
Given the connection between the Hamiltonian presented in Eq. (10), we will continue the discussion in terms of stabilizer states as we defined them previously. We can characterize the sixteen anyonic charges of the color code by the operators that create them. The operators that create excitations are Pauli operators with string-like support. Importantly, string operators commute with all the plaquette operators except for those at their endpoints. As such, anyonic excitations are created at the endpoints of string operators where plaquette operators are violated.
To study the sixteen color code anyons, we first focus on a subset of nine charges. This subset is an over-complete generating set, in that it can generate any charge from the color code anyon model through fusion. Even though four generators would also suffice, we find this generating set particularly convenient to characterize the the model. The nine charges in this set can be denoted by two labels which are a Pauli label, P = x, y, z, and a color label, C = r, g, b. Given that such excitation is specified by one of three colors and one of three Pauli labels we arrive at nine anyons which are labeled as CP . Shortly, it will become convenient to arrange the generating charges in a 3×3 grid as in Tab. I where color labels are arranged in columns, and Pauli labels in rows.
rx gx bx ry gy by rz gz bz TABLE I. The nine generating anyons in the color code can be labeled using a color label and a Pauli label. The three colors, r, g, and b are give in the columns, the Pauli labels x, y, and z are associated with rows. This arrangement of anyons will prove useful in what follows, as it succinctly conveys braid statistics and fusion rules of the color code anyon model.
The excitations we create on the lattice are determined by the string-operator used to create the excitation. The color label is determined by the color of the violated stabilizer at the endpoint of a string and the Pauli label corresponds to the Pauli operator which was applied to create the excitation. For instance, in Fig. 2 (a) we show a string operator that creates two gx excitations at its endpoints. This is because the string is composed of Pauli-X operators, and the operator shown in the figure violates the two green s Z p plaquettes at its endpoints. One can readily check that the other stabilizers on the lattice commute with this operator.

D. Fusion
We now offer a brief intuition on how the fusion rules arise from the Hamiltonian of the color code, Eq. (10). A more detailed discussion is given in Ref. [28]. Following the example shown in Fig. 2 (a) we have already seen that two anyons of the same type are created at the endpoints of the string. In fact, we can extend the string by applying Pauli-X rotations on the pairs of qubits on the green edges adjacent to the plaquettes that support the excitations. Green edges are those that connect two green plaquettes.
In general, it holds that pairs of excitations of a given color are created by applying strings of the appropriate Pauli rotations to edges of its corresponding color [28]. Given that we can separate pairs of excitations of the same type CP by extending a string of Pauli operators P type via edges of color FIG. 2. The fusion rules for color code anyons. (a) Each color code anyon is its own antiparticle. Here, as an example, an operator is shown which annihilates (or creates) a pair of gx anyons. Corresponding operators can be found for pairs of all color code anyons. (b) Three anyons sharing the Pauli label but each with a different color label annihilate. This can also be read as a fusion (or decay) process: From bottom to top for example, it corresponds to the fusion of a red and a green anyon to form a blue anyon. Notice, the Pauli label x was chosen arbitrarily; the same holds for y or z. (c) Three anyons sharing the same color label but each with one of the three Pauli labels can also be annihilated. Again, and alternative reading is the fusion of an x anyon and a y anyon to form a z anyon. The red color label can be replaced by either green or blue.
C, we arrive at the fusion rule Physically, this fusion rule represents Z 2 charge conservation as it shows that anyons of a given type must be created in pairs. This rule can also be interpreted to say that color code anyons are their own anti-particles. We can similarly study string operators acting on the color code lattice to determine fusion rules between anyons with different color and Pauli labels. In Fig. 2 (b) a Pauli-X operator is applied to a single site. This operator violates stabilizers on its three adjacent plaquettes, each of which has a different color due to the three-colorability of the lattice. The excitations created by this operator can be separated arbitrarily far from the other excitations with the application of another appropriately chosen string. We thus arrive at the fusion rule for any Pauli label P and pairwise distinct color labels C 1 , C 2 , C 3 . We thus observe a conservation law between the color labels of the color code excitations: Two charges of a common Pauli-type and distinct colors fuse to give the charge of the same Pauli type and the third color. Finally, we can also observe a fusion rule between different Pauli labels. In Fig. 2 (c) we show a string operator composed of Pauli-X, Pauli-Y and Pauli-Z operators with three red endpoints where stabilizers are violated. At two of the endpoints we have a single violated s x p (s z p ) stabilizer which indicates an rz (rx) excitation. At the third endpoint both stabilizer generators are violated, indicating an ry excitation at this location. Generalizing, we obtain the fusion rule that connects Pauli-labels of the excitations for arbitrary color C and pairwise distinct Pauli labels P 1 , P 2 , P 3 . The reader may recognize a duality between the color label and the Pauli label in Eq. (12) and Eq. (13). Indeed, this duality is a key feature of the color code anyon model as will become clear throughout the manuscript.
With the fusion rules we have developed so far we begin to see the utility of Tab. I. Indeed, the table echos Eq. (12) as the fusion product of two distinct excitations from the same row give the third excitation of the given row. Similarly, the fusion product of two excitations of different Pauli label from a common column fuse to give the third excitation from the given column. This reflects the fusion rule shown in Eq. (13). More trivially, we have that the fusion product of two excitations from the same element of the table fuse to give the vacuum excitation as in Eq. (11).
With the rows and columns of Tab. I now separately understood, it remains to consider the fusion product of pairs of charges that share neither a row nor a column. As we will show in the following subsection, the nine excitations in Tab. I are in fact bosonic excitations. Aside from the vacuum particle, the excitations of the color code that are not shown in Tab. I are fermionic excitations. All of the remaining excitations can be expressed as the fusion product of two of elements. In fact, the color code gives rise to six distinct fermions. For more details on the fermionic excitations of the color code we refer the reader to App. A. Moreover, in App. B we show that we can describe the excitations of the color code using two non-interacting copies of a model of three fermions.

E. Self-exchange and braiding
We referred to color code anyons as either bosonic or fermionic. To justify these names we now derive their selfexchange statistics. Consider Fig. 3, where we compare two sets of string operators which move rz anyons along closed loops. On the left, two separate loops are shown. This is the left-hand side of Eq. (6), only that the bottom-left(right) and top-left(right) ends of the trajectories are here connected. On the right-hand side of Fig. 3, a single closed loop of an rz operator which crosses itself in the middle is depicted. This is the right-hand side of Eq. (6), again with the bottom-left(right) end of the trajectories connected to the top left(right). Hence, the difference between the left and right half of the figure corresponds to the self-exchange statistic of rz. But clearly, the effect of the shown operators is exactly the same and hence θ rz = +1, rz is a boson. This is true for all nine non-trivial bosons, as can be seen by changing the Pauli basis in which the considered operators act, or by moving the string operators such that they move anyons of different colors. The self-exchange of the color code fermions can be derived using Eq. (6) and Eq. (14) given below together with any decomposition of fermions into two bosons shown in Eq. (A1) and Tab. VIII in App. A.
Finally, we look at the phase obtained by braiding pairs of color code excitations. Braiding a bosonic anyon a with color label C a and Pauli label P a with a second boson b with labels FIG. 3. Bosons in the color code have trivial spin θa = +1. As an example compare string operators which move an rz anyon along a closed loop. On the left, two circular paths looping back to their initial positions are shown. Each of these operators is the product of the z type stabilizers on the blue and green plaquettes they enclose and hence itself again a stabilizer. On the right however, the middle section is changed, such that path crosses itself once in the middle to form a single larger loop. However, this redrawing of the path did not change how the operators act, and the left-hand side is exactly equal to the right-hand side. Further more, according to Eq. (3), the difference between these operators gives us the spin of the moved anyon, here θrz = +1. The same holds for all nine anyons shown in Tab. I.
where δ(statement) is an indicator function that returns 1 if statement is true and 0 otherwise. Like for the fusion rules, we find Tab. I proves a useful tool to visualize the braid statistics between bosonic excitations. This is to say, anyons a and b which share a row or a column braid trivially, i.e. M a,b = +1. If a and b share neither a row nor a column however, we have that M a,b = −1. To prove the above, we compare the order in which the crossing operators moving anyons a and b are applied. As in Eq. (5), the difference reveals the phase M a,b . As can be seen in Fig. 4, pairs of string operators associated to anyons with the same color label or Pauli label exchange trivially, and thus we find M a,b = +1. When both, the color label and the Pauli label is different however, the operators anticommute and we get M a,b = −1. The braiding rules involving fermions can be derived from the above, using Eq. (7) and any decomposition of fermions into two bosons shown in Eq. (A1) and Tab. VIII in App. A.

IV. BOUNDARIES
Unless we are dealing with a closed 2D manifold, the spatial extent of a topological phase must end at some boundary, such as a gapped domain wall with the trivial phase. It is important to gain a better grasp on the physics at the boundary of a topological phase. Not only is this interesting from a condensed matter perspective [13,14,[73][74][75][76], but can be exploited in quantum computation [23, 39-41, 77, 78]. In this section, after reviewing concepts of the boundaries of abelian topological codes, we introduce lattice realizations of FIG. 4. To obtain the braid statistics of the color code anyons, we study the commutators of string operators. As an illustrative example, an rx anyon is moved from the left to the right out of frame. Then, the line along which said anyon was moved is crossed top to bottom by three other anyons. Comparing the two different orders in which these operators are applied reveals the phase obtained by braiding the anyons, see Eq. (5). In (a) we see that strings moving anyons sharing the color label (red in our example) exchange trivially. Here, not a single qubit is acted upon by both strings. In general the number of qubits supporting two crossing strings of the same color is even. (b) Crossing strings moving anyons with the same Pauli label also exchange trivially, as strings moving them act in the same Pauli basis. (c) shows the third case, neither the Pauli label nor the color label of the two anyons associated with the crossing string operators match. This leads to an odd number of qubits on which the strings act in anti-commuting bases. In our example one qubit is acted on first by an X and then by Z. This leads to a phase of −1 if the anyons are braided.
three new color code boundaries and show that this completes the boundaries available to the model. We finally discuss the prospective applications of these boundaries for quantum computational tasks as well as small scale experimental implementations of quantum error-correcting codes.

A. Lagrangian subgroups
Gapped boundaries are characterized by Lagrangian subgroups. These mathematical objects are subsets of anyons in the anyon model C which can condense at the boundary of interest. Anyon condensation is the process wherein an anyon meets and is absorbed by the boundary. The reverse process is also possible where a single excitation is created or 'emitted' by a boundary. Anyons which do not condense are said to be confined by the boundary. Boundaries that can condense excitations are important for quantum information applications as these are topologically protected degrees of freedom whose state is determined by the charges they have absorbed.
The subset of anyons that can condense at a boundary is constrained to obey certain conditions that we will now briefly review. Indeed, it is shown in Refs. [73,74] that the subsets of excitations in C that are absorbed at gapped boundaries correspond to Lagrangian subgroups M. A Lagrangian subgroup fulfills three conditions: Firstly, as one might expect, a Lagrangian subgroup is a group, and thus closed under fusion. Further, if a particle can condense at a given boundary, so can its antiparticle. Likewise, the vacuum particle can be con- And the emission of an anyon a can be read as the condensation of its antiparticle a. (II.a) Anyons which can condense must have bosonic self-exchange statistics. The shown paths are stabilizers, hence the left and the right situation are equal, which implies trivial self-exchange for condensible anyons. (II.b) Two anyons which can condense must braid trivially. Again, the depicted paths are stabilizers and must hence commute, which implies the trivial braiding of the anyons. (III) An anyon d which can not condense must exchange non-trivially with at least one anyon which can condense. This means the set of condensible anyons is maximal. Sets of anyons which fulfill these conditions are called Lagrangian subgroups of the anyon model. densed at any gapped boundary. Secondly, all of the anyons within the subgroup are bosons and braid trivially with all other anyons in the subgroup. The third condition is that M is maximal in the sense that no additional anyon can be added to the subgroup such that the other conditions are fulfilled. In the following, we revisit the argument given in Sec. IV of Ref. [73].
First, we start by showing that M is closed under fusion, a ∈ M and b ∈ M =⇒ a × b ∈ M. a × b can condense by decaying into a and b, which can then condense separately. These is pictorially shown on the left of Fig. 5

(I).
Before showing that M does actually form a group, we first turn out attention to the other claims.
The second requirement of the boundary can be understood by considering string operators s a . These operators act such that they pull an anyon a ∈ M from the boundary, transport it along a trivial trajectory through the bulk and condense it back at the same boundary such that s a leaves the charge at the boundary unchanged. Given that the string operators follow a trivial trajectory and do not change the net charge of the boundary, these operators do not affect the logical state of the system. Furthermore, given that such operators do not create excitations, we can regard these operators as stabilizers such that s a |ψ = |ψ for all ground state vectors |ψ .
Using such operators, we can argue that all anyons which can condense must be bosons as follows: Consider the four operators shown in Fig. 5 (II.a). Comparing s a , s a tos a ,s a , we see the endpoints have been exchanged. Hence, the left and the right in Fig. 5 (II.a) differ, according to Eq. (3), by a phase θ a given by the spin of charge a. But since these four operators are all stabilizers, they act trivially and hence θ a = +1. This holds for all a ∈ M, and thus all condensible anyons are bosons.
To show the trivial braiding between condensible bosons, consider operators s a and s b , which move different anyons a, b ∈ M. Their trajectories intersect in a single point, as depicted in Fig. 5 (II.b). Note how the order in which they are applied is changed on the right compared to the left. Again, since s a and s b are stabilizers, the left and the right situation are exactly equivalent. And according to Eq. (5), comparing the two cases reveals the phase M a,b obtained when braiding a and b. We conclude that anyons in a Lagrangian subgroup braid trivially with each other such that The third claim about the maximality of these subgroups can be intuitively understood by requiring braiding nondegeneracy. This means every anyonic excitation can be measured by at least one other anyon through braiding, the only exception being charges in M. See the left half of Fig. 5 (III). This braiding non-degeneracy also holds close to a boundary, if for example anyon d is condensed in or confined at the boundary. It can be stated as, In this case, the only anyons which can perform a full braid around d are anyons which are able to condense, a ∈ M. This can be seen on the right half of Fig. 5 (III). Thus, an anyon close to the boundary can either be seen by at least one anyon a ∈ M, or is itself in M. Now, we can address that M indeed forms a group. We already discussed that it is closed under fusion. From the maximality we can conclude that the trivial charge 1 is also in M, as it braids trivially with all anyons. To see that for each charge a ∈ M its antiparticle a ∈ M holds, we can for example use Eq. (6). Choosing b = a and c = 1 = a × a and using θ a = θ a , we find M a,a = 1.

B. The boundaries of the color code
To find all boundaries of the color code, we explore the Lagrangian subgroups of the excitations of the model. Given that Lagrangian subgroups consist only of bosonic excitations, we concentrate only on the bosonic excitations of the color code. We find Tab. I offers a particularly convenient representation of the bosons of the color code model for identifying Lagrangian subgroups. Precisely, subsets consisting of the trivial anyon and three bosons from a row or column constitute the Lagrangian subgroups of the color code.
The fact that these sets of anyons are closed under fusion follows readily from the discussion in Sec. III D. The braiding requirement is met as well, as discussed in Sec. III E. There we argued that bosons in the table braid trivially with each other if and only if they share a row or a column. It is readily checked that the subgroups of the rows and columns of Tab. I are maximal. We consider trying to add additional anyons to the Lagrangian subgroups of a row or column. The addition of a fermion would obviously violate the self-exchange criterion of the subgroup. And trying to add another boson only leaves bosons from a different column or row. But they braid nontrivially with two of the elements of the Lagrangian subgroup.
We conclude that, together with the trivial charge 1, the three rows and three columns of Tab. I correspond exactly to the six possible Lagrangian subgroups of the color code anyon model.
Alternatively, if the anyon model in question can be decomposed into two layers of a simpler anyon model, boundaries can be found that way. Namely, boundaries correspond to folds between the two layers of the simpler model with its domain walls, see Sec. VI and Ref. [74]. The famous equivalence of the color code and two copies of the toric code is explored in Sec. IX. A second equivalence between the color code and two copies of the three-fermion model is discussed in App. B.
We next go on to find lattice representations of these boundaries where the respective label subsets condense.

C. Lattice representations of the color code boundaries
We have identified six Lagrangian subgroups of the color code anyon model. However, to the best of our knowledge, only three of these subgroups have been explored previously.
In what follows we review the boundaries that have already been studied and we find and discuss the new boundaries that correspond to the other three Lagrangian subgroups of the color code model.
The Lagrangian subgroups that have been considered explicitly form the columns of Tab. I. Each of the columns share a common color label, as such, we find that we can obtain boundaries that absorb bosons with a common color label. We call these the red, green and blue color boundaries. These color boundaries were presented in the original work introducing the color code [28]. We show an example of a blue color boundary in Fig. 6 (a). We remark that the stabilizer generators at the boundary of the model respect the same rules presented in Sec. III where each plaquette p supports two stabilizers s x p = j∈∂p X j and s z p = j∈∂p Z j . The figure also shows string operators that create single blue excitations from the boundary.
In addition to the three Lagrangian subgroups that correspond to the columns of Tab. I, we also find three Lagrangian subgroups that correspond to the rows of the table. We can therefore expect the existence of boundaries that absorb all of the bosonic excitations with a common Pauli label, independent of their color label. These boundaries will be referred to as the x, y and z Pauli boundaries. A similar conjecture has been made in Ref. [34] by consideration of the unfolded color code, i.e., two copies of the toric code. We discuss this in more detail in Sec. IX.
In Fig. 6 (b) we show a lattice realization of the z Pauli boundary, which condenses bosons with the Pauli label P = z. At the boundary we show weight-three plaquettes. In principle we could choose any number of stabilizers acting at these plaquettes p, s x p = j∈∂p X j , s y p = j∈∂p Y j or s z p = j∈∂p Z j . But since we require all stabilizers to commute, we see that we can only choose one stabilizer per plaquette. This is because s x p , s y p and s z p mutually anti commute as they each share three qubits. Similarly, two of these bound- ary. (f) shows the stabilizers. As usual, hexagons carry associated Xand Z-type weight-six stabilizer. The color boundaries shown have quadrilateral plaquettes which host weight-four X-type and Z-type stabilizers. The striped triangular plaquettes featured in Pauli boundaries are only stabilized by a single stabilizer. We indicate the basis in which the triangular plaquettes are measured by the direction of the stripes. ary stabilizers on adjacent plaquettes must be of a common Pauli type in order to commute with one another. Adjacent boundary stabilizers have common support only on one single qubit. In the figure we arbitrarily choose s z p stabilizers, and we show examples of differently colored excitations with a z Pauli label that are emitted from the boundary. To the best of our knowledge, the Pauli boundary has not been explicitly represented on the color code lattice before.
The following table summarizes the discussion given above. It explicitly shows that the columns of the table represent the Lagrangian subgroups that give rise to color boundaries and the rows represent the Lagrangian subgroups that give rise to Pauli boundaries.
Finally, we present the interfaces between the different rx gx bx ry gy by rz gz bz Pauli boundaries color boundaries TABLE II. To visualize the color code boundaries, we can return to the arrangement of the bosonic anyons presented in Tab. I. The nine non-trivial bosonic anyons in the color code are arranged such that anyons in the same column or in the same row exchange trivially. Each row and column corresponds to a boundary. Anyons which can be condensed at a common color (Pauli) boundary share their color (Pauli) label. boundary types. General interfaces between boundaries have attracted some interest in the condensed matter community [79]. For quantum information applications, points where boundary type changes are referred to as corners [23].
We show different corners in Fig. 6 (c), (d) and (e). The first interface separates two color boundaries, see Fig. 6 (c). This interface has already been utilized in Ref. [28] to find a two-dimensional color code capable of transversally performing all Clifford operations. See also Refs. [29,30] for a more detailed discussion on similar boundary interfaces. In Fig. 6 (d) we show an interface between two different Pauli boundaries. We show the corner between an x Pauli boundary and a z Pauli boundary which generalizes immediately to all Pauli-Pauli corners. At the top-right corner of the figure we show two boundary plaquettes that are commonly supported on two qubits where two Pauli boundaries can meet such that the boundary stabilizers commute. Such corners can be used to construct codes with Pauli boundaries, as discussed in Sec. V B. Finally, in Fig. 6 (e), we show a corner where a Pauli boundary meets a color boundary. Once again, it is readily checked that the stabilizers represented in the figure commute. This example can also be generalized easily to obtain all nine color/Pauli corners.

V. SMALL COLOR CODES AND FAULT-TOLERANT QUANTUM COMPUTATION
In addition to giving us a better understanding of the fundamental physics that underlies the color code phase, a second benefit of systematically laying out all of the different features of the color code is that it allows us to discover new modes of fault-tolerant quantum computation with the model. In what follows we give two such examples of applications of Pauli boundaries. Specifically, we show that the new boundaries we have introduced give rise to better methods of performing code deformations, and we also find a new example of a fourqubit quantum error correcting code which can be interpreted as the smallest instance of a color code with Pauli boundaries.

A. Code deformation
We first consider code deformations, and argue that braiding punctures with Pauli-boundaries to perform fault-tolerant entangling gates will be advantageous over equivalent operations using punctures with colored boundaries as have been considered previously in the literature [41].
One of the leading paradigms for performing logical gates is through the braiding of punctures in some topological quantum error-correcting code. This, traditionally, put the color code at a disadvantage compared to the toric code. In the toric code, single qubit measurements are sufficient to create and move punctures. In contrast, the creation and movement of punctures featuring the color boundaries of the color code require two qubit Bell measurements [41]. We find that we can move punctures with Pauli boundaries using only single-qubit measurements. This is readily checked because we can mea-sure a patch of individual qubits of the color code lattice using single-qubit Pauli measurements in a common Pauli basis to introduce or increase the size of a puncture. In doing so, we remain in a known eigenstate of the stabilizers at the boundary of the new puncture that has been produced by the measurements. We leave a detailed derivation of this argument as an exercise to the reader. This property of Pauli boundaries is advantageous for practical implementations for color code quantum computation as single-qubit measurements are invariably easier to perform than two-qubit parity measurements and are therefore less likely to introduce noise during deformations. This feature may also play an important role for measurement based fault-tolerant quantum computation [39] using color codes.

B. A four-qubit color code
Our extended toolbox has also enabled us to find a new four-qubit color code which we expect will be of interest for near-term experimental realization with small-scale quantum devices. They complement what has been seen in small-scale trapped ion quantum computers [50,80] and relates to insights into the smallest interesting color code [33].
To describe the features of our new code, we first present the family of triangular color codes with Pauli boundaries. These codes feature an x Pauli boundary, a y Pauli boundary and a z Pauli boundary. The three smallest members from this family of codes are shown in Fig. 7. Bulk plaquettes feature the two regular stabilizers given in Eq. (9), the striped boundary stabilizers host a single weight-three stabilizer each, the basis in which it acts is indicated by the direction of its stripe pattern. These codes encode a single logical qubit each. Examples of their logical operators are shown in Fig. 7 (c). Remarkably, the smallest instance of this code, shown in Fig. 7 (a), is a new example of a 4, 1, 2 code with only weight-three stabilizers.

VI. BULK DOMAIN WALLS
In this section we introduce transparent domain walls, or invertible domain walls [14], to the model. These domain walls change the charge labels of anyons which cross them in a nontrivial way, such that fusion, braiding and self-exchange of the anyons is conserved. Specifically, we discuss closed domain walls here; open domain walls and in particular their terminal points are considered in Sec. VII. As we are interested in applying the theory to the color code, we restrict the discussion to abelian anyon models and refer the readers to Refs. [15,81] for the general case.
We first provide a comprehensive study of transparent domain walls for abelian anyon models in Subsec. VI A. Then we apply this theory in our concrete example of the color code, whose symmetries we study in Subsec. VI B. Lattice representations of domain walls are given in Subsec. VI C.

A. Symmetries in abelian anyon models
Transparent domain walls change the labels of anyons crossing them according to a map. This map is an automorphism, ϕ : C → C which maps the anyon model onto itself. Acting on an anyon a ∈ C it returns again an anyon ϕ(a) = a ∈ C. We require these automorphisms to leave the basic data of the anyon model, i.e its fusion, self-exchange and braid statistics, invariant. See Ref. [15]. Explicitly, this means These conditions can be obtained by requiring that anyons moved along contractible loops crossing the domain wall constitute stabilizers and hence leave the state invariant. Considering a branching loop, like on the left of Fig. 8, we can follow Eq. (15). If an anyon c on the left of a domain wall decays into a and b which are then moved over the domain wall, then on the right a and b must fuse to c . And using that stabilizers commute with each other, we can deduce Eq. (16) from the paths shown in the middle of Fig. 8. We observe that any phase θ a picked up by the self-exchange on the left must be canceled by the phase θ * a obtained by the reversed exchange on the right. Lastly, to get Eq. (17) loops on the right of Fig. 8. Again, any phase M a,b picked up by the braid performed on the left must be canceled out by the phase M * a ,b which is obtain by the reverse braid on the right. The automorphisms fulfilling these conditions for an anyon model C are called the symmetries of C. And each transparent domain wall can be described and labeled by one such automorphism ϕ. The set of symmetries of an anyon model forms a group [15]. The group identity is the trivial map, corresponding to the absence of a domain wall, and the group multiplication is the composition of maps. Thus, composition maps also fulfill the conditions and are therefore also symmetries of the anyon model. Physically, composing maps corresponds to multiple domain walls being combined or fused. See Fig. 9 for a schematic of how domain walls change anyons and how the fusion of domain walls corresponds to the composition map.

B. Symmetries in the color code
To classify the transparent domain walls in the color code, it proves once again useful to go back to the 3×3 grid of bosonic color code anyons, shown in Tab. I. As mentioned earlier, fusion of two different anyons in a common row or column results in the third anyon in said row or column. As such we find that the fusion rules are preserved by all transformations on the grid that respect that all elements of a given row or column remain together in any other row or column. Likewise, we know that excitations braid trivially if and only if they share a column or row of the grid. Like fusion then, the mutual braid statistics of this generating set of excitations shown in the table are respected provided all excitations that share a common row or column remain in rows and columns with the same excitations.
The above discussion implies that the symmetries of the generating set of bosonic excitations, and thus the excitations of the color code in general, are obtained by finding all the transformations that respect the rows and columns of the grid. Indeed, these are row permutations, column permutations, and the transposition of the grid. Given there are three rows and three columns, there are six different permutations of the rows, and of the columns, and finally one transpose. We thus arrive at 6·6·2 = 72 symmetries of the color code. This agrees with the exhaustive numerical search given in Ref. [45].
Further insight on the symmetry group can be gained using the following decomposition: (S 3 × S 3 ) Z 2 . One S 3 comes from permutations of the columns, i.e. colors, the second from the rows, i.e. the Pauli labels. Since permuting rows and columns commutes, the corresponding group is given by the direct product, S 3 × S 3 . Finally, the Z 2 matrix transposition exchanging color and Pauli labels acts via the semi direct product ( ). As a compact notation we can use the wreath product ( ) to write the symmetry group as S 3 Z 2 . This decomposition follows directly from interpreting the color code anyon model as two copies of the three-fermion model, see App. B for more details.
To label symmetries which exchange two colors, we use a capital letter of the third, unchanged color. For example, the symmetry which exchanges the green and the blue color label while leaving the red label, we denote as R. Equivalently, G and B respectively leave green and blue color labels invariant while exchanging the other two. Similarly, the exchanges of the Pauli labels we denote as X, Y or Z, for symmetries which leave the x, y or z Pauli label invariant. Finally, we use D for the duality symmetry between color and Pauli labels, corresponding to the transposition of the 3×3 anyon grid, shown in Tab. III. All of the symmetries mentioned so far are of order 2, i.e. applying them twice leads to the trivial symmetry.
Combining two of the above order 2 color symmetries creates one of the two cyclic color permutations. Thus we can label them RB and BR, for example. Conjugation of one color exchange with a second results in the third, e.g. RGR = B. The analogous statement holds for the permutations of Pauli labels; XZ and ZX are the cyclic Pauli label permutations and we can check that XY X = Z. Conjugating a color exchange with D creates a symmetry which solely exchanges Pauli labels, for example DBD = Z, or conversely DZD = B. To generate all 72 symmetries, three are already sufficient. A minimal choice might be, for instance, X, Y and D, two different row permutations and the duality. However, here, we choose B, Y and D, a row exchange, a column exchange and the transposition, as shown in Tab. III. This is to demonstrate all three different types of domain walls in what follows.

C. Lattice representation of domain walls
Now, we give lattice representations of color code domain walls which correspond to the generating symmetries above. In particular, these are the B, Y and D symmetries. They can generate all 72 color code domain walls, as discussed in Sec. VI B. And they also constitute examples for three different classes of twists, one only acting on the color label, one on the Pauli label and duality transformation which exchanges the two. To obtain these closed domain walls, we transform the stabilizers along a closed path. This provides an apparent physicality to the location of the domain walls, which although artificial provides a way to later emphasize their terminal points whose locality is physical. These terminal points are called twist defects and are the focus of Sec. VII. We emphasize that neither of the transformations can be achieved by means of a local unitary with support only where the domain wall will come to lie.
An example of a domain wall changing the color label is shown in Fig. 10. It exchanges solely the red and the green color label of anyons crossing it. It corresponds to the symmetry B, shown in Tab. III. Along the domain wall, each plaquette hosts two stabilizers, an xand a z-type. Notice how in this example a fourth color is used to color the faces. The braking of three-colorability is in fact a general feature of color permuting domain walls. In App. C we show how color permuting domain walls can be introduced by applying a series of Pachner moves on the dual lattice. Using the Pachner move technique also allows us to generate domain walls which permute the three color labels in a cyclic fashion, see Fig. 36 (a) and Fig. 37 (a). The two other color exchanging domain walls, R and G can be drawn equivalently. In Refs. [17,44,82], similar domain walls have been demonstrated for equivalent models.
Next, we turn our attention to domain walls permuting Pauli labels. They can be constructed without changing the under-  lying lattice. Instead, just the basis in which stabilizers act along the domain wall are measured is altered. Such a domain wall is represented by a violet line in Fig. 11. To generate a y-invariant domain wall Y , the two stabilizers for each plaquette lying on top of the domain are changed. The first one acts in the x-basis on qubits on one side of the domain wall, and in the z-basis on qubits on the other side. The second one acts in the z-basis on one side and the x-basis on the other side. This is equivalent to conjugating the basis in which the domain wall stabilizers act with a Hadamard on one side of the domain wall, as discussed in Ref. [45]. These also correspond to locality preserving gates in the topological quantum field theory, which were studied in Ref. [83]. Domain walls which permute the Pauli label of anyons in a cyclic manner can also be constructed in a similar fashion by conjugating them partially by a unitary which cyclically permutes x, y and z.
Lastly, we give a lattice representation of the domain wall which transposes the 3×3 arrangement of anyons. It corresponds to the symmetry D and we refer to it as the domino domain wall, since it features stabilizers that resemble domino bricks, see Fig. 12. Such a domain wall can be constructed by pulling a zigzag line of edges apart which duplicates all of the qubits lying along the line. In the created space we color squares of the lattice which define rectangular stabilizers that each act on six qubits which are supported on two adjacent squares that make a rectangle. Each of these new stabilizers has two colors, one on either side, resembling domino bricks. These colors are determined by the colors of the neighboring plaquettes. To each of these domino-brick shaped cells we assign one weight-six stabilizer, where the colors of the brick determine which operator acts on rectangle. Stabilizers colored green and blue are measured in the x-basis, red and blue in the y-basis, and red and green in the z-basis. This results in the symmetry D which transposes the 3×3 grid. This domain wall it leaves the bosons rx, gy and bz that cross it invariant. See Fig. 12 for a lattice representation of the domain wall and the effect it has on anyons. Changing what pair of colors is associated with which Pauli basis, six different domain walls can be obtained. To the best of our knowledge, this is the first time a lattice representation of this domain wall has appeared in the literature.

VII. TWISTS
In the previous section, we considered continuous transparent domain walls that change the charge labels of an abelian anyon model while preserving the fusion rules and braid statistics between the charges. In what follows we build on our discussion by terminating the domain walls. Again, we restrict our discussion to abelian anyon models. At the terminal points of these domain walls, we realize twist defects or simply twists [11,12,14,15]. These remarkable point-like objects have many properties in common with non-abelian anyons. This is especially intriguing considering that we started with an abelian theory. As such they are of particular interest for applications in quantum information processing.
We begin by introducing twist defects in Subsec. VII A. In Subsec. VII B the fusion of twists is discussed. We then study the twist defects of the color code and discuss how they interact with its anyons in Subsec. VII C, with domain walls in Subsec. VII D and, lastly, with boundaries and corners in Subsec. VII E and Subsec. VII F.

A. Twist defects
We start by labeling the twist defects. To this end, we consider an anyon a that is moved once around a twist before returning to its initial position. The anyon will cross the domain wall ϕ which the twist terminates once under this monodromy, and as such is mapped onto the excitation ϕ(a). We label a twist ϕ if it acts on C with the mapping ϕ under a single clockwise monodromy.
With this definition we observe particle anti-particle like creation of pairs of twists when adding an open domain wall to the bulk of a phase, see Fig. 13. Indeed, we observe a twist ϕ at one terminal point of the domain wall and ϕ at the other.
We now go on to discuss the explicit example of twist defects in the color code. Specifically, we consider a generating set of twist defects, B, Y and D, which are the terminal points of their corresponding domain walls. This generating set will be sufficient to generate all of the twists of the color code using twist composition rules we discuss later in Sec. VII B.
We first look at a lattice realization of the blue-invariant twist B lying at the terminal point of the blue-invariant domain wall, see Fig. 14. On the lattice, the terminal point of the domain wall lies at a plaquette with an odd number of vertices. This means it can no longer support both an x-type and a z-type stabilizer, as they would not commute. Instead, a single basis has to be chosen in which the parity is measured.
FIG. 14. Shown is a lattice representation of the B twist. It features a weight-seven stabilizer which is just measured in one basis, the ybasis for example. If anyonic charges are moved once around it, their color label changes according to the automorphism B.
A Y twist lies at the terminal point of the domain wall that permutes the Pauli-X and Pauli-Z label of the color code bosons. Unlike a B twist we do not need to change the structure of the lattice to introduce a Y twist. However, at the terminal plaquette of the domain wall we can impose only a single stabilizer of Pauli-Y terms, as is depicted in Fig. 15. We finally look at the twist D that terminates the dominobrick domain wall. As shown in Fig. 16, at the terminal point of the domain wall we have one weight-five and two weightseven stabilizers.
While in some cases it is possible to propose twist defect stabilizers via an educated guess, the stabilizers can be rather complex; this is particularly true in the case of D twists. In fact, it is possible to essentially eliminate any guess work and derive the stabilizers for the twist defect by considering a sequence of Pauli operations which by construction preserves the ground space. First, we create a pair of anyons, a andā. Excitation a is then transported around the defect times, following its label change every time it crosses the domain wall ϕ such that ϕ (a) = a. Upon completing this repeated monodromy we can annihilate the two excitations to obtain a new stabilizer operator from the product of the Pauli operators used to realize this process. In order to find low-weight stabilizers, the resulting string operator can be contracted by multiplying it with conventional stabilizers that lie on the lattice. FIG. 16. The domino twist D has three changed stabilizers. One of the Domino brick stabilizers is cut so that it only supports five qubits. Additionally we have two weight-seven stabilizers, overlapping on six oft their qubits.

B. Fusion between twists
The fusion of domain walls can be described by composition maps, see Sec. VI A. Twists correspond to terminal points of domain walls, and hence the fusion of twists is also described by the composition of maps, see Fig. 17. Given that the symmetry of an anyon model forms a group, the fusion of pairs of twists result in other twists. This means places where a domain wall changes type or where multiple domain walls meet are also twists.
FIG. 17. Similar to how the fusion of domain walls corresponds to composing maps, the same holds for twists. In this example, two twists described by the maps ϕ and ϕ are combined to create a twists described by ϕ • ϕ.
For an example, in the color code we can consider the fusion of two color exchanging twists, R and B, to form a cyclic color permuting twist, RB, see Fig. 18. Note that the lattice representation of the RB twist is not presented in the main text, we refer the reader to App. C, in particular to Fig. 36 (a). This fusion can be visualized nicely on the dual lattice using Pachner moves, see Fig. 38 in App. C.
In Fig. 17 we have deformed the domain walls upwards at the point where the twists meet. We thus obtain a twist ϕ • ϕ. Instead we could have chosen to bend the domain walls downwards, such that the twist maps a according to ϕ • ϕ (a). This ambiguity in the label is a general feature of twist fusion. To rectify this, we need to consider conjugacy classes of the symmetry group. The label used to describe a twists does in general depend on an arbitrarily chosen starting point. Consider  19. This figure depicts the fusion of two twists described by the symmetries ϕ and ϕ . On the left, we illustrate how the reference point used to label the fused twist matters. If the reference point is chosen to lie above the twist, as in the top left, we obtain a map ϕ •ϕ. Whereas a reference point below the twist results in the description ϕ • ϕ , as shown in the bottom left. However, one description can be changed to the other by wrapping a domain wall around the twists. This is seen on the right, where the lower description is obtained by enclosing the three twist with a closed ϕ domain wall. Fig. 19, where a twist is labeled by two different maps on the left half of the figure. Shown on the right, we see that the two maps are equivalent up to conjugation. Here, conjugating the twist is equivalent to changing gauge or engulfing the entire twist compound inside a closed domain wall. If we do this in the example of Fig. 19, as shown on the right, we can convince our selves that the two maps are equivalent up to conjugation with ϕ.
In a general example, where multiple domain walls meet, even more than two different but valid descriptions might be found. And in general, without fixing a global gauge and precise conventions, twists are only identified up to conjugacy.
In the color code, twists belong to one of nine equivalence classes. Tab. IV lists the conjugacy classes A to I of all 72 twists. Within an equivalence class twists share many properties, such as their order or their quantum dimension (see Tab. V). Each entry corresponds to a twist obtained by fusion of the twist labeling the row and column. In the second table, every twist is additionally fused with the domino twist D. We find nine conjugacy classes, labeled A to I here.

C. Anyon localization and the quantum dimensions of twists
Similar to how certain anyons can condense at boundaries, twists can also absorb anyons. This process is called localization of an anyon at a twist. We can express the localization of an anyon a at twist ϕ with the fusion rule To determine the anyons that can localize at a twist, we study its automorphism ϕ together with the fusion multiplicities of the anyon model N c a,b . In particular, if there exists some excitation b ∈ C such that then we have that ϕ × a = ϕ. To show why this is true, we study Fig. 20. The figure shows a twist ϕ and an anyon a which decays into a pair of particles ϕ(b) and b. ϕ(b) is then moved counter-clockwise around the twist such that the resulting excitation ϕ • ϕ(b) = b annihilates with b and restores the system to the ground state.
FIG. 20. Shown is a twist described by the map ϕ. We consider an anyon a which can decay into ϕ(b) and b. If the ϕ(b) anyon is now moved counter-clockwise around the twist, it crosses the domain wall described by ϕ. Hence it turns into a b anyon, which can fuse with b to form the trivial particle 1. This process is called localization of anyon a at twist ϕ.
To illustrate anyon localization in the color code, consider the three examples shown in Fig. 21. The B twist can localize all blue bosonic anyons by decaying them into red and green anyons. If one is moved around the twist it changes color and can annihilate with the other anyon. Cyclic color permuting twists can annihilate all sixteen color code anyons. This is because all anyons are composed of the nine bosonic anyons, which in turn can decay into two anyons of different color. If one is moved around the twist one or two times, it can be brought to match color with the other one, so that they annihilate. Lastly, the D twist can condense one of the fermionic particles. Fermions in the color code are composed of two bosonic particles with differing color and Pauli labels, see App. A. The domino twist D as we defined it can localize the fermion f 1 = rx × bz. To see this, we take one of its constituent bosons, say rx, move it around the twist once to transform it into bz which annihilates with the other constituent part of f 1 .  FIG. 21. Left: A B twist, which exchanges the red and the green color labels of anyons is shown. A blue anyon with any Pauli label can localize at the twist. We decay it into a red and a green anyon, which when moved around the twist match color and annihilate. Middle: A cyclic color twist can localize anyons of any color. This is because an anyon can obtain all three color labels if moved around the twist sufficiently many times. Right: The D twist can condense a single fermionic anyon. In this case, the f1 = rx × bz anyon gets localized. The dashed line indicates the different Pauli label of the red anyon.
The process of anyon localization at twists, as described by Eq. (18), is reminiscent of the fusion in non-abelian anyon models. Further, as with non-abelian anyons, we can encode logical qubits in the fusion space of twists. To increase the number of logical qubits, more twists can be added to the system. The quantum dimension of a twist defect is the factor by which the fusion space dimension grows, as a twist of that type is added. We calculate the quantum dimension of twist ϕ, denoted d ϕ , with a formula that is analogous to that of nonabelian anyons given in Eq. (2) where N ϕ ϕ,a tells us if the anyon a can localize at the twist ϕ. In addition to calculating the quantum dimension of a twist defect directly from its fusion rules, we also point out work where, like with non-abelian anyons [84,85], the quantum dimension of twist defects can be evaluated by studying the entanglement entropy of the ground state of topological phases that include twist defects [86][87][88].
Since all anyons in the color code are abelian, their dimension is 1 and hence the quantum dimension of a twist is just the square root of the number of anyons it can localize. As mentioned above, the B twist for example can, apart from the trivial charge, localize all three blue bosonic anyons. Thus, its quantum dimension is d B = 2. Cyclic color twists can localize all sixteen anyons and have quantum dimension d BR = 4. The domino twist D can localize only a single fermion and the vacuum and has dimension d D = √ 2. The quantum dimension of all 72 color code twists is given in Tab. V.
Anyons which do not localize at a twist might get identified with other non-trivial anyons. Say anyon a localizes at twist ϕ and hence a×ϕ = ϕ, and an anyon c can decay to a and b, i.e. c = b × a. Then, we cannot distinguish the two twist-anyon compounds, c×ϕ = b×a×ϕ = b×ϕ. Microscopically, twistanyon compounds are anyons located close to the twist defect. Mathematically, the twist-anyon compounds form a Gcrossed braided tensor category, for more details see Ref. [15].  In this manuscript we are solely concerned with the groundstate space, or code-space when viewed as a quantum code. This means we will focus on twists which are locally equivalent to the twist with the trivial particle 1 localized.

D. Interplay between twists and domain walls
We now study crossing domain walls and the twists which terminate them. This is relevant when twists are moved over domain walls using, for instance, code deformations [12,17,21,44,89]. To figure out how the twist changes after crossing a domain wall we consider closed contractible loops engulfing the crossing point of the domain walls. If an anyon was moved along such a contractible path until it reaches its original position, it should return to its initial charge label. Con- FIG. 22. Consider a twist described by ϕ, here drawn at the bottom, terminating a solid domain wall. It crosses a dotted domain wall ϕ . This transforms the twist to ϕ . An anyon a starting in the top-left quadrant and traveling counter-clockwise around the crossing point gets finally mapped to ϕ • ϕ • ϕ • ϕ (a). Since its path is contractible, the final label has to be equal to its original label a. Following this equivalence for a generating set of anyons identifies the twist ϕ = ϕ • ϕ • ϕ as the conjugation of ϕ with ϕ . sider a twist which acts as the map ϕ on the anyon labels, as depicted in Fig. 22. After it crosses a domain wall ϕ it transforms into a twist acting as ϕ = ϕ • ϕ • ϕ . An anyon a which moves on the aforementioned path then gets mapped by ϕ • ϕ • ϕ • ϕ = 1. Remember, the equality stems from the fact that the loop followed by the anyon is contractible. This means the symmetry describing the transformed twist is obtained by conjugating its original symmetry with the one of the crossed domain wall. Hence, twists crossing domain walls will stay within the same equivalence class, see Sec. VII B.
Again, let us illustrate this with a color code example. Consider a color exchanging twist, say G which crosses the domino domain wall described by the duality symmetry D. Using the procedure described above for a generating set anyons, rx, rz, bx and bz shows that the twist transforms to a Pauli exchanging twist Y , see Fig. 23. This is to show the duality transformation D does affect twists in very much the same way as it does anyons. The Pauli label of twists and the color labels are exchanged. As a second example we consider a color exchanging twist G crossing a color exchanging domain wall R which turns it into a B twist. This follows from the fact that GRG = B. Again, we see that the domain wall has an equivalent action on the twist label as it would on anyon labels, see Fig. 24 for a lattice representation. This example can again be understood naturally using the Pachner move construction for twists and domain walls, see Fig. 41 in App. C.

E. Confinement of twists at boundaries
In this subsection, we explore how twists and domain walls interact with boundaries. In particular, a domain wall covering a boundary can change the boundary type. This implies that a twist defect confined at the boundary corresponds to a corner. A corner is the point where two different boundaries meet, as described in Sec. IV. If the boundary type is not changed by the automorphism applied by the domain wall then the corresponding twist can condense at said boundary.
Let us begin by investigating how boundaries change when domain walls are present. Consider a domain wall described by the automorphism ϕ close to a boundary which is characterized by its Lagrangian subgroup M, see in Fig. 25 (a). If an anyon a is condensible at M, i.e. a ∈ M, then the anyon ϕ(a) can condense at the boundary by first moving over the domain wall. This transforms it to ϕ • ϕ(a) = a ∈ M. Clearly, an anyon ϕ(a) can still condense when the domain wall covers the boundary, as depicted in Fig. 25 (b).
In metries of the anyon model, see Eqs. (15)(16)(17). To illustrate this, the covering domain wall was removed in Fig. 25 (c) and the new boundary M drawn as a dashed line. In this picture the twists correspond to the corners between the different boundaries. In an alternative reading of the above we have that the corners correspond to confined twists. In contrast, if an automorphism ϕ leaves the boundary type unchanged, i.e. ϕ (M) = M, we say the twist ϕ can condense at the boundary M. Twist condensation is discussed in more detail in Sec. VII F. This leads to an ambiguity, corners can not, in general, be uniquely identified with a single twist, as they might fuse with condensible twists. If ϕ(M) = M and ϕ (M) = M, then ϕ • ϕ (M) = M . This means a twist ϕ • ϕ , the fusion outcome of a condensible twist ϕ with a corner twist ϕ is again a valid interpretation of the corner.
Let us now turn to the corners in the color code for concrete examples of the aforementioned ambiguity in the association of corners with twists. Consider the common triangular color code with the three color boundaries, red, green and blue. This code can be constructed in the several ways from a disk with a single red boundary and adding open domain walls to segments of the uniform red boundary. We show two such ways in Fig. 26. We first consider applying a domain wall that implements the G symmetry to cover one red colored boundary segment which transforms it to the blue color boundary. Similarly, the B domain wall creates a green boundary when covering the second part of the red boundary. Hence, the corner that lie between the red-blue(red-green) boundary can be in- FIG. 26. The identification of color code corners with twists is ambiguous. We start with a color code with just a single red boundary, as shown in the first row. Consecutively, we transform one boundary after the other by covering them with domain walls, until the common triangular color code in the bottom center is obtained. This construction shows the non-uniqueness of the interpretation of corners as twists. On the left, we end up with three BR twist, one in each corner, where on the right only one corner is identified with a cyclic twist. terpreted as a G (B) twist. The blue-green corner then is the fusion of the two twists which we call GB = BR. This is depicted on the right in Fig. 26. Alternatively we can use the cyclic domain walls RB and BR to transform a segment of the red boundary onto a blue or green boundary, respectively. Hence, as shown on the left in Fig. 26, we can label each of the three corners as a cyclic color permuting twist BR. The two approaches to realize the color code with three differently colored boundaries differ by an R twist fused with the two corner twists that lie at the red boundary. However, given the red boundary is invariant if we cover it with a red domain wall, we see that the physics of the two models we have produced is invariant under the fusion of the G and B twist of Fig. 26 with red twists. We thus see that the two pictures we have produced are consistent.
Corners between Pauli boundaries can be identified equivalently with Pauli permuting twists. Corners between Pauli and color boundaries host twists shown in the second half of Tab. IV, who involve the D twist when generated from the standard set of symmetries. This is shown in more detail in Fig. 28, only that there, the corners are detached and pulled into the bulk as twists. This process is discussed in Sec. VII F.

F. Detaching corners and twist condensation
Not only can we identify corners with certain twists, we can also detach corner twists and move them into the bulk. Consider Fig. 27 (a), where we interpret the M boundary as a domain wall ϕ covering the M boundary, and the corners as twists. These twists can be moved, for example through code deformation, such that they come to lie in the bulk, see Fig. 27 (b). This leads to Fig. 27 (c), the twist is detached from the corner and pulled into the bulk.  27. (a) Shows the same situation as depicted in Fig. 25 (b), where the M boundary is seen as a domain wall covering the M boundary, and the corners as twists. In (b), the domain wall is extended such that the ϕ twist now lies in the bulk. This corresponds to (c), where the domain wall covering the boundary is omitted to illustrate that it constitutes a different boundary. Now, the situation looks like a single twist whose domain wall terminates between the M and M boundaries. This can be read as a detached corner which is pulled into the bulk as a ϕ twist. (d) shows the case where M = ϕ (M), the trivial corner. Twists which map the Lagrangian subgroup of a boundary back to itself are able to condense at and being emitted from said boundary.
Notice how this framework also encapsulates the trivial corner, i.e. the case M = M . This means a twist ϕ which maps the Lagrangian subgroup describing a boundary back onto itself, i.e. ϕ (M) = M, can condense at or be emitted from said boundary, see Fig. 27 (d).
To illustrate the above with practical examples, let us turn our focus again to the color code model. Starting with twists condensation, we can observe that all Pauli twists can condense at color boundaries, since they map the Lagrangian subgroups of color boundaries back onto themselves. Additionally, color exchanging twists which leave one color invariant can condense at and be emitted from the boundary of said color. As an example, consider Fig. 28 (a), where an R twist is emitted from a red boundary. Pauli boundaries can emit Pauli exchanging twists which leave the relevant label invariant, as well as all purely color permuting twists and twists which are the fusion product of these examples. See Fig. 28 (b) for an example of an X twist emitted from an x Pauli boundary. Let us now consider the different color code corners, discussed in Sec. IV C and depicted in Fig. 6. Corners between two color boundaries can be interpreted as the twist which exchanges them. For instance, a corner between a blue and a red color boundary can be detached and pulled into the bulk as a G twist, see Fig. 28 (c). Alternatively, the cyclic color twist RB can be pulled into the bulk as a detached blue-red corner, see Fig. 28 (d). The same holds for Pauli/Pauli corners, consider Fig. 28 (e) showing a Y twist as a detached x-z corner. The last type of corner where color and Pauli boundaries meet, corresponds to D type twists. Fig. 28 (f) shows a detached color/Pauli corner as a D twist in the bulk.
Twist condensation and detaching corner twists can be used in fault-tolerant quantum computation. Topological degrees of freedom associated to twist defects, in which twist encoded logical qubits can be stored, become local degrees of freedom when the twist is condensed at a boundary. Measuring these local degrees of freedom then corresponds to measurements on logical qubits. In the reverse process, where twists are emitted from corners or boundaries, the logical degrees of freedom increase. This is similar to considering non-abelian anyons and a boundary where such anyon excitations condense. This is similar to how merging and splitting codes using lattice surgery changes the number of logical qubits [42]. This is no coincidence, as discussed in Ref. [23], identifying corners with twists unifies encoding schemes relying on boundaries with twist encoding schemes. This offers a new understanding of lattice surgery used in recent proposals for efficient fault-tolerant quantum computation schemes [90? ]. Lastly, identifying corners as twists can help in the search for hardware efficient quantum error-correcting codes. For instance, the code presented in Ref. [22] may be understood as a surface code where one corner twist is detached and pulled into the center of the lattice. This lowers the overhead of physical qubits needed to encode logical qubits at a given code distance. Even more efficient codes based the same insight are presented in App. D and in the following Sec. VIII, where G twists in the center of the code can be interpreted as detached corners.

VIII. STELLATED COLOR CODES
We next present a new family of two-dimensional stabilizer codes that make use of the twist defects of the color code phase. The proposed codes reduce the number of physical qubits required per code qubit while preserving desirable properties such as code distance and geometric locality of stabilizer generators in a 2D euclidean lattice.
For topological stabilizer codes on flat manifolds, the number of logical qubits k one can encode using n physical qubits with code distance d is upper bounded by the holographic bound [63] for codes defined by geometrically local commuting constraints embedded in 2D Euclidean space Here, c is a constant which depends only on the locality of the constraints defining the error-correcting code. One can compare these c-values of different codes, where a higher c roughly corresponds to a more efficient encoding scheme. For the surface code with three-body boundary terms, as proposed by Kitaev [2], one obtains c = 1 2 . This value can be doubled to c = 1 by rotating the code and using two-body boundary terms, resulting in the rotated surface code [20,64,91]. The same c-value can be achieved by appropriately arranging punctures [65]. In surface codes, a further increase of the c value is possible using twist defects. The triangular surface code [22] and certain configurations of twists and holes in hybrid encoding schemes [23] achieve c = 4 3 . The same value, c = 4 3 , is found for the triangular 6.6.6 color code. Using a 4.8.8 lattice, the triangular color code with color boundaries reaches c = 2 [56]. As far as we are aware of, this is the highest c-value of any known flat two-dimensional topological error correction code with bounded stabilizer weight w ≤ 8. Hyperbolic codes [92][93][94] exceed the bound given in Eq. (21), but are expected to come along with significant experimental challenges, as they can not be embedded in two spatial dimensions while maintaining the locality of stabilizers.
Inspired by the triangular surface code [22], we start by presenting an analogous color code model that achieves c = 8 3 . It can be obtained by fattening [95] the vertices of the triangular surface code to quadratic faces. Alternatively, this process can be understood in terms of code concatenation with the 4, 2, 2 -code, as discussed in Ref. [68]. It leads to the left most code shown in Fig. 29. In the figure, a single qubit lies on each vertex of the lattice and each plaquette p supports two stabilizers, s x p = j∈∂p X j and s z p = j∈∂p Z j , where ∂p denotes the set of qubits lying on the vertices adjacent to p. This is the same as the standard color code stabilizers, see Eq. (9). We leave a puncture with a green boundary at the center of the model where no stabilizer is enforced.
The properties of the model we have described are understood naturally from the perspective of non-abelian twist defects. We first point out that the color symmetry is broken when we undergo a full monodromy of the central puncture. As such, we find a single G-twist is condensed in the central puncture, connected to the boundary with a domain wall. Further, there are exactly three corner twists of type G lying at the FIG. 30. Examples of stellated color codes on a 6.6.6 lattice. These are the three smallest codes with s = 5, depicted with code distances d = 3, 5, 7 from left to right. The shown codes each encode two logical qubits. The encoding rate for the 6.6.6 stellated color codes approaches c = 8 3 ≈ 2.7 for large s, which, to the best of our knowledge, is the highest encoding rate of any flat topological quantum code with w ≤ 6.
interfaces where red and blue boundaries meet. The groundstate degeneracy then is equivalent to the fusion space of four G-twists that are constrained to fuse to the vacuum. The central puncture encodes a qubit, which we treat as a gauge qubit.
The described code is a representative of a whole code family we call stellated color codes. Codes in this family are parameterized by s, the order of rotational symmetry of the code. The representatives with s = 3, 5 and 7 of the stellated 4.8.8 color code family are shown in Fig. 29. Again, each code supports s + 1 color permuting twists for odd s. Note that in principle s can be chosen to be even, in which case the trivial twist, i.e. no twist, is featured in the center. The case where s = 4, for example, is a rectangular 4.8.8 color code featuring alternating red and blue boundaries. For odd s, a stellated code encodes k = s−1 logical qubits and reaches a c-value of c = 4 − 4 s . Stellated codes with even s encode k = s − 2 logical qubits and we find c = 4− 8 s . In both cases, c approaches 4 as s grows. Allowing s to diverge doubles the highest known values of c for flat topological error-correcting codes such that c → 4. The advantage is achieved by locally changing the curvature around the central plaquette which is known to enhance the encoding rate in hyperbolic codes [93,94].
Given that the measurement of high-weight stabilizers can be challenging experimentally we also present the stellated color codes based on the 6.6.6 honeycomb lattice. Their encoding rate is c = 8 3 − 8 3s (c = 8 3 − 16 3s ) for odd (even) s. See Fig. 30 for three s = 5 representatives. These codes are, to the best of our knowledge, the most efficient topological error correction codes with stabilizer weights w ≤ 6 which are embeddable in two spacial dimensions.
Interestingly, the discussed increase of s can also be applied to the twisted surface code model [22]. The encoding rates for these models halve compared to the stellated 4.8.8 color codes. However, the stellated surface codes we present may be of interest as typically surface code based architectures have higher fault-tolerance thresholds than those based on the color code model [9]. To substantiate such a claim, one would likely need to conduct numerical analyses which goes beyond the scope of the present work. We give a brief description of stellated surface codes in App. D. One should also investigate different ways of performing logical operations on qubits encoded in stellated codes. As a first approach one could take the description of these models in terms of their twists and generalize the schemes presented in, for instance, Refs. [8,22,27,43,90], where fault-tolerant approaches to braid and fuse twist defects are considered. We leave the problem of optimizing fault-tolerant protocols for quantum computation with these models to future work.

IX. UNFOLDING BOUNDARIES AND TWISTS
It is well established [34,[66][67][68] that we can locally map the color code onto two copies of the toric code model [2]. This is clear because the excitations of the color code have the same braid statistics and fusion rules of their analogous excitations in the mapped picture, and hence these two models are members of a common quantum phase [96,97]. So too then must two copies of the toric code share the Lagrangian subgroups and excitation symmetries of the color code, and thus give rise to analogous boundaries and twists. In this section we concisely describe these analogous objects. We study the different boundaries of the model, as well as a generating set of twist defects.
We specify the excitations of the system of two copies of the toric code as a ± for a = e, m, ε where the ± symbol indicates which of the two copies the excitation lies on. We can consistently map the color code excitations onto the duallayer toric code model under the following correspondence which succinctly describe a generating set for C under fusion [66]. We can also populate Tab. I as shown in Tab. VI.
We next investigate the boundaries of the color code. The boundaries described by Lagrangian subgroups that correspond to the columns of Tab. VI have been studied in Ref. [34]. In particular, the system boundary where the top copy of the toric code is rough and the bottom copy is smooth corresponds to a red boundary in the color code picture. Likewise, the boundary where the top (bottom) copy of the toric code is smooth (rough) corresponds to a blue boundary. The green boundary corresponds to a fold where e + × e − and m + × m − are absorbed. In Fig. 31 (c) and (d), we show the planar code with two rough boundaries and two smooth Certain color code anyons correspond to combinations of two toric code anyons. The shown correspondence is found if the lattice is contracted on the blue and red lattices to form the − and + layer toric codes respectively, following the unfolding procedure laid out in Ref. [34]. Note that this relabeling may be defined up to an automorphism ϕ of the anyon model. boundaries being folded. In Ref. [34] it was argued that this model is analogous to the standard color code with a red, blue and green boundary [28]. Before describing the Pauli boundaries in this model, it will be helpful to understand the toric code model with rough and smooth boundaries as a model with only smooth boundaries but where twist defects lie at its corners. Indeed, in Ref. [23] it was suggested that we should regard a rough boundary as a smooth boundary with a non-trivial domain wall stretched across its surface. Using this picture we see that twist defects lie at the corners of the planar code. In Fig. 31 (b) we show a configuration of domain walls that gives rise to the conventional planar code with two rough boundaries and two smooth boundaries.
The color code with three different Pauli boundaries can also be understood from a folded system. In contrast, we can regard the color code with three distinct Pauli boundaries FIG. 31. Illustrated is the folding of a toric code to obtain a triangular color code. The top, (b) -(e) row which starts with a toric code with a regular boundary configuration results in a triangular color code with color boundaries. The bottom row (f) -(i) starts with a toric code with a more unconventional domain wall arrangement and ends with a triangular color code with Pauli boundaries. The square (a) represents a patch of toric code with smooth boundaries. In (b) and (f) we introduce twists at the corners, connected by domain walls which change the boundary type from smooth to rough, see (c) and (g). Now, the code is folded in half on top of itself to get (d) and (h). Depending on the domain wall configuration, we get a code equivalent to a triangular color code with color boundaries (e) or Pauli boundaries (i). as the folded code model with a domain wall configuration shown in Fig. 31 (f). With this domain wall configuration we obtain through folding boundaries where both the top and bottom layers are both rough or both smooth, see Fig. 31 (h). These boundaries correspond to x and z Pauli boundaries, respectively. Finally, the y Pauli boundary correspond to a fold with a non-trivial domain wall stretched across it. With this we complete the boundaries of the unfolded color code, as we have now explicitly realized boundaries that condense the Lagrangian subgroups of the rows of Tab. VI.
We finally look at the domain walls and twist defects of the unfolded color code. Again, we consider a generating set of three domain walls. As discussed in Sec. VI it is sufficient to find a domain wall that transposes Tab. VI together with two more domain walls that permute the rows of the table.
The domain wall that exchanges the excitations according to a transposition of Tab. VI is the mapping e − ↔ m − . Physically, this domain wall is the well studied domain wall of the toric code [12,14] on the bottom layer of the two-copy system. We show this domain wall together with its termination twist defect in Fig. 32.
Next, we discuss the domain wall corresponding to the G symmetry. In the unfolded color code it corresponds to a layer swap. This means toric code anyons moved over this domain wall get mapped according to a ± ↔ a ∓ , where a = e, m, ε. See Fig. 33 for a lattice representation of the layer swapping domain wall and its terminating twist.
The B domain wall in the picture of two toric codes maps as follows, e − ↔ e − e + and m + ↔ m − m + . This means certain anyons get copied over to the other layer when passing the domain wall. On the lattice, it can be realized as shown in Fig. 34. It is finally worth remarking that the two domain walls analogous to the G and B maps that we have just presented can be realized in the two-copy system by, respectively, applying the swap gate and CNOT gate transversally between the two copies of the model on a region of the lattice. We thus realize a closed domain wall at the boundary of this region in the fashion of Ref. [45]. Finally, we discuss an equivalence between the color code model and two copies of the three-fermion model [69]. This connection is explored in App. B. The mapped system gives particularly natural way to view the symmetries, and thus the twist defects of the color code model.

X. CONCLUSIONS AND FUTURE WORK
In this work, we have identified all of the boundaries, domain walls, and twist defects of the color code model, giving rise to a complete and comprehensive classification. On one hand, this endeavor has been motivated from the mindset of condensed matter physics. Specifically, using an exactly solvable toy model, we have been able to introduce a concrete example to give more substance to the abstract mathematical theory of phases. Not only this, but we have also described the model of focus in terms of other simpler phases to achieve a better grasp on the physics of the system. It is the hope that our study will encourage readers to explore other explicit phases to help build our understanding of the theory of phases.
In addition to the exploration of fundamental condensedmatter physics, a second and equally important motivation of our work has been to aid the discovery of new applications of topological phases in quantum information science. Indeed, we have applied our analysis to the development of topological quantum codes. Topological quantum computing remains the most promising road towards realizing a scalable quantum computer. In order to contribute to the theory of quantum codes, we have introduced a new small code, a family of stellated codes with competitive encoding rates and improved methods of performing code deformations. These new applications clearly exhibit the potential to use our catalog to help find new codes and protocols for processing quantum information. However, the examples we have presented may only be the tip of the iceberg of quantum computational schemes that are yet to be discovered using the framework we have built for the color code model. In particular, the present study invites more research on how to devise fully fault-tolerant schemes for quantum computing within such a framework as well as on implementations.
To extend this research path further, we encourage the reader to experiment with the different topological features we have laid out to find other new schemes for encoding and manipulating topologically protected quantum information. In particular we believe taking a more systematic approach [65,99] to combine the different objects we have described may be a fruitful avenue towards new discoveries. We hope that the present study stimulates such further research.
In the main text, we have discussed the existence of six fermionic anyons in the color code. As mentioned, fermions are the result of fusion of bosonic anyons which do not share either the color nor the Pauli label. For example, we obtain a fermion which we call f 1 by fusing rz and bx, i.e. f 1 = rz×bx. Since we can let rz decay using the rule rz = gz×bz, we can also identify a triple of bosonic anyons with the same fermion, f 1 = gz × bz × bx. And using bz × bx = by, we obtain an alternative way of writing f 1 in terms of two bosons, f 1 = gz × by. In fact, one can also write f 1 in a third way as the combination of two bosonic fermions, namely f 1 = ry × gx. Once again, we can use the 3×3 grid of color code bosons to represent fermions, see Tab. I. Specifically, in Tab. VII we place a spot in each of the cells of the grid that represent the two bosons that constitute the fermion.  We can write all six color code fermions in three ways as the fusion product of two bosons, And again draw them in the 3×3 grid, see Tab. VIII. Here, different symbols where used for the different ways of composing the fermions.
respectively. The symmetries of the color code can be constructed using the 3F symmetries. Each 3F layer has the symmetry group S 3 , this combines to S 3 × S 3 for two layers. Additionally, we can introduce a layer swap symmetry, which acts as f − i ↔ f + i on the anyons. This Z 2 action on the group leads to (S 3 × S 3 ) Z 2 = S 3 Z 2 , which as we know from the main text is the color code symmetry group. Again, this group can be generated by three elements, the layer swap with the generators on one of the 3F layers for example. Through the folding of the three-fermion model, we can interpret the corners between color code boundaries as color code twist defects. This is a practical example of the theory given in Ref. [74]. Introducing a domain wall in the folded 3F model along the crease line changes the boundary type. Let us start with the color code x boundary which corresponds to the trivial fold between the two 3F layers. Adding a domain wall which exchanges the second and third fermion, i.e. f 2 ↔ f 3 , changes the x Pauli boundary to a red color boundary. This corresponds to a D domain wall in the color code, which as discussed in the main text, changes an x Pauli boundary to a red color boundary.

Appendix C: Pachner moves and color code twists
The goal of this appendix is to show a systematic way of deforming the color code lattice to create and move color exchanging twist defects and the domain walls they terminate. We will find that this can be achieved using a series of simple Pachner moves on the dual of the color code lattice. This construction also leads to a graphical understanding of some of the features of color twists we have seen in the main text. In particular, the fusion between color twists, the effect color domain walls have on color twists and condensation of color twists at color boundaries can be visualized nicely in this framework.
Pachner moves [101,102] are a set of transformations that generate the mapping of a triangulation of a manifold onto any other triangulation of the same manifold. As the color code lattice is trivalent, its dual lattice is a triangulation [29,30]. We find that in general, applying Pachner moves to said triangulation often introduces colored twists to the model as they typically break the three-colorability of the lattice.
To create twist defects, we distinguish between three Pachner moves, shown in Fig. 35. Shown in Fig. 35(a) is a 2-2 Pachner move, transforming two triangles joint at one edge into two other triangles by redrawing the diagonal. Fig. 35(bi) is a 1-3 followed by a 2-2 Pachner move, transforming two triangles into four by 'adding a second diagonal'. While this is not typically among the generators of the Pachner moves, we find this move to be useful to discuss the introduction of twists to the dual lattice. Fig. 35(bii) also shows the inverse of FIG. 35. The Pachner moves needed to create and move color twists are shown on the dual lattice (left) and the primal color code lattice (right). (a) is a 2-2 Pachner move. Such a move changes the threecolorability of the lattice as shown on the right. After the move is applied, two plaquettes with the same color touch. (b) is a combination of a 1-3 and a 2-2 Pachner move. On the primal lattice, this move introduces (bi) or removes (bii) a square, depending on its direction. In either case, the three-colorability of the lattice is violated, either because a fourth color is introduced, or because two plaquettes of the same color share an edge.
(bi). The effect of these moves on the dual lattice are shown on the left in Fig. 35, the effect on the color code lattice is shown on the right.
In the dual color code lattice, the triangular faces correspond to physical qubits and the vertices to stabilizers. Thus, the (a) Pachner move changes the number of qubits on which the four involved stabilizers have support by ±1. This will turn the usually even plaquettes into odd plaquettes, which has the effect that x-type and z-type stabilizers no longer commute. To go back to to a commuting Hamiltonian, one of the stabilizers has to be removed. If, however, a series of (a) moves are applied along a line, as shown in Fig. 36 (a) and ttes, where it either adds (bi) or removes (bii) an edge. Additionally, it adds or removes a square stabilizer. Again, these moves can be applied along a line such that vertices along the line change parity twice. This restores the parity of all plaquettes to be even, except for the ones at the terminal points.
The single plaquette at each terminal point changes its support to an odd number of qubits and its stabilizers need to be changed. See Fig. 36 (bi) and Fig. 37 (bi) and (bii). Extending and shortening the line along which the Pachner moves are applied, allows for twists to be moved and fused together. Consider as an example Fig. 38, where three twists are shown, an R twist on the left, a B twist on the right and an RB twist at the top. This configuration can be obtained by fusing an R and a B twist together. Notice how at the point where the three domain walls meet, not a single stabilizer has odd weight. Hence, there is no non-trivial twist located there. FIG. 38. A configuration of a branching domain wall terminated by three twists is shown on the dual lattice. On the left an R twist, on the right a B twist and in the top an RB twist. Alternatively, this picture can be understood as showing the fusion between an R and a B twist to form an RB twist. Fig. 18 depicts the exact same configuration on the primal lattice .   FIG. 39. A G twist (bottom), when moved over an R domain wall (middle) changes into a B twist (top). This process can be understood by starting with an R domain wall and then applying Pachner moves which move the G twist over said R domain wall. Since the lattice along the R domain wall hosts yellow square stabilizers, the series of Pachner moves changes such, that after crossing the R domain wall, it is terminated by a B twist on a blue vertex. Fig. 24 depicts the same configuration of twists in the primal lattice.
The same configuration was shown in the main text in Fig. 18.
The way color twists change when moved over color domain walls can also be visualized using Pachner moves. In Fig. 39, two crossing domain walls are depicted. We can understand the configuration as a pair of G twists located at the bottom, one of which was moved over an R domain wall in the middle which transformed in to a B twist at the top. In doing so, the series of Pachner moves changed from connecting green vertices to connecting blue vertices as soon as the twist was moved over the domain wall. This shows, how a G twist changes to a B twist if moved over an R domain wall. See Fig. 24 for the same configuration in the primal color code lattice.
Next, let study how color domain walls change the color boundaries of the color code. Consider Fig. 40, where we show how a red color boundary turns into a blue color bound- FIG. 40. Adding a color domain wall changes the color boundaries. (a) shows a common red color boundary in the dual lattice. The dashed lines going upwards indicate the deleted red vertex (plaquette in the primal lattice) that was removed to create the red color boundary. In (b), a G domain wall was added to the boundary by applying (bi) Pachner moves. In (c), the in (b) introduces yellow plaquettes has been changed to red. And finally, in (d) the lattice was a bit deformed to make it apparent that the obtained boundary is a blue boundary. We summarize, a G domain wall changes a red to a blue color boundary. ary when a G domain wall is added. The red color boundary corresponds to a single red vertex (plaquette in the primal lattice), whose stabilizer generators were removed from the code Hamiltonian. This is indicated in the figure by the dashed lines extending to a red vertex far outside the top of the figure. Adding a G domain wall at the boundary by applying (bi) Pachner moves, adds new yellow vertices. This transforms the boundary to a blue color boundary, as is made clear in the figure by first recoloring the vertices and then slightly deforming the lattice.
Lastly, let us turn to the condensation of a color twist at a color boundary. Fig. 41 depicts an R domain wall which extends over a red color boundary. As discussed, the red boundary corresponds to a removed red vertex, as indicated by the dashed edges. An R domain wall created by (bi) Pachner moves can be extended such that it terminates at the removed red vertex. This corresponds to the condensation of the terminating R twist at the red boundary. Fig. 28 (a) depicts the same configuration of twists in the primal lattice. We find the connection between color permuting twists and Pachner moves is illuminating as it visualizes the algebraic structure of the color permuting subgroup of the color code symmetry. It also implicitly offers a protocol to braid and condense color twists through code deformation techniques. Additionally, the Pachner move construction likely generalizes to show extensive twists [103] in higher dimensional color codes [29-31, 95, 104], see also the supplemental material of Ref. [105].
Appendix D: Stellated surface codes As mentioned in Sec. VIII where stellated color codes were introduced, there also exist similar codes for the toric code model. We call them stellated surface codes. The triangular surface code introduced in Ref. [22] can be interpreted as the s = 3 member of this code family, where s denotes the rotational symmetry of the code. Stellated surface codes with odd symmetry s host a toric code twist in their center, which is connected to the boundary via a domain wall, shown in purple in Fig. 42. The c value increases with increasing s. We find c = 2− 2 s for odd s and c = 2− 4 s for even s, both approaching 2 for large values of s.
The stellated surface codes with the three smallest odd s are shown in Fig. 42. We use the convention of placing physical qubits at vertices and associating each plaquette with one stabilizer [64]. Light gray plaquettes correspond to a z stabilizer, which checks the parity of qubits adjacent to the plaquette in the z-basis. Similarly, dark gray plaquettes correspond to x stabilizers. Plaquettes along the purple dashed domain wall are colored in both shades, dark and light gray. They also host a single stabilizer each which acts in different bases; qubits which lie on their light gray side are measured in the z-basis, the ones on the dark gray side in the x-basis, and the single qubit where both shades of gray meet is measured in the ybasis.
FIG. 42. The three first stellated surface codes with odd s, shown with a code distance d = 7. Each plaquette hosts one stabilizer which acts in the z-(x-)basis on the qubit if the plaquette is colored light (dark) gray where it meets the qubit. Along the domain wall, indicated by the dashed purple line, stabilizers act in both bases on different qubits. At the center of the code a stabilizer acts in the ybasis on the qubit which it meets with two colors. Left: The s = 3 stellated surface code is the Yoder-Kim triangular surface code [22]. The s = 5 and the s = 7 stellated toric codes are shown in the middle and on the right, respectively.