Anyon condensation and the color code

The manipulation of topologically-ordered phases of matter to encode and process quantum information forms the cornerstone of many approaches to fault-tolerant quantum computing. Here we demonstrate that fault-tolerant logical operations in these approaches can be interpreted as instances of anyon condensation. We present a constructive theory for anyon condensation and, in tandem, illustrate our theory explicitly using the color-code model. We show that different condensation processes are associated with a general class of domain walls, which can exist in both space- and time-like directions. This class includes semi-transparent domain walls that condense certain subsets of anyons. We use our theory to classify topological objects and design novel fault-tolerant logic gates for the color code. As a final example, we also argue that dynamical `Floquet codes' can be viewed as a series of condensation operations. We propose a general construction for realising planar dynamically driven codes based on condensation operations on the color code. We use our construction to introduce a new Calderbank-Shor Steane-type Floquet code that we call the Floquet color code.


Introduction
Topological quantum error-correcting codes [1][2][3][4][5][6] have provided the basis of many promising approaches to realise a fault-tolerant quantum computer. These codes are based on topological phases that robustly store quantum states in non-local degrees of freedom [7,8]. Additionally, there exist a number of distinct ways of performing logical operations on topologically protected quantum states, using unitary dynamics [2,3], measurement-based methods [9][10][11][12][13][14][15], or combinations thereof [16][17][18]. Performing these logical operations, however, is generally very resourceintensive, and so it remains a significant technical challenge to realise these current designs for quantum computing architectures. It is therefore important to develop novel methods of implementing robust operations that are available with topological phases in order to find more practical ways of performing the logical operations we need for universal fault-tolerant quantum computing.
The color code [5] is a topological quantum errorcorrecting code with a rich structure that can be harnessed for topological quantum computing. Its study was first motivated by its multitude of available transversal logic gates. In addition to these local constant-depth unitary logical operations, which are inherently fault-tolerant, the color code can also demonstrate various fault-tolerant measurementbased code deformations [10,[12][13][14][15]. All together, these operations can be combined to give universal low-overhead fault-tolerant quantum computing [12,13,19,20], with resource requirements that are favourable over those of the surface code.
The versatility of the color code for performing fault-tolerant logic gates can be attributed to the underlying symmetries among its quasi-particle excitations when viewed as a topological model [21][22][23]. Furthermore, the color code can be decomposed into copies of more elementary phases [23][24][25][26][27]. All together, these properties mean that the color code offers an excellent test-bed both to design practical ways of performing fault-tolerant quantum computation, as well as to investigate the fundamental phenomena of topological phases that enable robust logical operations.
In this work, we develop a general theory of topological quantum computing in terms of anyon condensation [28][29][30][31][32], with the color code serving as a guiding example. Anyon condensation implements a special type of topological phase transition by identifying a subset of anyons of the phase with the vacuum particle of a condensate. We find that anyon condensation offers a natural way of describing many aspects of quantum computation with topological stabiliser codes. In particular, it offers a concise and unified language for the logical operations available in the color code, as well as other code deformation and code switching schemes. Furthermore, the scheme we present to perform anyon condensation is constructive in microscopic lattice models, i.e., it allows us to construct topological stabiliser codes exemplifying and implementing the various features and operations described abstractly by anyon condensation. In Table 1 and the following paragraphs, we give an overview of the results obtained from implementing anyon condensation in the color code in various ways.
As as first example, we consider condensing the anyons in a disk-shaped region of the color-code lattice. This allows us to recover the punctures with different types of boundaries that have been discovered earlier in the literature [5,23]. The boundaries we produce can be viewed as a non-local degree of freedom, the state of which is determined by the type of anyons it has condensed, i.e., absorbed through local processes. Punctures provide the standard mechanism to encode quantum information in a topological code, and given these properties, we can create and braid different punctures to robustly encode and manipulate quantum information.
In addition to known punctures, the theory of anyon condensation allows us to generalise the types of punctures that can be produced in the color code. Specifically, we discover what we coin a semipuncture, where only a single boson of the color code is condensed within a disk-shaped region. We regard these new objects as semi-punctures in the sense that a pair of semi-punctures, of the appropriate type, can be combined to give known types of punctures. Indeed, a standard puncture is obtained by condensing a larger subset of color code bosons in some region. As we will show, new types of code deformation become available by manipulating these generalised punctures, leading to new approaches to fault-tolerant logic.
We also view bulk condensation operations from a different perspective by examining how a topological phase transforms over time. In general, we observe a domain wall in a (2 + 1)-dimensional spacetime picture as the system undergoes a phase transition between two distinct phases. In the example of the color code, we can condense a maximal subset of bosons, formally known as a Lagrangian subgroup of the anyon model, which transforms the phase onto the vacuum phase. Alternatively we can also condense a smaller subset of bosons, such that we transform the system onto the toric code phase. These operations all have important applications in fault-tolerant quantum computation, for logical state readout or, inversely, state preparation. As we will show, we find that the anyon condensation perspective shows us how to address individual color-code logical qubits for readout operations, by condensing a smaller subsets of bosons to perform logical measurements. We touch on the interplay between spatial and temporal boundaries and how different boundary configurations relate   In the second row, we introduce temporal domain walls using anyon condensation over the entire bulk at an instant in time. This gives us protocols to initialise, manipulate and read out logical qubits in the color code (Sec. 5). In the third row, we condense anyons across a narrow sub-region of the bulk, in order to obtain end-points of domain walls (Sec. 6). Finally, we perform a dynamic condensation, where different anyons are condensed at different time-steps. Using the partial condensation in the color code, we obtain a general construction for dynamically driven codes through this procedure (Sec. 7).
to the fault tolerance of a given protocol. As an example, we show how the theory of anyon condensation can be used to design more general stability experiments [33] to evaluate the error-correction capabilities of the color code as it undergoes fault-tolerant logical operations.
Anyon condensation is also invaluable in the classification of twist defects. Twist defects are obtained by terminating a domain wall that connects a topological phase to itself. In earlier work [21][22][23], 72 twist defects were shown to exist when the color code phase is connected trivially to itself. More generally though, we find that additional domain walls can be obtained by merging a phase to itself via a non-trivial condensate [34,35]. This gives rise to a semi-transparent domain wall where certain charges can pass through the domain, whereas others either condense or confine. We demonstrate the importance of these more general types of domain wall for fault-tolerant quantum computation by investigating how semi-transparent domain walls appear in lattice surgery operations with the color code [20].
As a final example, we rederive and generalise recently proposed constructions of dynamically driven 'Floquet' codes [36] from the perspective of color-code anyon condensation. We argue that the transformations used to read out the stabilisers of dyamically driven codes can be viewed as a sequence of condensation operations, where at each step we condense a different color-code anyon. Our construction enables us to discover more general classes of dynamically driven codes. We propose one such example that we call the Floquet color code; a Calderbank-Shor Steane(CSS)type Floquet code on the honeycomb lattice. We find that since our construction is based on the well studied color code, we obtain a constructive way of designing the boundary stabilisers of dynamically driven codes [37], by appealing to the physics of the parent color-code theory. We, furthermore, present numerical results showing that the Floquet color code has a threshold that is very competitive with other known Floquet codes [38]. We remark that the Floquet color code has independently been discovered in other very recent work [39,40]. Furthermore, we note that a recent experiment has demonstrated an error detection measurement for the Floquet color code [41].
Our work is structured as follows: In a preliminary section, Sec. 2, we define the color code, and we identify its keys properties that enable it to give rise to a number of non-trivial condensation operations. Beyond this preliminary material the structure of the remainder of the work is summarised in Table 1. A general theory for anyon condensation is given in Sec. 3. Specifically, we distinguish between maximal, partial, and trivial condensation. These different types of anyon condensation are distinguished by how color code excitations are transmitted across the domain wall that is produced by the condensation operation. The different types of condensation are represented by the columns of Table 1. In Sec. 4 we investigate domain walls that spatially separate the color code from one of its condensates, either the vacuum phase, the toric code, or the color code itself. This is represented by the first row of Table 1. In Sec. 5, we investigate the different types of condensation over time-like domain walls, as shown in the second row of Table 1. The next row of the table shows how we make non-trivial domain walls between the color code and itself to produce different types of twist defects, where the color code phase is interfaced by a non-trvial condensate. Different topological features are produced depending on the choice of interfacing condensate. The construction for these objects is discussed in Sec. 6. Finally, we discuss our Floquet code construction from the perspective of anyon condensation in Section 7. This picture we present for Floquet codes in terms of condensation operations is represented by the final row of Table 1.

Preliminaries
The color code is a topologically-ordered phase of matter that gives rise to anyonic quasi-particle excitations. We start this section by introducing the theory of Abelian anyon models (Sec. 2.1) before turning our attention to the color code. We introduce the color-code anyons and a microscopic color-code lattice model (Sec. 2.2). We relate the color code to another well-known topological phase, the toric code (Sec. 2.3). In particular, we discuss first how the color code can be unfolded into two decoupled layers of toric codes (Sec. 2.4). Lastly, we introduce a space-time interpretation of topological error correcting codes (Sec. 2.5).

Anyons
Anyons are quasi-particles that exist in two spatial dimensions [2,42]. We denote the set of all anyons of a phase, and the data describing their behaviour, by the anyon model C. We label single anyons as lower case letters a, b, c ∈ C. The trivial anyon, or the vacuum, which is part of every anyon model, is denoted as 1.
Let us now discuss how fusion, exchange and braiding of anyons is described.
Fusion is the process of bringing two anyons close together such that they behave as a third anyon within the same anyon model. We denote fusion by the × operation. Here, we concentrate on Abelian anyon models where fusion outcomes are unique. The fusion rules of Abelian anyon models are of the form a × b = c for a, b, c ∈ C. Fusion with the vacuum anyon is trivial, a × 1 = a. Furthermore, each anyon has an anti-particle with which it fuses to the vacuum. In the topological phases of interest here, namely the color code and toric code, all anyons are their own anti-particles.
Exchanging two identical Abelian anyons results in a complex phase. If we exchange the position of a pair of a anyons, we denote the obtained phase as θ a . This phase is called spin and for qubit stabiliser codes takes values ±1. Anyons for which the self-exchange results in a +1 (−1) phase are called bosons (fermions).
Braiding is the process of moving one anyon around another before returning it to its initial position. Let us say we braid anyon a around a second stationary anyon b, this process results in a phase called monodromy, denoted as M a,b . For the color code and toric code phases, the monodromy can only take values M a,b = ±1, allowing us to use a short-hand formulation calling braiding either trivial (M a,b = +1) or non-trivial (M a,b = −1).
In fact, it is worth pointing out that the self consistency conditions governing Abelian anyon models lead to a number of redundancies in the data. The identity M a,b = θ(a)θ(b)/θ(a × b), for example, lets us determine the self-exchange statistics of any anyon by decomposing it into two different anyons whose spin and relative braid statistics are known.
We can define a microscopic, local Hamiltonian, composed of commuting Pauli interaction terms acting on qubits such that the ground space is the common +1 eigenspace of all the terms that give rise to a topological phase. We say that violated interaction terms occupy quasi-particle excitations. These excitations may behave like anyons. Unitary rotations create and transport anyons, allowing us to study their fusion, self-exchange and braiding explicitly [43]. In the next two sections, we study two specific examples of Hamiltonian models, the color code and the toric code.

The color code
In what follows, we introduce a lattice model realising the color code [5] before turning our attention to anyonic excitation it hosts. We employ the language of stabiliser codes [44] to describe the microscopic lattice models realising topologically ordered phases. Stabiliser codes are defined by an Abelian subgroup of the Pauli group that we call the stabiliser group. Importantly, the common +1 eigenspace of the elements of the stabiliser group specifies the code space of a code. The group therefore does not include −1 as this operator has only negative eigenvalues. We measure stabiliser operators to detect errors.
The color code can be defined on any lattice which is three-colourable with respect to its faces. We use the colours red, green and blue. It is also helpful to assign colors to the edges of the lattice. The colour of an edge is given by the colour of the faces it connects. In this work, we focus on the hexagonal lattice, as shown in Fig. 1.
To specify the color code we assign physical qubits to the vertices of the three-colourable lattice, and stabilisers are associated to the plaquettes of the lattice. We index the plaquettes with the symbol p. Each plaquette hosts two stabiliser generators, one of which acts in the X-basis on all qubits supported on the plaquette, s p X , the other in the Z-basis, denoted s p Z . We will refer to them as X-type or Z-type stabilisers respectively. Note, by multiplying the two stabiliser generators on any plaquette, we obtain a Y -type stabiliser at plaquette p, i.e., s p Y = s p Z s p X . Given the stabilisers of a code, we can introduce a commuting Hamiltonian consisting of the negative sum of a set of stabiliser generators. For topological stabiliser codes, these Hamiltonian terms commute and can be chosen to be geometrically local. In the color code, we usually pick the plaquette terms s p X and s p Z acting in the Pauli-X and Pauli-Z basis on all qubits surrounding a plaquette p, as depicted in Fig. 1. This yields the following Hamiltonian, (1) The ground state space of this Hamiltonian coincides with the code-space of the stabiliser code. Excited eigenstates are reached when some plaquette terms are violated. These states differ from states in the ground state space by Pauli-rotations on single qubits. We associate the violated plaquette terms with anyonic excitations and say they are created by said Pauli rotations.
Let us now discuss color code anyons and their properties. The color code phase contains 16 anyons. Apart from the vacuum excitation, there are 9 nontrivial bosons. Each boson has one of three color labels, r, g, b, as well as one of three Pauli labels, x, y, z. The labels are given by the colour of the violated plaquette and the basis of the Pauli rotation which create and move the anyons. As an example, we say that a red plaquette whose stabiliser(s) are violated by an applied Pauli-X rotation is associated with an anyon labelled rx. See Fig. 1 (a), for example.
Throughout this work, we find it instructive to order the 9 color-code bosons in a 3 × 3-table [23], such that bosons in any given row (column) share their Pauli-(colour-) label. This table is referred to as the color-code boson table rx gx bx ry gy by rz gz bz . (2) Let us review how the data of the color-code anyons are captured by the boson table (2). All color-code anyons are their own anti particles, hence two identical anyons fuse to the trivial anyon. For example we get rx × rx = 1. Bosons which lie in the same row or column, fuse to the third boson in said row or column. Examples of such fusions are bx × by = bz or gy × by = ry. Braiding between two bosons from the same row or column is trivial, e.g., M rx,ry = M gz,bz = +1, whereas bosons from differing rows and columns braid non-trivially, e.g., M gx,rz = −1.
Fusing two bosons which differ in both Pauli-and colour-label, results in one of six fermions f 6 = bx × gy = rx × gz = ry × bz. Writing color-code fermions in terms of their composite bosons lets us infer all of their relevant data. For example, using rules we have defined in the previous section, (Sec. 2.1) we find that fermions labelled with an even number label braid trivially with fermions labelled by an odd number, e.g., M f1,f4 = +1, whereas two distinct even (odd) fermions braid non-trivially, e.g., M f3,f5 = +1.
To store quantum information in the color code, we can either place the code on a topologically non-trivial manifold, or we can introduce boundaries. The prototypical example of an quantum error-correcting code in the color-code phase is the triangular color code, depicted in Fig. 2 (a). We associate a code distance d with the code, given by the weight of its least-weight logical operator. The code depicted in Fig. 2 (a), for example, has a code distance d = 7. Importantly, we have a family of codes that can be parameterised by their code distance that diverges. Assuming we have access to a sensible decoder [24,[45][46][47][48][49][50][51][52][53][54][55], we can correct all error configurations that affect fewer than some number of qubits that diverges in the code distance d. As we shall see in Sec. 4.1, logical operators in the color code appear as strings along non-trivial paths. In codes with boundaries, such paths may connect distinct boundaries or enclose punctures. This means that by increasing the system size, i.e., by separating boundaries further apart or enlarging punctures, we can increase the code distance. This in turn means that we can tolerate more errors. Assuming errors happen sufficiently rarely, we can decrease the probability of a logical error occurring arbitrarily close to zero by increasing the code distance.

The toric code
In this section, we discuss the well known toric code phase; a topologically ordered phase that is closely related to the color code. The toric code, introduced by Kitaev in Ref. [2], is widely regarded as the prototypical example of a topological stabiliser code. Its The lattice model of the toric code. The lefthand side of the figure shows the triangular lattice with additional two-valent vertices, the right-hand side shows an equivalent representation of the same model on a three-colourable hexagonal lattice. To show their equivalence, the lattice on the left overlays the lattice on the right in the middle of the figure. Here, a physical qubit is placed on every vertex of the hexagonal lattice to the right of the figure. Red edges host a two-body XX-stabiliser. As indicated by the coloured letters, red plaquettes are stabilised by an X-type stabiliser. Blue and green plaquettes host a Z-type stabiliser. Note how the XX term on red edges surrounding a blue or a green plaquette multiply to the X-type stabiliser on said plaquette. Since they host both types of stabilisers, we colour the green and blue plaquettes fully. The e and m excitations are created and moved by Z-and X-rotations, as is shown in associated phase is referred to as the toric code phase, or simply the toric code. Here, we will briefly review its anyonic excitations and introduce an example of a microscopic lattice model in the toric code phase.
There are four anyons in the anyon model of the low-energy theory of the toric code. The particle 1 represents the vacuum, or the trivial anyon. Particles e and m are bosonic anyons with θ e = θ m = +1, and f is a fermion with θ f = −1. The anyons fuse as follows, e × e = m × m = f × f = 1 and e × m = f. Any two non-identical, non-trivial anyons braid non-trivially, e.g., M e,m = −1. Fig. 3 shows a construction for the toric code which is particularly helpful for our discussion throughout this work. We start with a hexagonal lattice, place a physical qubit on each vertex and colour the plaquettes as in Fig. 3. Each plaquette hosts a stabiliser generator acting on the surrounding qubits in a Paulibasis defined by the colour of the plaquette. Green and blue plaquettes host weight-6 Z-type stabilis-ers. Red plaquettes and red edges host weight-6 and weight-2 X-type stabilisers, respectively. The same stabilisers are obtained when following Kitaev's original toric code construction [2] on a triangular lattice decorated with additional 2-valent vertices on every edge, as shown in Fig. 3. For this, see also the matching code construction [56] which describes a construction for microscopic stabiliser models in the toric code phase based on Kitaev's honeycomb model [42], including the model described here. The excitations on red plaquettes and edges are e anyons. The blue and green plaquettes host the m anyon.

Unfolding the color code
The color code is equivalent to two decoupled layers of the toric code [24,26,57], meaning that the anyon model from two decoupled layers of toric codes is equivalent to the anyon model of the color code. One way of mapping the color code anyon labels to the labels given by two layers of toric codes is where 1, e, m, f are the toric code anyons and their position in the tuple ab represents on which of the two layers they live. We refer to (9) as the standard unfolding. There are, however, 72 valid ways to perform the unfolding, which can be obtained by applying one of the 72 anyon permuting symmetries of the color code [21,23] to the standard mapping (9). Furthermore, we can identify the six fermions of the color code as follows,

Error correction in (2 + 1)D space-time
In two-dimensional topological stabiliser codes, we detect errors by measuring stabiliser generators to obtain a list of violated stabilisers [1,2]. In reality, however, these stabiliser measurements may be imperfect and give incorrect outcomes. To achieve faulttolerance, we must repeat the measurements multiple times [1,58]. This transforms the space in which the stabiliser violations live into a (2 + 1)-dimensional space-time.
As we have described violated stabilisers can be associated with anyonic quasi-particles. This association carries over to the case where we consider the full space-time picture of the stabiliser readouts. In fact, from a condensed matter perspective, this is very natural, as all two-dimensional topologically ordered phases and processes happening therein are described in as a (2 + 1)-dimensional space-time. In what follows, we make this connection explicit.
We begin by replacing the stabiliser generators associated with plaquettes with detection cells [1,58,59]. For simplicity, we assume that all stabiliser readouts are performed in parallel. Each detection cell is associated with one position in space-time (s, t), given by the location of a stabiliser generator s and a time-step t. A detection cell compares the outcome of the measurement of stabiliser s during the t-th round with the result obtained for s in the (t − 1)-th round, see Fig. 4 (a). Thus, they detect changes in measurement outcomes which might be caused by errors on the physical qubits they support or when a faulty measurement result is obtained. Now, we associate anyonic quasi particles with (single or sets of) violated stabiliser cells. A detection cell (s, t) detects errors occurring on physical qubits in the support of s between time steps t − 1 and t, see Fig. 4 (b). This is exactly analogous to the purely two-dimensional viewpoint, like we show it in Fig. 1, where we interpret errors as creating sets of anyons with neutral total charge. Importantly, a detection cell (s, t) also detect measurement errors affecting s in round t − 1 or in round t. Thus, a single measurement error occurring when measuring s in round t thus violates two detection cells, (s, t − 1) and (s, t), see Fig. 4 (b). Such a process can be though of as a pair-creation in the time direction of an anyon associated with the violation of s. In general, strings are composed of both, measurement errors as well as errors on physical data qubits, and create point-like anyons in space-time. As an example, we shown a world-line of a color code anyon in Fig. 4 (d).
Thus, a two-dimensional topological error correcting code where measurements are repeated over time correspond to a microscopic model realised in (2 + 1)dimensional space-time. This allows us on the one hand to explicitly study topological processes taking place in time using topological stabiliser codes as toy models. And on the other hand, we can draw on the wealth of results obtained in the mathematical study of topologically ordered (2 + 1)-dimensional phases of matter and apply them in real-world error correcting schemes. With this in mind, let us turn our attention to anyon condensation.
At the end of Sec. 2.2, we touched on the fault tolerance of the color code. Let us here make this definition more precise while including errors affecting the measurements of stabiliser terms. As we have seen, errors in the (2 + 1)-dimensional space-time can be interpreted as segments of strings with anyons at their end-points. Crucially, due to measurement errors, these error strings can also travel along the temporal direction.
Logical errors occur when sufficiently many errors appear along non-trivial paths, connecting distinct boundaries. Importantly, these can be spatial boundaries (see Sec. 4.1) as well as temporal boundaries (see Sec. 5.2). This means that we need to include errors affecting measurement outcomes into our definition of the code distance d. The code distance d of a code is the lowest number of errors -including measurement errors -which results in a non-detectable and nontrivial logical error. In this work, we call a protocol fault tolerant, if d grows extensively with the system size. In other words, by increasing the system size in the two spatial and in the temporal direction, we can reach an arbitrarily low logical error rate assuming a suitable decoder and physical error rate below threshold.

Anyon condensation
In this section, we will walk through the theory of anyon condensation in Abelian anyon models [28,60], focusing on the color-code phase as a concrete example. We will work from the perspective of an anyonic theory, leaving realisations on a lattice model together with applications for quantum information protocols for later sections.
After introducing anyon condensation in general mathematical terms (Sec. 3.1), we then distinguish three different cases of anyon condensation, maximal (Sec. 3.2.1), trivial (Sec. 3.2.3) and partial (Sec. 3.2.2) and show the explicit example in the color code anyon theory. Finally, we address how domain walls can be understood in terms of anyon condensation (Sec. 3.3) and how anyon condensation can be realised in microscopic stabiliser models (Sec. 3.4).

Condensation in Abelian anyon models
Anyon condensation is a mechanism to relate certain anyon models to each other. Given a parent anyon theory C, a C-condensate C B is obtained by identifying a subgroup of bosons B ⊂ C with the trivial charge. An anyon in the condensed theory C B is related to a coset of anyons aB ⊂ C.
In particular, we start by choosing a bosonic subgroup, meaning a subgroup of bosons that is closed under fusion and that contains only bosons with trivial mutual braid statistics. Next, we identify this sub- Hence, a pair of anyons a, b ∈ C that differ only by fusion with some elements of B become identified in the condensate. In the remainder if the paper, we use the notation Let us look at the different ways anyons of the parent theory can be affected by condensation. The anyons of the parent theory C fall into two classes.
• Deconfined: Any anyon a that braids trivially with all elements in B, is deconfined The anyon a from the parent theory then defines the anyon aB in the condensed theory.
• Confined: If a ∈ C braids non-trivially with at least one element in B, the topological spin of aB becomes ill-defined and a therefore becomes confined. The object aB is not an anyon in the condensed theory.
Anyons of a condensate C B , defined by condensing a bosonic subgroup B ⊂ C, are in one-to-one correspondence with a subset of cosets {aB | M a,b = 1 ∀ b ∈ B}. The modular data of the condensate is given by the parent theory The constraint on B being a set of bosons, all of which braid trivially with a and b, ensures that the topological numbers of a and b are the same. Furthermore, it is apparent that B must be closed under fusion. Throughout this work, we will make use of symmetries in a given parent theory to relate different condensates. A symmetry of anyon model C is a permutation of the anyon labels that leaves the anyonic data invariant. The group formed by all these permutations is called the automorphism group of the anyon model, Aut(C). In general, a symmetry in the parent maps a bosonic subgroup B to a (potentially different) bosonic subgroup B . The fact that it is a symmetry of the parent indicates that C B is in the same phase as C B . Symmetries that preserve B turn into symmetries in the condensate.

Types of condensation
In this section, we define different types of anyon condensation. We use the color-code anyon model to exemplify different condensation mechanisms.

Maximal condensation
We maximally condense a parent theory if we condense a Lagrangian subgroup L [60,61] of bosons. A Lagrangian subgroup is a maximal bosonic subgroup, i.e., there exist no anyon of C not included in L that braids trivially with all elements in L. When a Lagrangian subgroup is condensed, all non-trivial anyons get confined and the condensate is equivalent to the trivial phase.
The color code has six Lagrangian subgroups, each possessing three non-trivial bosons [23]. They can be associated with either one of the three colour labels, or one of the three Pauli labels The Lagrangian subgroups are expressed using boson tables (2).

Partial condensation
If the bosonic subgroup B is not maximal, we have partial condensation. In this case, some of the anyons confine while some remain deconfined, depending on their braiding properties with the bosons in B.
In the color code, we can chose any one of the nine non-trivial bosons to be condensed. In all cases, the resulting condensed phase is the toric code. We can depict this in the boson table (2). The condensed anyon is marked with a black circle . We now have four deconfined color code charges; those that braid trivially with . Two of the deconfined charged are identified with the toric code's electric charge anyon e and marked with a . The other two deconfined color code anyons get identified with the toric code's magnetic flux m and marked with . The remaining four bosons are confined, we mark this with a . There are in total 18 ways to condense the color code to the toric code. For each of the nine choices of condensed boson we have an additional binary choice of how to identify the deconfined charges with the toric code's e and m anyons . Some examples are shown here.   , , , , The different ways of obtaining the toric code through condensation in the color code can be related to the color-code symmetries [21,23], which we will discuss in the context of trivial condensation.

Trivial condensation
Trivial condensation is where no non-trivial boson is condensed. The resulting phase after trivial condensation is the same as the initial phase. All types of trivial condensation are in one-to-one correspondence with symmetries of the parent theory which are given by the automorphism group of the anyon model, Aut(C). These are all the possible ways of relabelling the anyons such that the anyon data is preserved. We will discuss the consistency conditions that such a relabelling has to fulfil in the upcoming section in more detail.
The color code symmetries can be read directly from the boson table, as discussed in detail in Ref. [23]. Permuting any rows or columns changes the anyon labels but leaves all anyonic data the invariant. Additionally, thanks to the duality between Pauli-and colour-labels, reflections on the diagonals map the anyon model back to itself. This leads to the automorphism group (S 3 × S 3 ) Z 2 , which contains 72 elements. An example color code symmetry is the following: rx gx bx ry gy by rz gz bz → gy gx gz by bx bz ry rx rz .

Domain walls and anyon condensation
A domain wall is a one-dimensional subregion along which two phases interface. The type of interfaces we consider in this work correspond to gapped domain walls between two (Abelian) topologically ordered phases C and C [34,62]. Anyon condensation proves to be a useful tool to study this class of domain walls. Furthermore, it is worth pointing out that this description is agnostic towards the spacetime direction along which the phases are interfaced. This means that our following prescription will hold for domain walls that cut any plane of the (2 + 1)dimensional space-time.
We can interface two anyon models C and C iff they share a common condensate C B C B . The domain wall can then be interpreted as a thin strip of the condensate between the two phases, as shown in Anyons that braid non-trivially with any of the condensed anyons get confined to one side of the domain wall, meaning that they cannot move through without creating an additional excitations. Anyons that braid trivially with all bosons in B (B') are deconfined and can move through the domain wall. For this reason, in this context we call them mobile.
We can derive consistency conditions on how the anyonic data on one side of the domain wall relates to the other following Fig. 6. Let a, b, c be anyons in C which, when moved through a domain wall get mapped to a , b , c ∈ C . World-lines realising the three processes of fusion, self-exchange and braiding can smoothly be deformed to lie on either side of the domain wall. Hence, they must result in consistent outcomes. This implies that the anyonic data on either side of the domain wall must be the same, i.e., we have that Furthermore, we can obtain the conditions on anyons which condense at a boundary in this fashion. To this end, we equate C to the trivial phase, which we can think of as only hosting the trivial anyon. This means all processes happening on this side of the domain wall must be trivial. From this we get closure under fusion and the triviality of self-exchange and braiding of condensible anyons, see Eq. (15). Domain walls can be classified by the number of bosons they can condense. For the color code this means that the domain walls fall into three classes opaque, semi-transparent and invertible. All types will appear with different applications in Secs. 4, 5 and 6.
Opaque domain walls are obtained when a full Lagrangian subgroup of bosons can condense from both sides. The corresponding condensate is the trivial phase and they have no mobile anyons.
We call a domain wall semi-transparent if certain anyons remain mobile while others condense at the domain wall. Semi-transparent domain walls within the same phase can be terminated within the bulk.
Invertible domain walls can only be realised within the same phase using trivial condensation. Anyons crossing the domain wall need to preserve their data, hence invertible domain walls are in one-to-one correspondence with the elements of the automorphism group of the anyon model, Aut(C). The endpoints of invertible domain walls are called twist defects and behave similar to non-Abelian anyons in terms of fusion and braiding [15,23,[63][64][65].

Anyon condensation in stabiliser models
So far, we have discussed anyon condensation on an abstract level in terms of anyons. In what follows, we are turning our attention to microscopic realisations of topologically ordered phases by stabiliser models. In particular, we describe how to derive a stabiliser model for a condensate from a stabiliser model of a parent phase S C . Microscopically, we achieve this by adding hopping terms of the condensed bosons to the stabiliser, effectively modelling the process of anyon condensation. While we only consider qubit stabilisers explicitly here, the procedure can be generalised to stabilisers on qudits [66] and even for non-Pauli models [32], if one knows the microscopic description of the string operators of the code. Finally, we make the construction explicit by constructing the toric code stabiliser model (see Sec. 2.3) from the color code stabiliser model (see Sec. 2.1).
To bridge from the abstract notion of anyon condensation to microscopic models, let us reframe stabiliser operators of topological codes in terms of anyons and their string operators. Both the color code and toric code, as introduced in Sec. 2, are topological lattice models whose code space corresponds to the ground space of a topologically ordered Hamiltonian. In any topological lattice model elementary excitations, anyons, are created at the endpoints of string operators which are supported on one-dimensional subregions, see for example Fig. 1 (a). This means that any closed string operator does not create any excitation and thereby leaves the ground space invariant. In this reading, stabilisers correspond to contractible loops of the aforementioned string operators. Measuring a stabiliser is equivalent to performing an interferometric charge measurement [43].
We now make the abstract notion of anyon condensation from Sec. 3 explicit in microscopic lattice models. In a condensate, we require that string operators that transport condensed bosons B do not change the state, as we identify them with the trivial charge. We achieve this by adding all open string operators transporting bosons in B to the stabiliser group. This can be achieved, for instance, by adding the set of shortest hopping terms as generators of the stabiliser group.
These string operators violate some of the original stabiliser terms. To recover a commuting stabiliser group that describes the condensate, the terms of the original stabiliser group that do not commute with the new hopping terms are removed. This step corresponds to removing confined charges from the anyon model of the condensed phase.
In the following, we give a recipe to construct the stabiliser group of a condensate from a parent theory C and its stabiliser group S C and a bosonic subgroup B ⊂ C.

Consider the group S B of open string operators
for B generated hopping terms.
2. Remove the stabilisers from S C that do not commute with S B . These correspond to the closed string operators of the anyons that braid nontrivially with at least one anyon in B. We denote the reduced stabiliser group as S C .
3. The stabiliser group of the condensed phase C B is given by S C ∪ S B .
This construction shows how the toric code is a condensate of the color code. We can view the XX stabilisers on the red links, characteristic for the microscopic realisation of the toric code introduced in Sec. 2.3, as the hopping terms of the rx anyon in the color code. Following the procedure laid out above, the remaining stabilisers (after adding the XX terms) corresponds to closed string operators of the anyons that braid trivially with rx. Explicitly, the color code anyons get mapped to the toric-code anyons as follows: rx ≡ 1, ry rz ≡ e, gx bx ≡ m, and f 1 f 3 ≡ f. Condensing in the entire bulk results in a stabilisers model in the condensed phase.

Domain walls in the color code
In the coming sections, we investigate explicit microscopic examples of anyon condensation in the colorcode model. In this section we first consider a condensed color-code phase that is spatially distinct from the color-code phase itself, see Fig. 7.
We consider three types of anyon condensation in this setting, where the different types of condensation are discussed in Sec. 3.2. The anyons are condensed on a sub-region of the lattice labelled R. For simplicity, we assume R is a two-dimensional disk-shaped region. Applying maximal, partial or trivial condensation transforms R to lie within the trivial phase, the toric code phase or the color code phase, respectively. Hence the boundary of R, that we denote ∂R, is a boundary to the trivial phase (Sec. 4.1), a domain wall between the color code and the toric code phase (Sec. 4.2) or a domain wall between the color code phase and itself (Sec. 4.3). Furthermore, we show how the features we obtain can be used to store quantum information in a robust manner. In all cases, we use the procedure laid out in Sec. 3.4 on obtaining microscopic realisations of the studied domain walls.

Boundaries to the vacuum
Here we describe the boundaries between the color code and the vacuum using the language of anyon condensation. We show how boundaries can be used to encode quantum information in a robust manner as logical qubits. Finally, we discuss the structure of the logical Pauli operators. We give a physical interpre-tation of them, both as unitary operators acting on the logical state, as well as Hermitian operators used to perform measurements.
We obtain the trivial phase by condensing a complete Lagrangian subgroup of the color-code bosons. Hence, when applying such a condensation to a R of the system, we create a domain wall on ∂R which interfaces the color code with the trivial phase. Such a domain wall is referred to as a boundary [4]. As we have discussed in Sec. 3.2.1, there are six Lagrangian subgroups in the color code anyon model, translating to six boundaries that terminate the color code in the spatial direction [23]. These six boundaries fall into two classes: coloured boundaries and Pauli boundaries. Coloured boundaries are obtained if we choose to condense all three bosons with the same colour label, and we obtain Pauli boundaries if the three bosons that are condensed share a Pauli label. The coloured boundaries correspond to the columns of the boson table (2), and Pauli boundaries correspond to the rows of the table.
To create a puncture microscopically, we condense anyons by adding hopping terms to the stabiliser group, as described in Sec. 3.4. To create a puncture with a coloured boundary, we consider all the edges of the chosen colour which lie within R and perform Bell-pair measurements on the pairs of physical qubits supported on these edges [13], see Fig. 8 (a). To create a puncture with one of the three Pauli-boundaries, the prescription from Sec. 3.4 dictates to add the twoqubit Pauli rotations in the appropriate Pauli basis on all the edges within region R. Alternatively, it is sufficient to perform single-qubit Pauli measurements in the chosen basis on all qubits within R. These single-qubit Pauli rotations act as simultaneous hopping terms of all three bosons with the chosen Pauli label. This can be seen in Fig. 1 (b), where we apply a single-qubit Y rotation to decompose an ry anyon into a gy and a by anyon while simultaneously moving the charge in the process. Importantly, the two bosons gy and by have a joint charge equivalent to the ry boson, hence we can regard the single-qubit Pauli-Y rotation as moving an ry charge. Likewise, we can interpret the same single-qubit rotation as a hopping operator for the green or the blue bosons. The same argument holds for bosons with a Pauli-X or Z label and single-qubit Pauli-X or Z rotations. The creation of a Pauli-X puncture using single qubit X measurements is shown in Fig. 8 Let us now look at the physics of how a puncture can be used to encode and manipulate logical qubits. To do so, we give a physical interpretation of logical Pauli operators. As the boundary of a puncture can condense four anyons (including the trivial charge 1), the puncture can be in one of four states, corresponding to the four condensed bosons (including 1). A red puncture, for instance, can contain one of the following charges: {1, rx, ry, rz }. Similarly, a Pauli-X Figure 8: Punctures with different types of boundaries can be used to encode logical qubits. (a) shows a puncture with a coloured boundary. It is introduced when all three red bosons get condensed within a disk-shaped region R. Microscopically, condensation is achieved by adding two-body XX and ZZ stabilisers on red edges These edges are highlighted in the centre of the puncture. (b) shows a puncture terminated by a Pauli-X boundary. We produce the puncture by adding single qubit X terms supported on qubits in the interior of R to the stabiliser. Some of the logical operators for these logical qubits are shown, where we assume the string exiting the figure on the right terminates on a second boundary of appropriate type. Empty circles are used on qubits where the logical operators have common support, where the logical operators act on these qubits in different bases.
puncture as an example of a Pauli-puncture contains one of these four bosons: {1, rx, gx, bx }. Hence, a single puncture constitutes a four-dimensional Hilbert space which we can use to store quantum information in a robust manner. The dimension of the Hilbert space associated with a single puncture only describes the dimension of the logical subspace asymptotically. In practice, we require the presence of multiple punctures to encode logical qubits, as global charge conservation needs to be respected [2].
Labelling different logical states by the anyon type that occupies the puncture allows us to identify the logical Pauli operators. Importantly, Pauli operators are both unitary and Hermitian, meaning we can interpret them as changing a state or being used as a measurement. Viewing the logical operators as unitaries, we require their microscopic realisations to either change the occupation of a puncture or to apply a relative phase depending on the condensed charge within a puncture. We achieve this by applying string operators transporting anyonic charges between punctures or by wrapping an anyonic string operator around a puncture to the encoded state.
The weight of the least-weight logical operator, i.e., the code distance d in the quantum error-correction literature, is proportional to the circumference of the punctures, and their relative separation. A large code distance is obtained by choosing large punctures that are well separated.
One simple encoding using punctures consists of a pair of punctures with the same type of boundary. This puncture configuration encodes two logical qubits. Fig. 9 (a) shows a pair of red punctures and the logical operators, Fig. 9 (b) a pair of Pauli-X punctures. Alternatively, a triple of coloured punctures, one of each colour, can also be used to encode logical qubits fault tolerantly. This puncture configuration also encodes two logical qubits, as shown in Fig. 9 (c). Similarly, three Pauli punctures, again one of each type, encode two logical qubits, see Fig. 9 (d). Note how the left and the right halves of the figure are related by the color codes duality between the colourand the Pauli-labels.
So far we have viewed the logical Pauli operators as unitary operators. Now, let us consider them as Hermitian measurements. The naive way to perform a logical Pauli measurement is to measure the above described string operators. This prescription has two problems for experimental realisation, however. First, the number of qubits participating in the parity mea- surement grows with the circumference or separation of the punctures, leading to a parity measurement on extensively many qubits. A naive implementation of this measurement is not fault tolerant. Secondly, an single error either on a physical qubit or in the measurement apparatus might change the outcome. In order to obtain a fault-tolerant readout consisting of geometrically local few-qubit measurements, we can follow a procedure similar to the one introduced in Ref. [1]. The language of anyon condensation lends itself nicely to describe fault-tolerant protocols for readout. This is the topic of Sec. 5.2.

Domain walls to partial condensates
Condensing a single boson in a region R transforms the color code into the toric code. The boundary ∂R constitutes a domain wall between the two phases. As we discussed in Sec. 3.2.2, there are 18 possible ways to interface the two phases. They differ in which anyons are condensed, confined or remain mobile when approaching the domain wall, and to which anyons of the condensed phase the mobile anyons are mapped. Fig. 10 shows an example where the rx boson gets condensed in the top half of the lattice. The four bosons gy, gz, by, bz that all braid non-trivially with rx become confined. The two remaining red bosons, ry and rz, as well as the two remaining bosons with a Pauli-X label, gx and bx, braid trivially with rx. Hence, they remain mobile and can pass through the domain wall. Upon crossing the domain wall, the mobile charges are mapped to one of the two toric code bosons. In the example shown, we map ry and rz to e and gx and bx to m.
Microscopically, we introduce this domain wall by following the prescription given in Sec. 3.4 to condense a single boson. Concretely, we designate a boson with a specific color and Pauli label to be condensed. In the example shown in Fig. 10 we chose to condense rx. To condense the boson, we add two-body hopping terms to the stabiliser. Their support and the basis in which they act are given by the labels of the boson. To condense rx we add XX terms on all red egdes in R to the stabiliser group. Finally, we update the stabiliser by removing terms which do not commute with the introduced hopping terms. In this example, we remove the Z-basis stabilisers on red plaquettes.
Let us now examine the properties of the partially condensed region from the perspective of unfolding. By choosing a suitable unfolding, where we separate the color code into two disjoint copies of the toric code, we can identify the feature obtained by partial condensation in R as a puncture on one of the two toric code copies. Hence, we dub such a feature a semi-puncture.
With this observation, we discover the value of viewing the color-code phase from the perspective of the boson table. Let us stress that we obtain a puncture on one copy of the toric code depends on us choosing suitable unfolding map to identify the semi-puncture completely, where have discussed the 72 different choices of unfolding map onto copies of the toric code in Sec. 2.4. However, under the same unfolding map, there are certain semi-punctures that are obtained by condensing other choices of boson, that do not immediately divide into a puncture on a single toric-code copy. Rather, we require the use of additional domain walls to describe all of the semipunctures for any fixed unfolding map.
We therefore find the unfolded picture to be somewhat unsatisfying, because different color-code semipunctures manifest themselves differently in the toric code picture. On the other hand, in the color code picture, all of the bosons are equivalent, up to symmetries among relabelling of their color and Pauli labels. We argue then that the color code and its corresponding boson table offers a clearer way to describe these generalised topological features we have introduced here, as the boson table symmetrises the classification of all of the different semi-punctures we can produce. We depict these contrasting descriptions in Fig. 11.
Naturally, like punctures, we can use semipunctures to encode logical information. We show examples of logical encodings using semi-punctures in Fig. 12. We can describe the physics of the associated logical operators equivalently to the logical operators encountered in Sec. 4.1. They are string operators that connect semi-punctures, or string-operators that wrap around the semi-puncture.
The discovery of semi-punctures also opens the door for the design of new types of code deformations. As an example, we show that we can trans-X X X X Figure 11: An rx semi-puncture shown in both the color code picture and the unfolded toric-code picture for a suitable choice of unfolding. The microscopic model is shown in (a), together with different types of creation operators in the vicinity of the semi-puncture. Specifically, the rx anyon condenses at the semi-puncture, the bx anyon deconfines and remains mobile, and bz is confined, i.e., cannot enter the semi-puncture. In (b) we give a macroscopic representation of the same semi-puncture in the color code picture. We explicitly label the semi-puncture with a boson table that marks the condensed boson in the centre of the semi-puncture. We show the semi-puncture in an unfolded picture in (c). We choose the the unfolding map shown in Eq. (9) to reveal the semi-puncture picture.
form between different configurations of punctures using semi-punctures to mediate the transition. As an example, in Fig. 13 we show that we can transform between the logical qubit encoding shown in Fig. 9 (b) onto the encoding in Fig. 9 (c), where we make use of the six semi-punctures at an intermediate step. We add that we have already encountered the six semipuncture encoding in Fig. 12 (c). In addition to this example, we find that semi-punctures also emerge when performing a readout addressing only some of the logical qubits encoded in a color code. We discuss this example in the following section, in Sec. 5. 6.
The examples we present show us the discovery of semi-punctures may be helpful to find new faulttolerant logical operations. These may be helpful, for instance, to reduce the resource overhead of color code based quantum computation. Furthermore, considering that they can be combined with corners to obtain mixed boundary semi-punctures [67,68], we have presented a significant landscape to design and explore code-deformation protocols in the future.

Invertible domain walls
When condensing a set of anyons, we implicitly or explicitly make use of the symmetries of the underlying topological phases. This is also true in the trivial case, where no non-trivial anyons are condensed. This leaves us interfacing the parent phase with itself while applying an anyon permuting symmetry. These symmetries are the automorphisms of the anyon model Aut(C). In the case of the color code, there are 72 such automorphisms, as we have briefly summarised in Sec. 3.2.1. To each automorphism, we can associate one domain wall; see Ref. [23] for a detailed discussion on automorphisms of the color code and the associated spatial domain walls.
Anyons are distinguished by their fusion and braiding properties. Consider applying a symmetry given by the automorphism Aut(C), i.e., trivial condensation, in a simply connnected closed region R. This Figure 13: A code deformation protocol that is mediated by semi-punctures. We find that we can switch between a puncture encoding where each of the three punctures has a differently coloured boundary, onto an encoding where three punctures all have distinct types of Pauli boundary. We achieve this by splitting each of the coloured punctures into two semipunctures. Next, the semi-punctures are moved and fused to form three Pauli-type punctures. The left part of the figure shows the space-time diagram of the protocol while the right shows the (semi-)puncture configuration at intermediate time steps.
creates an invertible domain wall along the boundary ∂R. We say the domain walls acts as Aut(C) on the anyon crossing it.
However, note that there is no way of detecting the domain wall using only operations based on moving the color code anyons, i.e. fusion and braiding. This is because, by definition, the relative behaviour of the anyons is independent of the presence of a the domain wall, see Fig. 6.
Domain walls can, however, be terminated. In doing so we create so called twist defects at the endpoints. This is the topic of Sec. 6.1. Alternatively, we can consider applying an automorphism on an entire code patch, applying a transversal logical operation on the encoded qubits. This is the topic of Sec. 5.1.

Temporal domain walls
In this section, we discuss temporal domain walls. They are commonplace in topological quantum computation as they describe initialisation or injection of a code state, the application of a locality preserving gate or the readout step at the end of a computation. Temporal domain walls are introduced by changing the stabiliser group over time, see Fig. 14. In particular, here we argue that anyon condensation is a well suited framework, not only to describe temporal domain walls, but also to construct them microscopically as topologically protected deformations of the Figure 14: In this section we create temporal domain walls between the parent phase and the condensed phase. We achieve this by condensing anyons in the whole spatial bulk after (or before) a given point in time. The region of the space-time diagram in which the condensation takes place is shaded in cyan.
stabiliser group. In this sense, our treatment of temporal domain walls in this section is exactly analogous to that of spatial domain walls discussed in Sec. 4.
On a high level, quantum information is processed by changing logical operators over time. Since logical Pauli operators in two-dimensional topological errorcorrecting codes are anyonic string operators, keeping track of how anyons get mapped when passing through a domain wall gives us a physical interpretation for the action of different topological operations on logical qubits. As we shall see, we can relate locality preserving gates with invertible domain walls, see Sec. 5.1. Maximally condensing temporal domain walls, or temporal boundaries, on the other hand, corresponds to the initialisation or readout of logical operators, see Sec. 5.2. We discuss the microscopics of how anyons interact with temporal boundaries in Sec. 5.3. To understand the fault-tolerance of condensation based protocols, it is crucial that we understand the interplay of temporal and spatial domain walls which we discuss in Sec. 5.4. In Sec. 5.5 we discuss stability experiments in the color code which exemplify nicely the interplay between different types of spatial and temporal boundaries. Finally, in Sec. 5.6 we introduce partial initialisation and readout protocols based on semi-transparent temporal domain walls.

Invertible domain walls and Clifford gates
A temporal invertible domain wall corresponds to a symmetry of the anyon model, Aut(C). This means all anyons can traverse the domain wall and in doing so get mapped to potentially different anyons. As the logical Pauli operators are associated with anyon strings, they get permuted. Thus, introducing an invertible temporal domain wall acts as a logical Clifford gate. We show examples in Fig. 15.
In the triangular color code, all single-qubit Clifford gates are transversal [5]. This leads to an apparent mismatch between the number of different invertible color-code domain walls, 72 [21,23], and the size of the Clifford group acting on one qubit, 6 if we ig- In the triangular color code with coloured boundaries (a), a domain wall which turns the Pauli-Z label into the Pauli-X label changes the logical Z operator into X. For the triangular color code with Pauli boundaries (b), the domain wall needs to permute the colour labels of the anyons in order to act as a logical Clifford gate. In a rectangular color code with RBRB boundaries, as depicted in (c), a transversal Hadamard implements to the logical gate H1•H2•SWAP1,2. Dashed, wavy and solid lines correspond to the Pauli-X, Y and Z basis, respectively. nore phases. We assume the applied symmetry to not change the boundaries of the code in order to preserve the code space. In the example of the triangular color code with coloured boundaries, a symmetry that permutes any of the colour labels would also change the boundary type of some of the boundaries. Similarly, any symmetry which applies the duality transformation exchanging the Pauli-and the colour-labels of the anyonic charges of the color code transforms coloured boundaries into Pauli boundaries. Thus, we exclude them here. This leaves us with the |S 3 | = 6 symmetries which solely permute the Pauli labels. These are exactly the elements of the Clifford group without phases. Applying any of these gates transversally on all physical qubits applies the equivalent logical gate [5].
Interestingly, this argument holds true for any boundary configuration which contains only coloured boundaries -or equivalently, any configuration only containing Pauli boundaries. Meaning that any such code contains exactly 6 gates which can be applied transversally as an invertible temporal domain wall. In the case of the square color code with RBRB boundaries (see Fig. 15 (c) and Fig. 24), a generating set for the transversal gates that can be realised is as follows: A Hadamard gate H applied transversally to all of the physical qubits exchanges the logical operators Z 1 ↔ X 2 and X 1 ↔ Z 2 , corresponding to a logical swap gate followed by a Hadamard gate on each logical qubit, H 1 • H 2 • SWAP 1,2 . This transversal gate is shown in Fig. 15 (c). The gate exchanging the Pauli Y and Z basis when applied transversally to all physical qubits is, up to phases, equivalent to the application of H 1 • CNOT 1,2 • H 1 . The other three non-trivial single qubit Pauli permuting gates can be generated from the two given examples. On the logical level, they can all be composed of CNOTs and Hadamard gates.
Similarly, through the duality between the colourlabels and the Pauli-labels, we can argue that any color codes that is terminated exclusively by Pauliboundaries also has 6 transversal Clifford gates. It may be interesting to relax the assumtion that the boundaries before and after the transversal gates have to match. This might also combine in a non-trivial way with the code deformations we have introduced in Sec. 4.2 that smoothly transform between different boundary types.
Lastly we point out that invertible temporal domain walls have applications beyond the implementation of logical gates. Certain Floquet codes [36][37][38][69][70][71] can be interpreted as so called automorphism codes, where invertible domain walls on different subregions are periodically introduced [72]. In particular, in this reading of the honey comb code [36] every time step introduces a domain wall around 1 3 of the plaquettes, such that after 3 steps an automorphism has been applied to the whole code. In this work we argue that anyon condensation is a well suited tool to study and construct Floquet codes, see Sec. 7.

Initialisation and readout
In this section, we study the readout, and implicitly the initialisation, of logical qubits encoded in color codes. These processes are naturally described as maximal anyon condensation. We discuss the relationship between the logical operators we address in the process and the Lagrangian subgroups which are condensed. Condensing anyons in time introduces temporal domain walls. We defer a detailed discussion of temporal boundaries to Sec. 5.3.
We begin by revisiting the encoding scheme encountered in Sec. 4.1, where two red punctures are encoding two logical qubits. Specifically, we show how to simultaneously read out logical operators X 1 and Z 2 , see Fig. 16 (a). Both of these logical operators, X 1 and Z 2 , can be interpreted as string operators that transport red anyons between the punctures. Hence, they are composed of two-body hopping terms on red edges, see Fig. 16 (a).
To read out the logical operators, we begin by defining a region R on which X 1 and Z 2 can be fully supported. Then, we measure all red hopping terms in R, i.e., the XX and ZZ parities on all red edges. These measurements can be combined to infer the values of X 1 and Z 2 . Choosing a suitable region R allows to correct for errors on the value of the logicals. For details see Sec. 5.4. Likewise, this readout scheme is Figure 16: Reading out logical qubits by condensing anyons. Two red punctures, as shown in (a), encode two logical qubits. A red string connecting the two punctures constitutes a logical operator. To read out the logical operators X1 and Z2, we can measure the XX and ZZ parity on all red links in a region R encompassing the two punctures, as depicted in (b). This process condenses all red anyons and creates one large red puncture in R. The inverse process initialises the two logical qubits in an eigenstate of X1 and Z2.
used to perform measurement-based logical gates in lattice surgery protocols presented in Ref. [20] and in Sec. 6.4 of this work.
The above example can be understood in terms of anyon condensation. In particular, we condense all red anyons L R when measuring the red hopping terms. The concept of condensing anyons to read out logical qubits can be generalised straight forwardly to topological stabiliser codes. The logical Pauli operators {L i } that can be read out simultaneously have to be composed of hopping terms of bosons contained in the same Lagrangian subgroup L. This guarantees that we read out a commuting set of logical operators, as their corresponding anyons braid trivially, by the definition of a Lagrangian subgroup.
Let us look at how we read out logical Pauli operators at the physical level. To this end, we consider two different stabiliser groups, S C being the stabiliser group of a topological stabiliser code C, and S M which is generated by the microscopic hopping terms of the anyons in L, see Sec  of anyon condensation, we guarantee the geometric locality and thus the bounded weight of the operators that we measure.
To initialise logical qubits in a certain eigenstate of their logical Pauli operators, we follow an equivalent procedure, reversing the time direction. Concretely, this means we change from an initialisation stabiliser group S I to the code's stabiliser group S C . We construct S I to contain the hopping terms composing L i , thus initialising the system in eigenstates of L i . Note that the sign the logical Pauli L i carries depends on the choice of signs for the generators of S i .
The described initialisation and readout protocols condense a full Lagrangian subgroup of anyons. This introduces boundaries between the code and the vacuum which lie perpendicular to the time direction. In the color code readout example from Fig. 16, for instance, we introduce a red temporal boundary between the color code and the vacuum phase. We can depict this using the space-time picture, see Fig. 17. The microscopic details of temporal color code boundaries are discussed in Sec. 5.3.

Microscopics of temporal boundaries
It is helpful to view fault-tolerant logical operations in the complementary three-dimensional space-time picture. In this picture we identify spatial domain walls as lying perpendicular to a spatial directions. On the other hand, we identify domain walls which lie perpendicular to the time direction with temporal domain walls. In fact, we find that the space-time picture reveals a duality between the spatial domain walls we have introduced in Sec. 4.1 and the temporal domain walls. Here, we will describe this duality in the microscopic picture, focusing on boundaries.
We conduct our investigation into the behaviour of different types of charges, identified by different types of detection cells, by focusing on two examples. In one example we discuss a temporal boundary where we read out logical qubits using single-qubit Pauli-X measurements, and a second example where we read out the color code with Bell measurements on the green edges. In short, we study a temporal Pauli-boundary as well as a temporal colour boundary. We remark though that focusing on these two cases is without loss of generality, due to the Pauli-label and colour-label exchange symmetries of the color code. Likewise, while we concentrate on the readout step by investigating the detection cells obtained by deforming S CC onto S M , we can reproduce the same discussion at the initialisation step by, instead, deforming the stabiliser group S I onto S CC . This case differs only in the sense that the direction of time is reversed, as discussed in Sec. 5.2.
The characteristic features of spatial boundaries are their ability to condense a Lagrangian subgroup of bosonic excitations of the underlying anyon model. In the space-time picture, we replace the notion of stabilisers for identifying point-like charges with that of a detection cell, see Sec. 2.5. Moreover, for each distinct anyon that we can measure in the two-dimensional picture, we have a corresponding detection cell in the space-time picture. We therefore find a one-to-one correspondence between our description for bosonic charges in the space-time picture with the more conventional two-dimensional idealisation of the color code. Taking this perspective, we find that we can view the charges in space-time to either condense or confine at a temporal boundary between the color code and the vacuum phase. Moreover, we find that we can obtain a temporal boundary that corresponds to any of the six Lagrangian subgroups of bosonic charges in the color-code model. Following the prescription given in Sec. 3.4, we realise the found temporal boundaries explicitly in microscopic lattice models.
Let us begin our discussion by considering the temporal boundary where we read out the color code with Pauli-X measurements. We will identify the condensed charges, before looking at confined charges. A signature of a boundary being able to condense a given type of charge, a, is that an individual charge of that type can be created locally at the boundary, seemingly violating the fusion rules in the bulk of the system. Indeed, the fusion rules of an anyon model are modified close to a boundary in general. As such, identifying a configuration of errors that gives rise to a single charge close to a boundary is indicative that a boundary condenses (the anti particle of) that given charge type.
In Fig. 18 (a), we show an error configuration where a single rx charge is created at the temporal boundary where we measure all qubits in the Pauli-X basis. Specifically, we show a measurement error on the final reading of the six-body Pauli-Z stabiliser. Its only corresponding detection cell indicates the detection of a rx boson, where we recall the convention we have adopted with Pauli-Z stabilisers detect bosons with Pauli-X labels. Indeed, this is the final detection cell that we measure of this type at this readout process, as we cannot infer the values of Pauli-Z stabilisers X X X Figure 18: Condensed charges at Pauli-X type boundaries in the temporal in spatial direction. (a) The final reading of the stabilisers of the color code before we make a transversal Pauli-X measurement on all the physical qubits, thereby condensing all charges with a Pauli-X label. A measurement error (marked in orange) on the final reading of a Pauli-Z stabiliser before the code is read out gives rise to a detector cell that identifies a single rx charge in the space-time picture. (b) An analogous charge configuration at a spatial Pauli-X boundary. We show an error configuration that gives rise to a single rx charge.
from the choice of readout operation. Identifying a single rx charge signifies that rx charges and condensed at this boundary. We show the charge configuration at a spatial boundary in Fig. 18 (b) to emphasise the analogy between this temporal boundary and a spatial boundary. In both cases, we can find similar error configurations where detector cells identify individual charges of any colour, provided they have a Pauli-X label. For a temporal X-boundary they are introduced by measurement errors to Pauli-Z stabilisers of the appropriate colour. For a spatial boundary, they are created by an XX error supported on an edge of the appropriate colour.
While certain charges are condensed at a temporal boundary, we find that other types of charges are confined. Let us posit that, since charges with Pauli-X labels are condensed at Pauli-X boundaries, all charges with other labels must be confined. In Fig. 19 (a) we show a single Pauli-Z error that gives rise to a configuration of color-code charges that is allowed by the bulk fusion rules that are confined at a Pauli-X boundary. We contrast this configuration in the space-time picture with an analogous configuration of defects at a spatial boundary in the two-dimensional picture in Fig. 19 (b). In the space-time picture, Fig. 19 (a), these detection cells are completed by taking the last six-body reading of the Pauli-X type stabilisers, and comparing them with the values of the same stabilisers that are inferred from the single-qubit measurements made at the readout step. Indeed, we can find no error configuration that locally annihilates any one of the individual charges of this configuration such that the fusion rules of this error configuration are violated. We find the same configuration of charges if we have a measurement error at the final readout step, see Fig. 19 (c).
We can attribute the confinement of charges during X X X X X X Figure 19: Configurations of confined charges at a Pauli-X boundary. (a) A physical Pauli-Z error close to the temporal domain wall created by measuring all physical qubits in the Pauli-X basis creates a configuration of confined charges. (b) We compare the confined charges of the temporal Pauli-X boundary to an analogous configuration of charges created at a spatial Pauli-X boundary of the color code. We show the error and the charge configuration on the two-dimensional lattice. (c) A single measurement error, marked by the orange qubit, that occurs on one of the physical-qubit measurements at the readout step creates a configuration of confined charges equivalent to that shown in (a).
this condensation procedure to a fault-tolerant readout step. Measurement errors at this final readout step also give rise to confined subsets of charges. In Fig. 19 (c), we show a measurement error that occurs on one of the physical qubits during the readout step. We find that this configuration of charges identified by the detection cells is identical to that of Fig. 19 (b), i.e., a physical error that produces a configuration of charges that is consistent with the fusion rules of the bulk phase. We can compare the detection of confined charges, to the detection of condensed charges at this temporal boundary, to find that it not a priori obvious that we should expect to detect charges that respect the color code fusion rules close to a temporal boundary. The confining effect during the readout enables us to employ standard decoding methods to identify errors during readout.
With this example, let us finally note that the distinction between the confined charges with a Pauli-Y label and those with a Pauli-Z label is not well defined at the Pauli-X boundary. At the microscopic level, this is due to the fact that at the final time step where we infer the values of Pauli-X stabiliser detection cells at readout, we do not make a Pauli-Z detection-cell measurement. Macroscopically too, is a generic feature of a boundary that condenses charges with a Pauli-X label. This is due to the fact that we can locally create individual charges with a Pauli-X label of any colour and arbitrarily fuse them with the confined charges that are in the vicinity of this boundary. As such, charges with a Pauli-Y label and a Pauli-Z label are indistinguishable when they are close to a Pauli-X boundary. This is another example of how anyon condensation leads to identification of distinct confined anyons, as described in Sec. 3.1.
Let us next look at the temporal boundary created by making Bell measurements on the lattice edges for some choice of colour. Without loss of generality we choose to make Bell measurements on the green edges. Like the temporal domain we have already discussed that gave rise to a Pauli-X type boundary, here we find that the temporal domain wall we produce is analogous to that of a green color-code boundary.
Again, we begin by looking at the condensed charges in this example. In Fig. 20 (a), we show a measurement error during a reading of a six-body Pauli-X stabiliser. Given that we cannot infer the values of the green stabilisers from the Bell measurements we measure during readout, this is the final reading of this specific detection cell. This means the detection cells give rise to a syndrome configuration showing a single gz charge. We show the charge configuration next to a green boundary of the color code in two dimensions in Fig. 20 (b). One can check that we could have equivalently made a single gx or gy charge with different configurations of measurement errors at the final reading of the green stabiliser. We therefore observe physics that is consistent with that of a green boundary at the temporal domain wall we created in the space-time picture, where we performed a measurement that condenses the green charges to read out the logical qubit.
Let us lastly look at the confined charges at the green temporal boundary. In Fig. 21 (a) we show a two-qubit error supported on a blue edge. The figure shows detection cells identifying a pair of bx charges.   . (a) A measurement error on a two-body measurement that occurs during readout creates charges at two detection cells; a blue cell and a red cell. This is an allowed charge configuration at a green boundary, where individual green charges can be created locally. (b) An analogous configuration of charges to that of (a) shown at a green spatial boundary in two dimensions. We note that the net charge in both of the displayed charge configurations is that of a green anyon. This is consistent with the behaviour of a boundary that condenses green charges where individual green charges can be created locally.
We compare the charge configuration found at the temporal boundary to the more familiar green spatial boundary shown in two dimensions in Fig. 21 We can also look at charges at the temporal boundary created by making Bell measurements at the green edges. In Fig. 22 (a) we show a single measurement error that occurs during the Bell measurement readout step. We note that one can find a physical error on a single qubit, that occurs just before the readout, that is equivalent to this measurement error in the sense that the two local errors give rise to an equivalent charge configuration. Here we focus on a measurement error. The figure shows detection cells identifying a pair of charges; an rx and a bx charge. While this charge configuration is inconsistent with the fusion rules that are allowed in the bulk of the color code, this configuration is in fact allowed at a boundary that condenses green charges. Indeed, as we can create green charges locally at a green boundary, the colouring of the confined red-and blue-labelled charges with the same Pauli label becomes ill-defined. As such, the creation of any even parity of charges that take any colour other than green is allowed near to a green boundary. We observed similar physics at the Pauli-X boundary discussed earlier in this section, except where in the previous example the Pauli labels become ill defined, here the color labels become ambiguous in this example. We compare the charge configuration found at the temporal boundary to the more familiar green spatial boundary shown in two dimensions in Fig. 21 (b).
In fact, the last example of a blue and a red charge close to a green boundary has an unusual quirk that we finally point at here. Specifically, we can take two different perspectives on this charge configuration. At a microscopic level we can view it as a pair of confined charges. Alternatively, from a more macroscopic perspective we can view the charge as a single green charge. The fusion rules of the color code are such that the union of a red and a blue charge with the same Pauli label fuse to give a green charge. As such, we can view the charge configurations shown in Fig. 21 as demonstrating a net charge that has a green label from a global perspective. Of course, as we have mentioned, this is consistent with the physics of a green boundary, where individual green charges can be created locally.

Interplay between temporal and spatial boundaries and fault-tolerance
To investigate the fault-tolerance properties of a quantum computation in topological stabiliser codes the space-time picture is essential. In this section, we begin by using the established framework of anyon condensation to describe error detection at boundaries. We then analyse the fault tolerance of a spacetime computational scheme by studying the configuration of its boundaries.
In the previous section, Sec. 5.3, we have developed a microscopic theory for the temporal boundaries in the space-time picture. This allows us to view fault-tolerant quantum computational protocols with the color code as space-time volumes enclosed by one of six boundaries in both the space and time direction, where the boundary types correspond to the Lagrangian subgroups of the color code. We can analyse these volumes to determine processes that give rise to logical errors.
At any given time-step of a computation, the logical state of the encoded qubits is determined by the parity of the boundaries (or other condensation objects, like twist defects as discussed in Sec. 6). A non-trivial logical Pauli error corresponds to an anyon string supported on a topologically non-trivial path. This means that it cannot be deformed continuously to a point. Note that one has to take into account how anyon strings interact with boundaries and other types of defects when deforming them through spacetime. Fault-tolerance is achieved when the support of any non-trivial logical error grows with the system size.
To ensure fault-tolerance, we have to pick a suitable boundary configuration in our computation such that all of the non-trivial have a macroscopic length. To illustrate this, let us look at different temporal boundaries to initialise the triangular color code, see Fig. 23. We find that the X boundary is a valid temporal boundary to initialise this code in a logical X eigenstate. This is because it confines all bosons with a Pauli-Z or Pauli-Y label. This leaves only the three spatial coloured boundaries for the logical Z-error (Yerror) strings to terminate, see Fig. 23 (c).
If we were to use a red boundary, on the other hand, we can now find a logical error with constant support. It spans between the spatial green and blue boundary as well as the temporal red boundary, see Fig. 23 (d). Figure 23: A triangular color code with coloured boundaries can be initialised (and read out) fault-tolerantly using one of the three temporal Pauli boundaries. In (a) we show as an example how initialising a X eigenstate is achieved by preparing all physical qubits in an eigenstate of the single qubit X operator, creating a temporal X-boundary. If a coloured boundary is used, as shown in (b) with the example of a red temporal boundary, the process is not fault-tolerant and corresponds to the state injection of the single qubit state on the qubit in the top corner of the code. The space-time picture of the process lets us check the support of the logical operators. In (c) we can see that the weight d is maintained throughout the process. On the other hand, in (d) we can find a logical operator in the top corner at the beginning of the initialisation.
Such configurations can easily be spotted by keeping the space-time diagram of a computational operation in mind. Finally, we would like to point out that even this non-fault-tolerant protocol has its uses in quantum computational schemes. In Ref. [19] a similar protocol is proposed to inject logical non-Pauli eigenstates from single qubits into patches of colour code. The equivalent readout protocol teleports the state of the logical qubit onto a single physical qubit.
As a last example, consider the square color code in Fig. 24. In Sec. 5.2, we discussed how the logical qubits can be initialised respectively read out using anyon condensation. The basis in which the logical qubits are read out/initialised is determined by the strings that can condense at the boundary which is introduced by the condensation. For example, the red temporal boundary in Fig. 24 reads out(initialises) the parity of X 1 and Z 2 . Importantly, a subset of the logical Paulis are red anyon strings connecting the two red boundaries. Let us turn our attention to the case when the temporal boundary has a different color than all the logical strings that can condense at any spatial boundary, e.g. a green boundary for the code in Fig. 24. In fact the logical Pauli-Y s can be represented by a green string operators connecting opposing corners. Hence, one might assume that we can use a green temporal boundary to initialise. How- shows an example where all red edges get initialised/read out with Bell pair stabilisers, i.e., XX and ZZ. This corresponds to initialising/measuring X1 and Z2. Choosing instead the blue coloured temporal boundary (not shown) would initialise/measure Z1 and X2. (c) corresponds to interfacing to the vacuum with the Pauli-X boundary by initialising/measuring every single qubit in the X-basis. This prepares/reads out X1 and X2. Similarly, choosing the temporal Z boundary corresponds to the initialisation/readout of Z1 and Z2 (not shown). Lastly, using the temporal Pauli-Y boundary, we initialise/read out the product of Z1X2 and X1Z2 (not shown). ever, this process is not fault-tolerant. Again, we can see this by looking at the boundary configuration in the space-time. Here, at all four corners of the code, a green temporal boundary is interfaced with a red and a blue spatial boundary. This means we can find a operator of constant support who changes the parity of the charges condensed at these three boundaries with constant support, similar to the one shown in Fig. 23 (d). Nonetheless, this protocol can be used as an injection/teleportation scheme between the rectangular color code and a [ [4,2,2]]-code, where the qubits in the corners are the physical qubits of this small code.
So far, we have discussed the fault-tolerance in initialisation and readout protocols considering relatively simple examples where the logical qubits were encoded in the spatial boundary configuration. In general, all condensation objects have to be considered, like corners and twists which are the subject of Sec. 6.
Combining anyon condensation with the spacetime picture results in some no-go [73][74][75][76][77] theorems for stabiliser-based topological quantum computation. In any topological stabiliser code, non-trivial anyon strings define the logical Pauli operators. From this we can deduce that temporal domain walls can only be used to initialise logical Pauli-eigenstates, apply logical Clifford operations or perform Pauli-basis readouts. To promote this set of topologically protected operations to an universal one, one needs to make use of topological codes in higher spatial dimensions [78]. Alternatively, one could include some operation which is not topologically protected, like the described state injection, to inject non-Pauli eigenstates. Combined with state distillation protocols [79] or other appropriate means let's us obtain a universal set of fault-tolerant logical operations.

Stability experiments in topological codes
In the following we discuss memory and stability experiments in topological error correcting codes. We find that the theory of spatial and temporal boundaries that we have introduced is well suited to explain stability experiments as well as to devise variants thereof. After reviewing memory and stability experiments for general topological codes, we turn to the color code and show how it can be used to perform a combined memory-stability experiment.
To test the performance of an error correction code as a quantum memory, we can perform a memory experiment. These experiments consist of three parts. First, we begin by fault-tolerantly initialising the logical qubit(s) of the code in a certain state. Next, we let the code idle for a given period of time while measuring its stabiliser generators. And finally, we measure the logical qubit(s) and verify if they remained in the initialised state or not. For topological codes, such experiments check if we can tolerate the errors affecting the physical qubits and the gadgets used to perform the stabiliser measurements.
In addition to strings of errors introducing unwanted transformations to logical qubits, logical errors may also occur during a computation due to strings of faults that align in the time-like direction in the space-time picture. This can be a problem, for instance, when we perform gates by code deformations. In recent work [33], a simple experiment has been proposed to check the performance of the toric code against time-like logical errors. The experiment is called stability experiment and consist of a patch of toric code which does not encode any logical qubits. However, it is initialised and read out in a manner allowing us to check for occurrences of strings of non-correctable errors in the measurements of the stabiliser generators. As the direction of these measurement errors is in the time-direction, the experiment effectively checks for temporal logical errors. These are errors connecting distinct temporal boundaries. Considering the full space-time of the experiment, we can see that it is equivalent to a memory experiment "rotated by 90 • ", i.e., where one of the spatial directions is exchanged with the temporal direction. The following discussion of said experiments in terms of spatial and temporal boundaries allows us to construct stability experiments for any topological stabiliser code. We turn to the color code as a concrete example. Interestingly, we find that we can use the color code to perform a stability and a memory experiment simultaneously.
In its simplest form, a stability experiment constitutes a cylinder in space-time with one type of spatial boundary wrapping around the cylinder and a second type of temporal boundaries capping it off at the top and bottom. We call the Lagrangian subgroups describing the temporal boundaries L 1 and the spatial boundary L 2 . A space-time sketch of the experiment is shown in Fig. 25. We are interested in the anyonic charges which can condense at the top and bottom but not at the sides of the cylinder. These are charges which are not contained in the Lagrangian subgroup describing the spatial boundary L 2 but can condense at the top/bottom boundary or the corner between the two boundaries. More precisely, we consider anyons in L 1 ×L 2 \L 2 . Depending on the boundaries used, a different number of anyons fulfil the required property. The stability experiment then consists in checking whether an even or odd number of string operators corresponding to the anyons in question cross a given time-slice. This can be inferred from the parity of a set of stabiliser measurements. Figure 26: (a) shows a surface code memory experiment and (b) a surface code stability experiment. If we overlay the two we get a combined stability and memory experiment. As shown in (c), this can be realised within a single color code. It looks like a cube in space-time where opposite boundaries are of the same type. A suitable boundary configuration has, for example, two pairs of Pauli boundaries and one pair of coloured boundaries.
In Ref. [33], the product this set of stabiliser measurements is called a conserved quantity [2,80].
In the color code, a stability experiment can be performed using any combination of spatial and temporal boundaries, as long as two different boundaries are used. This is true since for any pair of different boundaries described by the Lagrangian subgroups L 1 and L 2 respectively, there exists at least one boson which is in L 1 but not in L 2 . To maximise the significance of a performed experiment, we want to maximise the number of conserved quantities, i.e., maximise the number of bosons in L 1 but not in L 2 . This is achieved by either picking two distinct coloured boundaries or two distinct Pauli boundaries. Supposing initialising single qubit states and performing single qubit measurements is simpler than preparing and measuring Bell-pairs, using Pauli-boundaries is experimentally simpler.
As mentioned above, the goals of stability and memory experiments are similar. In both we check for the presence of a logical error by validating the parity of a space-time slice perpendicular to the direction of the logical operator. The difference is the direction in which the logical operator runs, a spatial direction for the memory experiment and a temporal direction for the stability experiment. If we overlay two code patches in the toric code phase, one used to carry out a stability experiment and a second one to perform a memory experiment, we obtain a code patch in the color code phase. This is sketched in Fig. 26. Such a code is capable of simultaneously checking for the presence of temporal and spatial logical errors within the same experiment, using certain anyon parities. The corresponding space-time diagram is shown in Fig. 26. A range of color code boundary conditions are suitable to carry out such a combined memory-stability experiment. We might, for example, initialise and terminate the experiment using a temporal Pauli-Z boundaries and terminate the code in the spatial directions using red and Pauli-X Figure 27: The combined memory-stability experiment using the color code. (a) we initialise the code using a Pauli-Z boundary by preparing all physical qubits in the |1 state. (b) the stabilisers of a rectangular patch of color code with two red and two Pauli-X boundaries are measured for d rounds. (c) we terminate the experiment by performing single-qubit Pauli-Z measurements on all physical qubits. After error correction, a successful experiment reveals an even parity in all blue and green X-type stabilisers and a +1 outcome for depicted red string operator.
boundaries on opposite sides. The microscopic lattice model of this experiment together with instructions for initialisation, readout and evaluation are given in Fig. 27 and its caption.

Partial initialisation and readout
A temporal domain wall introduced by partial condensation condenses a subset of bosons which do not form a Lagrangian subgroup. This implies that the logical Pauli operators which correspond to the condensed anyons get initialised or read out, depending on the orientation of the domain wall. However, since some anyons remain mobile through the introduced semi-transparent domain wall, some logical degrees of freedom remain encoded throughout this process. We hence call the effect of semi-transparent temporal domain walls partial initialisation and partial readout. Note that a semi-transparent domain wall can also act non-trivially on the mobile anyons and hence implement logical gates on the associated logical degrees of freedom.
Let us now illustrate partial condensation on exemplary instances of the color code. First, consider two qubits encoded in two punctures in the color code, see Fig. 28. This is equivalent to the example shown in Sec. 5.2 in Fig. 16, where we condense a full Lagrangian subgroup to read out two logical qubits at once. Here now, we perform a partial condensation to obtain the value of one logical degree of freedom while leaving another one encoded. For example, we can measure the eigenstates of X 1 while leaving the second qubit encoded. We achieve this by condensing rx in region R. The second logical qubit remains encoded, as it's logical operators commute with all the rx hopping terms while not being a combination thereof. Similarly, reversing the process lets us encode a second qubit in the punctures. Condensing different bosons leads to the partial readout of different logical X X X X X X X X X X X X X X X X Figure 28: Two red punctures as shown here encode two logical qubits. The logical operators X1 and Z2 are shown in (a). They can be chosen to have the exact same support. However, it is still possible to read out one but not the other. To measure X1, for example, we measure the XX terms on the red edges in a region RL, as shown in (b). The width d of the region determines how many fault readouts can be tolerated.
degrees of freedom. For instance, if we condense ry we measure the value of X 1 Z 2 . The logical degree of freedom which remains encoded is a logical parity qubit with X ≡ X 1 Z 2 and Z ≡ Z 1 X 2 .
As a second example, let us return to the rectangular color code patch, see Fig. 29. First, let us consider the partial condensation of the rx anyon. To condense rx, we measure the XX hopping terms on all red edges. From these measurement we infer the value of the logical operator X 1 . The second logical qubit remains encoded in the obtained code. We identify this to be a surface code, see Fig. 3. Similarly, condensing rz by measuring red ZZ terms measures Z 2 , leaving the first qubit encoded in the surface code we produce. If we choose to condense ry, we measure the product X 1 Z 2 . The surface code now encodes a parity qubit with the logical operators X ≡ X 1 Z 2 and Z ≡ Z 1 X 2 . These new logical operators are composed of hopping terms of the deconfined bosons e ≡ rx rz and m ≡ gy by respectively. Condensing one of the three blue bosons, bx, by or bz lets us infer the value of the logical Pauli operators X 2 , Z 1 X 2 or Z 1 , respectively. Condensing a green boson leads leaves one logical qubit encoded in the obtained surface code. The other qubit, however, is not read out, but now encoded in a [ [4,1,2]] code which is supported on the four corner qubits. The fault-tolerance of a computation in the color code involving partial initialisation (readout) can be assessed with the same methods as described the Sec. 5.4. Together with spatial domain walls, this completes the space-time picture of computations in the color code and provides a unified tool to design and study topologically protected computational protocols in 2D topological stabiliser codes.

Terminating the color code domain walls
In this section we terminate the domain walls realisable in the color code and study the features emerging at the end-points. To terminate a domain wall, we can condense color code anyons in a one-dimensional spatial, open region. This is depicted as a (1 + 1)dimensional object in (2 + 1)-dimensional space-time in Fig. 30. Depending on the type of condensation we apply, we obtain different types of domain walls between the color code and itself. While we start the discussion by terminating invertible domain walls, we extend the theory here to include opaque and semitransparent domain walls as well.

Invertible domain walls and twist defects
Anyon models have associated domain walls that transform the anyons onto other anyon types as the domain walls are crossed [34,63,64]. These domain walls can be terminated, where we call their endpoints twist defects or simply twists. For the color code, the 72 distinct twist defects that are described macroscopically and microscopically in Ref. [23]. Here, we will briefly recall some important results which we make use of in the following sections. In particular we show three examples of invertible domain walls in the lattice model. Furthermore, we talk about the twist defects that terminate at invertible domain walls, and how they can be used to store logical qubits. Finally, we discuss how domain walls and twist defects are manifest in the space-time picture of topological phases of matter.
Let us start by showing microscopic realisations of three different invertible domain walls and their twist defects, see Fig. 31. In each case, the stabilisers along the domain wall are changed. In the case of the colour permuting domain wall presented in Fig. 31 (a), the support of the stabilisers is changed according to the new lattice geometry. This change is such that the tricolourability of the faces is violated by the addition of twist defects to the lattice. This inconsistency in the colouring leads to a permutation of the colour label of anyons moving around the twist defect. The domain wall we show in Fig. 31 (b) does not change the lattice geometry, but instead we change the basis in which the stabilisers along the domain wall act. This leads to a permutation of the Pauli labels of anyons crossing it. Finally, Fig. 31 (c) shows a domain wall implementing the duality symmetry between the colour and the Pauli label of the color codes anyons. The three domain walls we show generate all 72 invertible domain walls in the color code [23].
The twist defects at the end points of the domain wall can condense certain color-code anyons. As such, we can find string operators that transport appropriate choices of anyonic excitations between twist defects. These string-like operators correspond to logical operators from the perspective of quantum error correction. By arranging configurations of twist defects on the lattice such that all the twist defects are sufficiently well separated, we encode logical qubits robustly. Twist defects which condense many charges thus increase the size of the logical Hilbert space more Z Y Figure  than twists which only condense fewer anyons. Formally, we capture this by assigning a quantum dimension to each type of twist defect [63,[81][82][83]. For details on twist defect in the color code see Ref. [23].
In a space-time picture we keep track of the position of the twist defect and the position of the physical defect line over time. In doing so, we obtain a two-dimensional membrane for the domain wall which is terminated by the one-dimensional worldline of the twist defect, as shown in Fig. 32. As the (2+1)-dimensional topological space-time we consider is isotropic from a macroscopic perspective, we can deform the world-lines of the twist defects arbitrarily, and the processes they undergo will be equivalent, provided the world-lines undergo a continuous deformation. On the other hand, the orientation of domain walls affects the microscopic details of the implementation of a defect braiding process in a physical system. These microscopic processes are distinct from an error correction point of view.
The interaction between twist defects and other topological features are also discussed in Refs. [15,23]. Notably, it is interesting to examine the interactions that can occur as twist defects approach boundaries. The process that occurs depends on two degrees of freedom; firstly by the automorphism associated to the domain wall that gives rise to the twist defect at its end point Aut(C), and secondly by the Lagrangian subgroup that specifies its bosonic condensate L.
We distinguish two cases on how these degrees of freedom, or equivalently how the twist defect and the boundary, interplay with each other. In the first case, the associated symmetry leaves the Lagrangian subgroup of the boundary invariant, i.e., Aut(L) = L. In this case, an individual twist effectively 'vanishes' at the boundary. We can regard this as twist condensation, named to reflect the analogy between this process and anyon condensation where an anyon is absorbed, or 'vanishes' at the boundary. In contrast, if the associated anyon symmetry non-trivially alters the elements of the Lagrangian subgroup associated to the boundary, such that Aut(L) = L = L, then the presence of the twist non-trivially changes the physics of the boundary. Specifically, we find that the twist is confined at the boundary. This object has been coined a corner [15,23], as they are often found at the corners of topological codes. We discuss corners in the following section.

Corners between boundaries
Corners are points on a boundary where the boundary type changes. They are important features of topological error-correcting codes proposed for quantum computation, such as the surface code [1] and the triangular color code [5] depicted in Fig. 2 (a). In the following, we offer two constructive interpretations that can give rise to equivalent corners. First, we view them as confined twist defects. This allows us to make statements about the computational power of different types of corners. Secondly, we use the language of anyon condensation to introduce two distinct boundaries such that we introduce a corner between them. This allows for a general procedure to construct corners in topological error-correcting codes.
Earlier in this manuscript, we have already encountered corners, see for example Fig. 23 which features the triangular color code. This code is terminated by three distinct colour boundaries and the three points where the boundary type changes are corners. We say an anyon can condense at a corner if it is contained in the union of the two Lagrangian subgroups which describe the boundaries interfacing at the corner. Note that the union of two distinct Lagrangian subgroups, each consisting of anyons of a given colour label, contains a generating set of all color code anyons. As such, a corner interfacing two distinct coloured boundaries can condense all 16 color code anyons. Indeed, the same holds true for corners interfacing two distinct Pauli boundaries. We discuss corners interfacing a coloured boundary with a Pauli boundary later in this section.
Let us now interpret corners as confined twist defects, see Sec. 6.1. To this end, we start with a uniform boundary between the color code and the vacuum. Next, we introduce a pair of twist defects and move them close to the boundary where they confine. This changes the type of boundary, as anyons now need to cross a domain wall before reaching the boundary. If the anyon permuting symmetry applied when crossing the domain wall changes the Lagrangian subgroup corresponding to the boundary, then the confined twists defects correspond to a non-trivial corner. If, however, the automorphism corresponding to the twist defect leaves the Lagrangian subgroup invariant, we say that the twist defect condenses and Figure 34: The space-time picture of a triangular color code undergoing a transformation that changes its boundary type. We show the space-time process on the left while depicting three instances of the two-dimensional code at different times to the right of the figure. In separate pictures of the lattice, we show the various deformations for both the logical Z and logical X operators over time. We start at the bottom with a triangular color code with coloured boundaries. We then split each of its corners into two semi-corners and move them apart. When they meet a semi-corner originating from a distinct corner, they fuse together to form a corner interfacing two Pauli boundaries. Dotted, wavy and solid lines correspond, in turn, to the Pauli-X, Y and Z basis.
no corner is introduced. We show an example of a confining twist in Fig. 33 (a). Here, a colour-Pauliduality twist transforms a red boundary into a Pauli-X boundary. Importantly, this interpretation shows us that we can pull the corners out far away from the boundaries where they can be braided as bulk twist defects to perform logical gates [15]. Similarly, this interpretation allows us to modify the lattice realisation of topological codes which can improve encoding rates. This is done in Refs. [23,84], where the corners are moved as twists into the centre of the lattice. Finally, the insight that we can identify corners with twists can be of use in designing lattice surgery protocols in certain topological error correction codes. In Ref. [85], for instance, a twist based modification of the lattice surgery protocol is presented that allows all three logical Pauli operators in a patch of surface code to be addressed.
A second interpretation of corners is found by noticing that they can be created by condensing different Lagrangian subgroups in adjacent regions. This is shown in Fig. 33 (b). Here, we see three neighbouring regions where, from left to right, we condense the Lagrangian subgroups L R , L X , and L R . We therefore create a red, a Pauli-X and a red boundary, respectively. The corners appear at triple points where the boundaries of these two condensed regions meet the color code phase. This perspective shows us that corners can be interpreted as end-points of opaque domain walls, as shown in Table 1. An opaque domain wall is essentially a narrow puncture, which, if it consists of two distinct boundaries, features non-trivial corners at its end-points. Let us now use the second interpretation we have presented for corners to generalise this class of topological features. Our new construction generalises the notion of corners that we have already encountered, as the two Lagrangian subgroups describing the neighbouring boundaries have non-zero overlap. This means that there exists a non-trivial anyon a for which a ∈ L and a ∈ L . We dub these corners semicorners by, again, appealing to the unfolded picture of the color code. In the unfolded picture, we find that color code semi-corners appear as non-trivial corners on only one of the two toric-code layers. As opposed to the corners between two distinct coloured boundaries (or two Pauli boundaries), semi corners can not condense all of the species of color-code anyons. The corner between a red coloured boundary and a X-Pauli boundary, for example, condenses the following anyons: {1, rx, ry, rz, gx, bx, f 2 , f 3 }.
As an example of their utility, we can use semicorners to transform color codes with coloured boundaries into color codes with Pauli boundaries. We show this process in Fig. 34 where semi-corners are depicted as grey lines. As a middle stage of this transformation we encounter a color code which hosts all six distinct color code boundaries. In the following, we unfold this code, see Fig. 35. Interestingly, we obtain the surface code with a twist [84].

Semi-transparent domain walls
We have seen examples of topological features that condense charges, confine charges, and also allow deconfined charges to remain mobile. In general, we can find topological features that allow all three of these processes to occur over the charges of some anyon model. A semi-transparent domain wall permits all three of these processes to occur. We obtain a semi-transparent domain wall if we perform partial condensation along a one-dimensional sub-region of the lattice. More generally, we can obtain and classify all of the semi-transparent domain walls by composing them with other domain walls.
In what follows we classify the color codes semitransparent domain walls using an abstraction based on the color-code boson table (2). This allows us to divide all 162 semi-transparent domain walls into 8 classes. We can therefore explore how they can be used to store and manipulate logical qubits. We will also describe the physics of a semi-transparent domain wall for the color code by viewing it in the unfolded picture. We note that the exposition given in this subsection expands on the discussion given in the appendix of Ref. [20]. Before we present our general classification of semi-transparent domain walls, let us first show an explicit microscopic example.
We introduce a semi-transparent domain wall to the color code by applying a partial condensation to a one-dimensional subregion of the lattice. As discussed in Sec. 3.2.2, one color-code boson is chosen to be identified with the trivial charge in order to perform a partial condensation. In Fig. 36 (a) we show a domain wall where the rx anyon is chosen to be condensed on the color-code lattice. One can check that this domain wall condenses the rx charge no matter which side it approaches the domain wall. For a general semi-transparent domain wall, however, this is not the case and anyons approaching the domain wall from opposite sides might behave differently. We can construct one such example microscopically by composing two distinct bosons to be condensed along adjacent one-dimensional regions. Fig. 36 (b) shows a horizontal semi-transparent domain wall which we construct by condensing rx on the top and gy on the bottom. We follow the procedure laid out in Sec. 3.4 to obtain a valid stabiliser realisation.
We obtain a clearer understanding of the physics of semi-transparent domain walls of the color code by unfolding them into two layers of the toric code [24,26]. Fig. 37 (a) shows an example of an unfolded semi-transparent domain wall. Here, the top layer hosts a narrow puncture while the bottom layer is connected across the domain wall. Anyons on the bottom layer can pass through the domain wall, i.e., they remain mobile, while anyons on the top layer either condense or confine according to the chosen boundary type of this toric code layer. While this is the simplest example of an unfolded semi-transparent color code domain wall, the general case can be obtained from it readily. More precisely, we redundantly obtain all possible semi-transparent domain walls in the color code from this simple example by adding transparent domain walls to either side of the displayed semi-transparent domain wall. One such example is shown in Fig. 37 (b), where we additionally introduce a layer-swapping domain wall. Figure  Clearly, one can conceive of many different types of semi-transparent domain wall for the color code. In order to catalogue the color codes semi-transparent domain walls, we will once again make use of the boson table (2). Specifically, we take two copies of the boson table, one corresponding to the 'top side' of the domain wall and the other corresponding to the 'bottom side'. Examples are shown on the right of the domain walls in Fig. 36. We make use of the notation introduced in Sec. 3.2.2 to denote anyons that condense, those that confine, and those that remain deconfined. On either side, one of the nine bosons is condensed, marked by a label. The other 8 bosons then get marked by , or , depending whether they confine or deconfine at the domain wall. Charges marked with remain confined to their corresponding side of the domain wall. The remaining anyons are deconfined and remain mobile, i.e., can be moved across This characterisation using two boson tables suffices to find the total number of semi-transparent domain walls. First of all, we can choose which of the nine color-code bosons we condense, , on both the top side and bottom side of the domain wall arbitrarily. This fixes the confined charges on each grid. We have one final degree of freedom, namely, how the mobile charges from the top get mapped to the mobile charges on the bottom. Without loss of generality, let us arbitrarily fix the and labels on the top grid. There are now two possible choices to configure the and labels on bottom grid. Given these rules, let us now count the semi-transparent domain walls. Given the nine choices of condensing anyons on the top and bottom side grid, we obtain 9 × 9 = 81 semi-transparent domain walls. Then, together with the binary choice for how to configure the and labels on the bottom grid we arrive at 81 × 2 = 162 semi-transparent domain walls.
Let us now consider the end-points of these semitransparent domain walls. We call them semi-twists. We will also briefly discuss how they can be characterised, and used to store quantum information in a robust manner. To interpret semi twists, we can follow the unfolding procedure above to obtain two shows the same configuration in the color code. Here, we omit the logical operators X2 and Z2 for clarity. In the toric code, we represent operators corresponding to electric (magnetic) anyons e (m) with orange (blue) lines. In the color code, we draw the colour corresponding to the colour label (red or blue, here) and the Pauli-X(Z) label corresponds to dashed (solid) lines. decoupled layers of toric code. See Ref. [68] where objects that can be interpreted as semi-twists on a single-layer of the toric code are discussed. In the case of the color code we find that for any domain wall there exists an unfolding in which it is composed of a narrow puncture (with possibly two distinct boundaries) on one layer of toric code and an invertible domain wall (possibly the trivial one) on the other. Hence, the semi-twists can be regarded as corners "on top of" twists.
Both corners as well as twist defects can condense certain charges. This can be used to encode logical information in pairs of semi-twist defects. The associated logical operators are either string operators transporting a charge from one semi-twist to another or strings wrapping around a pair of semi-twists. Examples of the logical operators associated to semi twists are shown in Fig. 38.
Each of the 162 semi-twists can be associated with one of eight classes. The classes are obtained by checking if the condensing anyons on the top side and the bottom side share both their colour and Pauli label (class 1), just the Pauli label (class 2), just the colour label (class 3) or neither of the two labels (class 4). Within each class we introduce a subclass A or B depending on how the mobile anyons get mapped when crossing the domain wall. If "rows get mapped to rows" and "columns get mapped to columns" we are in subclass A, if "rows get mapped to columns" and vice versa, we are in subclass B.   Semi-transparent domain walls have previously been described abstractly in Ref. [34]. In general, a domain wall is described by two "tunnelling maps" describing how the bulk excitations get transformed when approaching the domain wall from either side. In this picture, non-transparent domain walls correspond to non-invertible tunnelling maps. In App. A, we describe how to explicitly calculate the tunnelling map in the sector of trivial wall excitations for phases equivalent to stacks of toric code, based on Ref. [62]. Calculating the full tunnelling map for arbitrary phases goes beyond the scope of this work, but will be covered in future work, see Ref. [86].
Let us terminate this section by remarking that semi-transparent domain walls appear in color code lattice surgery protocols [19,20]. In fact, lattice surgery with the color code makes use of all domain walls presented in this work so far, opaque, semitransparent and invertible ones in both the temporal and spatial orientations. This is the subject of the following section. * * * * * X X X X X X * Figure 39: Semi-transparent domain walls change type when combined with an invertible color code domain wall. Here, we show a domain wall in class 1A (as depicted in Fig. 36 (a), marked by the grey dashed line, and how it transforms when an invertible domain wall (dashed purple line) is introduces next to it. In (a) a Pauli-label permuting domain wall, analogue to the one shown in Fig. 31 (b), is introduced next to it, transforming it to a domain wall in class 3A. In (b) we introduce a colour permuting domain wall, as depicted in Fig. 31 (a), to obtain a class 2A domain wall.

Lattice surgery
Lattice surgery is a protocol to make fault-tolerant joint measurements of Pauli observables between multiple logical qubits. These fault-tolerant operations are carried out by merging and subsequently splitting disjoint code patches which we achieve by changing the measured stabiliser terms. A sufficiently large set of lattice surgery operations can implement the Clifford group by measurement. Together with the preparation of noisy magic states and distillation protocols, we recover a universal set of fault-tolerant logic gates.
Lattice surgery methods give rise to very resource efficient proposals for implementing fault-tolerant logical gates in topological error-correcting codes [14,19,20,87]. The color code has been shown to have an advantage over other topological codes in terms of the resource cost of its implementations in Ref. [20]. Achieving this advantage requires the use of all different types of color-code boundaries and domain walls. In what follows, we aim to tie together the above discussion of anyon condensation in the color code in order to understand the role of these boundaries and domain walls appearing in overhead efficient color code depicts the initial configuration where we start with two logical qubits encoded in two disjoint triangular color codes. In (c), we measure additional stabilisers supported on qubits on the red boundaries of both original triangular color codes. In doing so, we obtain two bits of classical information from reading out the X1X2 and Z1Z2 logical parities. Merging the codes as shown introduces a trivial domain wall in the purple region. In (d) we revert back to the initial configuration by measuring the initial stabiliser generators to split the big code patch. (e)-(g) show two possible ways of reading out only X1X2. In this case, a semi-transparent domain wall is introduced in the purple region. Two different microscopic realisations are shown. The left one does not require the use of additional auxiliary qubits, see Fig. 41 (2) for the microscopic details of the stabilisers. The one on the right does require auxiliary qubits but features only stabiliser measurements of weight 6 or lower. Note that the obtained semitransparent domain wall in this case is the one introduced earlier in Fig. 36 (a).
lattice surgery based quantum computation.
Let us begin by considering a simple example of a lattice surgery operation which captures many elements of the physics of more complex merging and splitting operations. In its simplest form, lattice surgery merges two disjoint color-code lattices along their adjacent boundaries before they are subsequently split [19]. This is shown in Fig. 40. In the initial configuration we start with two disjoint triangular color codes. Next, the two codes are merged. To achieve this merging operation we measure stabilisers between the two red boundaries of the two code patches to create one large code patch. Finally, we split the two codes again by measuring the initial stabilisers to return to the original code space.
Looking at the stabilisers measured during the lattice surgery protocol depicted in Fig. 40 (c) and (f), we can see that the product of the red X-type (Ztype) stabilisers in the seam is the product of two logical operators of the original code patches, namely X 1 X 2 (Z 1 Z 2 ). Hence, by measuring these additional stabilisers, we obtain the logical readings for the logical operators X 1 X 2 (Z 1 Z 2 ). Finally, we split the code patch to obtain the two initial triangular color codes again. Their logical qubits are now prepared in a Bell state, with the explicit state depending on the outcome of the logical parity measurements.
Domain walls play a central role in lattice surgery operations. Let us study the domain walls we obtain along the seam when performing lattice surgery in our example of two triangular color codes. In the process depicted in the left of Fig. 40, we converted an opaque domain wall (b), which consisted of two red boundaries and did not let any anyons pass from one code to the other, into a fully transparent domain wall (c), effectively joining the two codes together.
Performing a different measurement leads, in general, to a different domain wall. For instance, consider the case depicted on the right of Fig. 40. Here, we measure only X 1 X 2 . This requires us to find a set of commuting stabilisers which multiply to X 1 X 2 while leading to a logical code patch which still encodes one logical qubit. We show a valid solution in Fig. 40 (f). Note that this measurement results in the semi-transparent domain wall shown in Fig. 36. Similar protocols have been considered in Refs. [19,88].
Let us generalise the observed behaviour and investigate the connection between the different types of domain walls and the types of Pauli-word(s) being measured. Microscopic examples for the case of two code patches are given in Fig. 41. Here, the blue boundary of the upper patch hosts the logical operators X 1 and Z 2 and the boundary of the lower patch hosts X 3 and Z 4 .
(0) The trivial case where no measurement is performed results in an opaque domain wall. This occurs when logical qubits are left idling.
(1) Invertible domain walls are obtained if two commuting Pauli words which address two different logical degrees of freedom on each boundary are measured. In the example presented in Fig. 41 (1), we measure X 1 X 3 and Z 2 Z 4 .
(2) As discussed before, a semi-transparent domain wall is obtained if only one of the two degrees of freedom supported on each boundary of a code patch is addressed. As an example, a measurement of X 1 X 3 , as in Fig. 41 (2), results in a semi-transparent domain wall.
(3) If one of the boundaries involved in the lattice surgery has support on an even number of qubits, as is the case for the rectangular color code, it supports two commuting logical operators. In this case, it is possible to perform two commuting measurements involving the same logical operator on the other code patch. For instance, as in Fig. 41 (3), we might measure X 1 X 3 and X 1 Z 4 . Such a measurement also leads to a semi-transparent domain wall.
Having discussed the different cases arising in twopatch color code lattice surgery, let us now move onto measurements of Pauli words with support on a larger number of patches. We consider the example shown in Fig. 42. Here, we aim to measure the two Pauli words W 1 = X 1 X 2 X 3 1 4 1 5 1 6 and W 2 = Z 1 Z 2 X 3 1 4 Z 5 1 6 which are encoded on five distinct patches of color code. Note, the two Pauli words commute, [W 1 , W 2 ] = 0. This implies we are able to measure them at the same time using color code based lattice surgery [20]. In the example we find triangular code patches (see Fig. 2) as well as a rectangular code patch (see Fig. 24). Note how the rectangular patch encodes two logical qubits, indexed 4 and 5, leading to Pauli words of length n = 6. To perform the measurement, we introduce an auxiliary patch in the centre, such that it neighbours a boundary of each of the five code patches surrounding it. Furthermore, we choose the boundaries interfacing with code patches that are acted on non-trivially by both W 1 and W 2 to be red, and of Pauli type if they are acted on non-trivially only by one of W 1 and W 2 , such as the Pauli-X boundary interfacing with code patch number 5. The exception is the boundary interfacing the code patch encoding qubit number 6, which only gets acted on trivially by both W 1 and W 2 .
Let us study the auxiliary central patch in its own right. It encodes five logical qubits, which we label based on the logical operators that are supported on the boundaries interfacing the code patches, see Fig. 42 (b). In the lattice surgery protocol, we measure parities between the depicted logical operators on the auxiliary code patch and the logical operators on the surrounding code patches. In order to measure only W 1 and W 2 , and no additional information, we initialise the auxiliary code patch using a red temporal boundary, ensuring that it is not initialised in an eigenstate of the depicted logical operators. As shown Figure 42: An example of two length-6 Pauli words being measured in parallel using color code lattice surgery. In the shown example, we measure W1 = X1X2X3141516 and W2 = Z1Z2X314Z516. The boundary configuration on the data patches (shown in (a)) and the logical Pauli words we are reading out, W1 and W2, determine the boundary configuration on the auxiliary patch. For instance, the boundary interfacing with the fifth qubit is a Pauli-X boundary, as it is only involved in one of the two Pauli word measurements we perform. The auxiliary patch is initialised and read out using a red temporal boundary. This ensures that it is not initialised in an eigenstate of the logical operators depicted in (b) and we therefore avoid obtaining information about individual logical Pauli observables during the merging step. Instead, we obtain information about the products W1W3 and W2W4, where W3 = XAXBXC and W4 = ZAZBZDZE, shown in (c), are the products of the logical operators in (b). These are then measured during the readout step.
in Fig. 42 (c), the products of the logical operators in (b) are red strings, namely W 3 = X A X B X C and Thus, initialising with a red temporal boundary initialises the auxiliary code patch in an eigenstate of W 3 and W 4 . Now, by performing the merging step in the lattice surgery protocol, we measure the products W 1 W 3 and W 2 W 4 . Importantly, the performed measurements do not commute with W 3 and W 4 . Thus, in order to infer W 1 and W 2 , the values of W 3 and W 4 need to be obtained during the splitting step [14]. This is achieved by reading out the auxiliary code patch using a red temporal boundary.
In the shown example, we encounter all types of domain walls. The opaque domain wall between the auxiliary code patch and the triangular code patch encoding logical qubit number 6 is maintained throughout the protocol. The domain walls between the aux- iliary patch and the triangular code patches number 1 and 2 are invertible or fully transparent. Note, the domain wall to the patch number 2 is non-trivial, as it joins a red and a Pauli-X boundary together. The two domain walls between the auxiliary patch and the patch encoding qubits 3 and 4 as well as the one encoding qubit number 5 are semi-transparent. Here, the former is of type (3) in the above discussion, while the latter is of type (2).
With this example we hope to have elucidated how color code lattice surgery can be used to efficiently perform logical gates on a wide range of logical encodings by making use of its rich set of domain walls. This should aid the design of further schemes using unconventional encodings such as the thin color code proposed in Ref. [20], which might be preferable in architectures with biased noise.
To conclude this part of the work, let us summarise how to translate from a circuit describing a quantum computation to a fault-tolerant implementation using the color code. In the example presented in Fig. 43, we make use of the features discuss in Secs. 4-6. The operations we present give rise to a universal set of fault-tolerant logical operations for topological stabiliser codes, where non-Clifford gates are performed with magic state distillation. Furthermore, as we have argued, all of these operations are described, both macroscopically and microscopically, with the unifying language of anyon condensation.

Dynamically driven codes
Dynamically driven 'Floquet' codes [36] are a generalisation of subsystem codes where a time-ordered sequence of gauge operator measurements, or "checks", is specified to measure the syndrome data. This generalises subsystem codes [89] that are described by a generating set of all check measurements with no explicit time ordering. The honeycomb code [36] is an example of a Floquet code that has received considerable attention [37,38,[69][70][71] following its recent discovery, due to its practical implementation. Specifically, the honeycomb code has weight-six stabilisers that are inferred using only weight-two parity measurements. Furthermore, the honeycomb code can be realised on a planar lattice with boundaries [37].
The honeycomb code demonstrates the significance of specifying the order in which check operators are measured [36]. If we describe the honeycomb code as a subsystem code, where its gauge group is generated by its full set of check measurements, we arrive at a subsystem code that encodes no logical qubits. See Ref. [89] for an introduction to subsystem codes. Nevertheless, by specifying a constrained sequence of measurements where only a subset of the generators of the gauge group are measured at each time step, we find that each round of check measurements projects the system onto a new instantaneous code, such that logical qubits with an arbitrarily high distance are encoded in the system.
Here, we find that anyon condensation gives us a complementary perspective of dynamically driven codes. To this end we present a general construction for new types of such codes that we call dynamically condensed color codes; among which the honeycomb code is included. We obtain this generalisation from the observation that all of the instantaneous codes of the honeycomb code are examples of partially condensed color codes. By regarding the color code as a parent theory from which the instantaneous toric code states of a dynamically driven code can be derived, we can identify new transitions between different instances of the toric code via sets of weight-two projective measurements that act on the edges of the colorcode lattice. Specifically, we find that we can reproduce the transformations of dynamically driven codes by condensing color codes anyons that have been confined by a previous condensation operation. Using other choices of edge measurements to make checks on the color-code lattice gives us additional freedom to design new dynamically driven codes. A sketch of our framework is shown in Fig. 44.
We use our construction to introduce one specific example of a Floquet code that is of Calderbank-Shor Steane (CSS) type. We find that, by measuring only weight-two parity checks on the edges of a threecolourable lattice, we can infer the values of both Pauli-X and Pauli-Z type stabilisers for each plaque- tte. We can use the outcomes of these stabilisers to detect the occurrence of errors. As the stabilisers we measure are precisely those of the color code we coin the code the Floquet color code. We note that this code defined with periodic boundary conditions was discovered independently in Ref. [39]. Let us remark that one might regard this choice of name as a misnomer. Although we measure check operators that infer the values of color-code stabilisers, the Floquet color code emulates the ground space of the toric-code phase.
The Floquet color code represents a generalisation beyond other examples of known dynamically driven codes. When expressed as a subsystem code, where the check operators are the generators of a gauge group, the Floquet color code has no geometrically local stabiliser operators. In contrast, the honeycomb code, for example, maintains a constant set of stabiliser operators whose cardinality is extensive in the system size. This is related to the fact that the Floquet color code emulates the toric-code phase. Although we measure all of the color-code stabilisers over a period of the Floquet color code, we never produce a simultaneous eigenstate of all of the color-code stabilisers at a single instant of the period of the Floquet color code. Specifically, this is because each time we perform a set of check measurements, we kick our system out of eigenstates of stabilisers that do not commute with the check operators that are measured.
One might be troubled that our new dynamically driven code does not maintain a constant stabiliser group. However, we present numerical results showing our code demonstrates a threshold comparable to the honeycomb code [38]. Our example therefore shows that no terms in the centraliser of a subsystem code need to remain sacred in order to encode and protect logical quantum information. We note that the observation that the Floquet color code does not have a constant stabiliser group has been made in independent work [39]. Another Floquet code with this property, the automorphism code, is also presented in Ref. [72]. Two-dimensional codes can be realised on a planar qubit array by introducing boundaries. We therefore require suitable transformations for the boundary stabilisers of dynamically driven codes as we make deformations between instantaneous code states. We find that regarding the color code as a parent theory for dynamically condensed color codes reveals a general rule to find appropriate boundary conditions as we perform the code deformations of a dynamically driven code. We complete this section by explaining boundary transformations from the perspective of bulk-condensed color codes before offering some concluding remarks on dynamically driven codes.

Dynamically condensed color codes
In what follows, we will describe the instantaneous stabiliser group for dynamically condensed color codes. We will explain how the instantaneous stabiliser group is transformed as we make different choices of weight-two edge measurements on the three-colourable lattice.
Dynamically driven codes are described by a series of instantaneous stabiliser groups. Each round of check measurements that are made in the sequence projects the system onto a new instantaneous stabiliser group. Each of the instantaneous stabiliser groups of dynamically condensed color codes S a are obtained by condensing boson a of the color code. The honeycomb code [36] for example moves, up to a local basis change, through a series of three instantaneous stabiliser groups S rx , S gy and S bz . In practice we find that we can transform between any two anyoncondensed color codes S a and S b provided a and b correspond to bosons of the color code that share neither the same colour or Pauli label.
Let us remind the reader of some terminology used in the original work by Hastings and Haah [36] and relate it to the terminology we have introduced for anyon condensation. We first focus on a single instant where an instantaneous stabiliser code is prepared. Without loss of generality let us take S rx as our instantaneous stabiliser group. We first consider the logical operators of the color code, with respect to a single instant of a condensed color code. In the original work [36], the authors make a distinction between two types of Pauli logical operators of the parent model; inner logical operators and outer logical operators. Inner logical operators are contained in the instantaneous stabiliser group of the code. As such, they are in fact stabiliser operators with respect to the instantaneous stabiliser group. Outer logical operators on the other hand are not elements of the instantaneous stabiliser group and therefore provide us with pairs of canonically anti commuting logical operators that generate rotations in the code space of the instantaneous stabiliser group.
The deconfined charges of the condensed color code Figure 45: Outer logical operators of dynamically condensed color codes. The logical operators corresponding to string operators for bx (rz) charges, (a) are equivalent to the string operators for bx (ry) charges, (b). They differ by red XX edge terms, the hopping terms of the condensed rx anyon, which are stabiliser terms. We highlight the red edge checks we use to identify this equivalence in (a). The logical operators obtained in (b) commute with both instantaneous stabiliser groups Srx and Sgy. Therefore, these logical operators are maintained as we transform between Srx and Sgy.
We show the stabilisers of Sgy instantaneous stabiliser group together with the same logical operators corresponding to gx and ry string terms in (c). If we choose to identify the string term for gx with an m charge of the toric code before the transformation, then it must remain an m charge after the transformation. Likewise, the ry term must remain identified with the e charge both before and after the transformation.
give rise to outer logical operators of the code. Specifically, we regard physical string operators that transport deconfined charges over large non-trivial cycles of the lattice as the extensive outer logical operators.
In the case of S rx the outer logical operators are generated by the string operators for ry, rz, gx and bx charges. The inner logical operators for an instantaneous stabiliser group correspond to the string operators of the condensed charge. For S rx this is a string operator for the rx charges. Indeed, we can generate string operators for these charges by taking the products of red Pauli-X edge terms that are included in S rx .
As deconfined charges of the condensed code are equivalent up to fusion with a condensed charge (see Sec. 3.1), so too we find that outer logical operators are equivalent up to multiplication by an inner logical operator, i.e., an element of the stabiliser group. For instance, the string operators ry and rz are equivalent up to multiplication by an inner logical operator; a stabiliser operator that is a string operator for rx. Likewise, string operators for gx and bx are equivalent up to multiplication by an inner logical operator that transports rx charges. This is depicted Figs. 45 (a) and (b). We can therefore equivalently regard string operators ry and rz as Pauli-Z logical operators and gx and bx equivalently define Pauli-X logical operators. Equivalently, as discussed previously in Sec. 3.4, we can identify the deconfined red bosons with, say, an electric charge of the toric code model ry rz ≡ e, and similarly the two deconfined bosons that have a Pauli-X label with a magnetic flux gx bx ≡ m.
Let us now look at how we transform between different instantaneous stabiliser groups in dynamically condensed color codes. We will concentrate on a single transformation to explain how the logical operators are modified under a transformation process, but we note that we can compile a long sequence of transformations of this type. Additionally, we will show how we detect error events from the weight-two check measurements.
As we will see, we can transform between any condensed color codes S a and S b provided a and b are bosons that share neither their colour label nor their Pauli label. In other words, we require b to be a confined charge in S a . It is this observation that gives us a generalised construction for dynamically driven codes. As such, without loss of generality, we concentrate on one projection from the initial instantaneous code S rx onto S gy . We complete this transformation by measuring all of the Pauli-Y edge operators on green edges. It will be helpful to tabulate the bosonic charges of S rx as follows: Measuring the green Pauli-Y edge operators to condense the confined gy charges then maps us onto a code with the following bosonic charges In the former, S rx , the rx charges are condensed such that, up to exchange of e and m labels, we can regard the deconfined ry and rz anyons equivalently as electric charges e of the toric code (ry rz ≡ e), and similarly gx and bx can both be regarded as deconfined magnetic charges m of the toric code (gx bx ≡ m). All other charges are confined. In the latter, the gy anyons are condensed and we have gx gz ≡ m and ry by ≡ e. Fig. 45 shows the microscopic details of the outer logical operators as the transformation is made.
Importantly, both S rx and S gy share a pair of outer logical operators. These are string operators for gx and ry charges. This can be read directly by comparing the two boson tables in Eqs. (18) and (19) where we use different colours to correspond to different species of toric-code bosons. One can readily check that both of these boson tables have a common pair of deconfined bosons, that correspond to these anticommuting outer logical operators and braid nontrivially with one another. Importantly, this means that logical operators are maintained throughout the transformation and, as such, logical information is preserved. It follows that measuring the gy edge operators does not reveal any logical information from the corresponding string-like logical operators of the deconfined charges. See Fig. 45 for a microscopic illustration.
Let us further emphasise this point that the transformation determines the charge labelling convention for the new code, as this is important in Sec. 7.3.2 where we consider the transformation of boundary stabilisers for dynamically driven codes. Specifically, we find that the particle identification across the transformation can be read directly from the boson tables of the condensed color codes before and after the transformation. By identifying ry and its corresponding logical operators with, say, the electric charge e in S rx , it follows that the same logical operators must also transport e charges in the transformed code S gy . As such, the ry charge of the transformed code, together with charges that are identified with it under the condensation operation, must also be identified with e particle. Likewise, by identifying gx with the magnetic particle m in the original code S rx , it follows that gx, and its corresponding string terms that give rise to logical operators, must also be identified with the m particle in the transformed code S gy . We reflect this identification of charges across the transformation using a consistent colouring convention for the two types of deconfined charges in Eqs. (18) and (19). Specifically, we use different colours to correspond to different species of toric-code bosons. In both boson tables in Eqs. (18) and (19), ry is coloured orange in both cases, denoting an e charge, and gx is coloured blue, indicating the identification of this particle with m.
Note how the above argument holds in general for any transformation where a previously deconfined charge is condensed. If we were to measure the hopping terms of a deconfined charge, such as the red Pauli-Y or Pauli-Z edge terms, or the green or blue edge terms with a Pauli-X label, we would perform a readout. As we have discussed in Sec. 4.1 and Sec. 4.2, condensing a deconfined charge results in the readout of logical information. To summarise, it is essential that the ongoing condensation operation condenses a confined charge of S a in our construction for dynamically condensed color codes, in order to maintain coherent logical information encoded in the dynamically driven code.
In addition to transforming the outer logical operators, measuring the green Pauli-Y edge terms also serves to both infer some stabiliser data, and to reinitialise new stabilisers. Measurement of the green edge terms also means that certain stabilisers of S rx are removed from the system. We will discuss this in more detail for some specific examples in the following section (Sec.7.2), but let us provide an overview of the Figure 46: A blue (a), red (b) and green (c), plaquette of the Srx and Sgy instantaneous stabiliser groups shown at the bottom and top, respectively. The Srx instantaneous stabiliser group is overlaid with the green Y Y edge checks that are used to make the transformation. During the transformation: The blue stabiliser (a) begins in an eigenstate of the Pauli-Y stabiliser. We therefore read its known eigenstate; The red plaquette (b) is not in an eigenstate of the Pauli-Y stabiliser, we therefore project the system onto a random eigenstate of this stabiliser; Both the Pauli-X and Pauli-Z stabilisers on the green plaquette (c) anti commute with the green Y Y edge checks. We therefore kick the system out of eigenstates of these stabilisers, leaving the green plaquettes in an eigenstate of the Pauli-Y plaquette stabiliser only.
mechanics of stabiliser readout with dynamically condensed color codes here. In what follows we explain how the stabiliser group is transformed under a single condensation process, see also Fig. 46.
We are considering the transformation where we project the stabiliser group S rx onto S gy . Here, we perform green edge measurements that commute with stabilisers on the red and blue plaquettes. As such, the system remains in an eigenstate of all stabiliser generators on red and blue plaquettes. We can also use the green edge measurements to infer the values of the S ry f and S by f operators. Given that we began in an eigenstate of S by f we learn its value for a second time. Comparing its new value to its original value allows us to identify errors that have occurred during the interim period, see Fig. 46 (a). This gives rise to a detection cell, introduced in see Sec. 2.5 and discussed further in Sec. 7.2.1. In contrast, the stabiliser group S rx did not include S ry f terms, see Fig. 46 (b). Measuring the green Pauli-Y edge terms therefore initialises the system in eigenstates of these stabilisers, and in turn the S rz f stabiliser given that we maintain an eigenstate of the S rx f stabiliser throughout the transformation. However, given the outcome of this inferred stabiliser measurement is random, these measurements provide no new syndrome data with respect to the red plaquettes.
The transformation also removes stabilisers from the system. The green Pauli-Y edge measurements anti-commute with the S gx f and S gz f stabilisers. These stabilisers are therefore not included in S gy . Indeed, the new stabiliser group only includes S gy f on the green lattice faces. We depict this in Fig. 46 (c).

The Floquet color code
With the discovery that we can transform between any pair of anyon-condensed color codes from S a to S b provided bosons a and b share neither colour nor Pauli labels, we find a new degree of freedom that we can use to design new dynamically driven codes that follow different sequences of check measurements. To this end, we introduce the Floquet color code; a specific example of a dynamically condensed color code (see also [39] where this code has recently been introduced in independent work on a lattice with periodic boundary conditions). The Floquet color code follows a sequence of six instantaneous stabiliser groups · · · → S rx → S gz → S bx → S rz → S gx → S bz → . . . , (20) see Fig. 47, where we use boson tables to show how the electric and magnetic charges are transformed as the Floquet color code undergoes code deformations.
Let us now describe quantum error correction using the Floquet color code before presenting the numerical results from our threshold simulation. As we have discussed, dynamically condensed color codes maintain canonical pairs of anti-commuting outer logical operators provided the transformations we use respects the rules that are detailed in the previous subsection (Sec. 7.1). One can check that our sequence respects these results, so let us concentrate on stabiliser measurements.

Detection cells
Fault-tolerant error correction requires that we identify all types of errors over time. In addition to measuring the occurrence of physical errors that act on the qubits of the system, we must also identify errors X X X X Figure 48: Detection cells for the Floquet color code (left) and the honeycomb code (right). For the Floquet color code, we measure the red Pauli-X stabiliser at the initial and final time in the figure. At the initial time we infer its value by measuring the green Pauli-X edge checks, and we compare its value to the reading of the same stabiliser at the final time in the figure, where we infer its value from measuring the blue Pauli-X edge checks. One can check that all of the check measurements that are made in between the two readings of the red Pauli-X stabiliser commute with the stabiliser of interest. As such we obtain a detection cell by comparing the first and last reading of the stabiliser. In the case of the honeycomb code we infer the value of the red Pauli-X stabiliser by taking the product of all of the check measurements during the first two time steps; both the green Pauli-Y checks and the blue Pauli-Z checks, and we compare the value of this stabiliser to the value inferred from the green and blue check measurements that are collected at the final two time steps. The Pauli-X stabiliser commutes with the red Pauli-X edge checks that are performed in between the two readings of the stabiliser.
where measurement apparatus return the incorrect results. In the previous section we described how we transform between different instantaneous stabiliser groups as we perform check measurements. However, we use more general objects to identify the occurrence of errors in practice. We therefore define detection cells, see also Sec. 2.5, that we use to identify measurement errors, as well as physical errors.
Detection cells compare the value of some Pauli check that we measure to the value of the same check that was measured at some earlier time. If the final reading deviates from the initial reading then we declare that an error event has been detected. These events can be thought of analogously with point-like anyonic excitations in the space-time picture. Error events can be caused by physical errors that occur between its initial and final reading, or by measurement errors that change the value of either reading of the check measurement.
Let us first consider the example of a detection cell corresponding to a Pauli-X stabiliser on a red plaquette, see Fig. 48(left), although we remark that no generality is lost here, as our periodic measurement sequence is invariant under cyclic permutations of the arbitrary color labels, or exchange of the Pauli-X and Pauli-Z labels. We initialise the red Pauli-X stabiliser at the earliest time, shown at the bottom of the figure, when we measure the green Pauli-X edge checks. We compare the stabiliser measurement to the measurement of the same stabiliser, performed at the final time at the top of the figure, where we infer its value from measuring the blue Pauli-X edge checks. Assuming no errors occur, we expect the reading of this stabiliser to be the same at both the first and last time.
It is important that all the check measurements that are made in the interim period between the initial and final measurements of the detection cell commute with the red Pauli-X stabiliser. This will mean that both measurements of the stabiliser will have the same value, provided no errors occur. In between the initial and final readout of the red Pauli-X stabiliser, we measure blue and green Pauli-Z edge checks, and red Pauli-X edge checks. One can readily verify that all of these check measurements commute with the red Pauli-X stabiliser. As such, we obtain a detection cell that identifies errors that occur in between the initial and final readout of the stabiliser of interest, as well as any measurement errors that may occur during either reading of the stabiliser.
Let us now look at how all of the detection cells are supported. We find that all qubits support four detection cells at any given instant; two Pauli-X type cells and two Pauli-Z type cells. In Fig. 49 we show red, green and blue detection cells in space-time with the Pauli-X type cells on the left of the figure and the Pauli-Z type cells on the right. Note how the left and right diagrams are equivalent up to conjugation by a Hadamard and a shift by three time-steps. Let us thus without loss of generality concentrate on the Pauli-X detection cells. As we have already discussed, the red Pauli-X detection cells are initialised when we measure the green Pauli-X edge checks, and are read out a second time when we measure the blue Pauli-X edge checks. Similarly, the detection cells corresponding to green (blue) stabilisers are initialised when we measure the blue (red) edge checks, and they are read out at the final instant when we measure the red (green) edge checks. By construction, every qubit supports one stabiliser of each color. We can therefore see in the diagram that at any given instant, every qubit supports two Pauli-X type detection cells.
An unusual feature of the Floquet color code is that we do not maintain a constant group of stabilisers. Rather, stabilisers are constantly reinitialised and later checked to obtain detection cells that identify error events. For example, the red Pauli-X stabilisers do not commute with red Pauli-Z edge check measurements, we cannot maintain a red Pauli-X detection cell as we measure Pauli-Z edge checks. We must therefore reinitialise the red Pauli-X stabiliser after we measure the red Pauli-Z edge checks. Likewise, we do not maintain a green(blue) Pauli-X detection cell over the interval where we measure green(blue) Red Pauli-X(Pauli-Z) type cells are initialised when the green Pauli-X(Pauli-Z) edge checks are measured, and they are read out a second time when we measure the blue Pauli-X(Pauli-Z) edge checks, thereby completing the detection cell. Likewise, green (blue) detection cells are initialised when we measure the blue (red) edge checks, and are read out a second time when we measure the red (green) edge checks. As the stabilisers of the Floquet color code do not commute with all the edge checks, we observe short intervals where a qubit does not support some given cell. For example, the red Pauli-X type detection cell is not supported over the interval where the Pauli-Z edge checks are measured. As such, we find a temporal gap between detection cells of the same type.
Pauli-Z edge checks. This is represented in the figure by the temporal gap between two detection cells. Nevertheless, we see that every qubit always supports two detection cells at any given time.

The error syndrome of the Floquet color code
Let us now look at how the detection cells respond to errors. As the Floquet color code is a CSS code, we concentrate only on bit-flip errors, but remark that an equivalent discussion will hold for Pauli-Z type errors acting on Pauli-X type detection cells. Pauli-Y errors can be regarded as the product of a Pauli-X and Pauli-Z type error. In Fig. 50 we show the occurrence of physical errors at different time intervals over a period, as well as a measurement error on different types of edge check. We will concentrate our discussion in Figure 50: The error syndrome of physical errors (top) and measurement errors (bottom). Let us consider the physical error shown in the top left: A qubit supports a green and a blue Pauli-Z type detection cell after the blue Pauli-Z edge checks are measured, up until the instant when the proceeding green Pauli-Z edge checks are measured. Therefore, a physical error that occurs on a qubit during the interval 0 < t < 2 will produce two detection events on the green and the blue detection cell it supports. To understand how measurement errors manifest, let us focus on the case of a measurement error on a red edge (bottom left): The red edge checks read out the green detection cell, and simultaneously reinitialise the stabiliser used for a blue detection cell. Therefore a measurement error on a red edge check will violate a green and a blue detection cell.
the main text on errors that create a pair of detection events on red and blue detection cells, but remark an equivalent discussion will hold for any pair of colours, up to a cyclic permutation of colour labels. We show examples of all types of errors in Fig. 50.
Let us first look at a bit-flip error. A qubit supports a red and a blue Pauli-Z type detection cell after the instant the red Pauli-Z type checks are measured, up to the instant where the proceeding blue Pauli-Z type checks are measured. A bit-flip error that occurs in this interval will therefore violate the two detection cells the qubit is supporting at this time, thereby identifying a pair of error events. We show the two violated detection cells in Fig. 50 (top middle).
Measurement errors also create a pair of detection events in the error syndrome. Each edge check that is measured performs two tasks; it contributes to the read out of a stabiliser thereby completing a detection cell, and it is also used to reinitialise a stabiliser to produce a new detection cell. A measurement error on a given edge check will create detection events on both of its associated detection cells, as shown in Fig. 50 (bottom middle). The figure shows a single measurement error on a green edge check that reads   [38]. Data for codes of L × L red hexagons with L = 4, 8, 12, 16 are shown in blue, yellow, green and red respectively. We obtain a threshold of ∼ 0.3%, which is approximately the same as that obtained for the equivalent noise model [59]. Simulations have been conducted using Stim, and decoding has been performed using a minimum-weight perfect matching decoder, implemented using PyMatching [91], that concentrated only on stabiliser measurements obtained from Pauli-Z edge checks. Further improvements might be obtained by exploiting correlations between the detection events that are measured by the Pauli-X and Pauli-Z type stabilisers under the circuit-level depolarising noise model. out a blue detection cell and reinitialises a red detection cell.
Given that all types of errors, both bit flips on physical qubits and measurement errors, create detection events in pairs in the space-time bulk, we have a conservation law among error detection events [80,90] that enables us to employ standard decoding methods such as minimum-weight perfect matching [1,58,80] or union find [48]. In what follows we describe simulations to evaluate the threshold using a minimumweight perfect matching decoder implemented with PyMatching [91].

Numeric simulations for the Floquet color code and comparison with the honeycomb code
To assess its performance, we simulate fault-tolerant quantum error correction with the Floquet color code under circuit level noise (see the caption of Fig. 51 for details). For the standard depolarising circuit noise model used in Ref. [38] we obtain a threshold of ∼ 0.3% using a matching decoder. The decoder matches detection events from the Pauli-Z type detection cells independent of the syndrome information that is measured by the Pauli-X type detection cells. To contrast with other work, Ref. [38] reports a threshold of 0.2 − 0.3% with the honeycomb code under the same noise model using a minimum-weight perfect-matching decoder that accounts for correlations.
Using a basic decoding algorithm, we have shown that the Floquet color code has a threshold that is competitive with the honeycomb code. This may be surprising, given that we are simulating a code that does not have a constant stabiliser group. Rather, local stabilisers are constantly being removed from the system and reinitialised with different transformations between instantaneous stabiliser groups. In spite of this, the Floquet color code obtains syndrome data at the same rate as the honeycomb code.
In what follows, we discuss three factors to explain the similar thresholds obtained for the honeycomb code and the Floquet color code. These factors are: (i) the rate at which detection cells are evaluated, (ii) the stabiliser operators of the two Floquet codes, (iii) similar syndrome data structure for decoding.
To review, up to a local change of basis, two periods of the honeycomb code check measurements are as follows: · · · → S rx → S gy → S bz → S rx → S gy → S bz → . . . . (21) We also show a corresponding detection cell for the honeycomb code in Fig. 48 (right).
Let us summarise the difference in how detection cells are measured for each of the Floquet codes in regards to point (i).
The Floquet color code measures two distinct stabilisers per plaquette whereas the honeycomb code only measures one stabiliser per plaquette. On the other hand, the honeycomb code obtains new detection cells for each of its corresponding stabilisers at double the rate of each of the stabilisers for the Floquet color code. Overall, detection events are measured at an equivalent rate for each Floquet code.
In regards to point (ii), both codes have very similar structure in the sense that detection cells correspond to weight-six stabilisers that are obtained over five rounds of weight-two check measurements. And given that both codes produce syndrome data at the same rate, as discussed in point (i), it is perhaps unsurprising that the Floquet color code and the honeycomb code demonstrate comparable threshold error rates.
Let us finally discuss decoding using the minimumweight perfect-matching decoder for the two Floquet codes; point (iii). To summarise the remaining discussion in this section, we find that both decoders have similar decoding graphs in the sense that errors give rise to pairs of events at detection cells in very similar configurations in space-time. We can exploit this structure for both codes to design a minimum-weight perfect-matching algorithm.
Let us discuss how we can obtain a matching decoder for the honeycomb code. We find the honeycomb code demonstrates a parity conservation law among its detection events [80,90] over two subsets of its detection cells. We obtain these two conservation laws by dividing the cells according to the time the cell is initialised. One subset includes all the detection cells that begin initialisation by check measurements made at odd time steps and the other subset begin their initialisation by checks made at even time steps. We leave it to the reader to verify this fact. Nevertheless, the detection cells of some given symmetry for the honeycomb code share the same structure as those of, say, the Pauli-X type detection cells of the Floquet color code, see Fig. 49. Given a detection-event parity symmetry, one can exploit its corresponding conservation law to design a matching decoder [80,90].
Likewise, we obtain two subsets of detectionevent parity conservation laws with the Floquet color code. This has already been mentioned implicitly in Sec. 7.2.2. Using that the code is a CSS code, we can trivially separate the decoding problem for the Pauli-X type detection cells and the Pauli-Z type detection cells. Indeed, as we have discussed in detail, errors give rise to defects in pairs in the Floquet color code if we subdivide the results from the detection cells in this way. Given that the Pauli-X type detection cells are initialised at odd time steps and Pauli-Z type detection cells are initialised at even time steps, we can readily see an equivalence in the structure of the decoding graph for the two different Floquet codes.

The boundaries of Floquet codes
Dynamically driven codes with a local group of stabiliser generators can be realised on a planar array of qubits by encoding logical information on a lattice with boundaries [36,37]. In order to design a dynamically driven code with boundaries, we must also find suitable transformations between the boundary stabiliser operators as we perform deformations between instantaneous stabiliser groups. Here we appeal to the physics of the underlying parent phase to find a systematic way of obtaining suitable boundary transformations for examples of dynamically driven codes. In what follows, we will show how the boundaries of dynamically condensed color codes can be derived using the structure of the parent anyon theory of the colorcode model. We will go on to demonstrate our general theory by producing microscopic boundary conditions for the Floquet color code.

Boundaries of condensed color codes
The toric-code phase that is realised by dynamically condensed color codes has a well-understood boundary theory [60]. We encode logical qubits by introducing "rough" and "smooth" boundaries to the lattice [1,92], where a rough boundary condenses electric charges, labelled e, and a smooth boundary condenses magnetic charges, m. We must therefore look for boundaries for dynamically driven codes, together with their associated transformations, that reproduce the behaviour of the rough and smooth boundaries of the toric code. We find that we can derive the boundaries of dynamically condensed color codes from the parent color-code model. Let us review the boundaries of the color code before discussing how the boundaries of dynamically driven codes are obtained from the parent theory. We pay particular attention to the color-code boson table to help to elucidate our construction.
We describe six different boundaries for the color code in Sec. 3.2.1. Three boundaries are associated to color labels of the color-code bosons and three boundaries are associated to Pauli labels. We call these color boundaries and Pauli boundaries, respectively. The boundary label denotes the types of boson the boundary condenses.
We recall that the color boundaries correspond to the columns of the boson table of the color code and the Pauli boundaries correspond to the rows of the boson table. Indeed, the table is defined such that all the bosons in a column share a common color label and all of the bosons in a row share a common Pauli-label. Specifically, the boson table is designed such that the rows and columns represent distinct Lagrangian subgroups of the color-code anyon model, see Sec. 3.2.1.
Let us look once again at the charges of the boson table that remain deconfined as we condense a single charge. Upon condensing a single color-code boson, up to a symmetry in exchange of the e and m labels, we identify the charges that share a row with the condensed charge with the electric charges of the toric code, and we identify the charges that share a column with the condensed charge with the magnetic charges of the toric code. Correspondingly, we require suitable boundaries to condense these charge types at appropriate locations.
We posit that we obtain appropriate rough and smooth boundary terms that respectively absorb e and m charges for dynamically condensed color codes by choosing appropriate boundaries in the corresponding color-code theory. Without loss of generality, let us take the color code where the red Pauli-X charge is condensed, S rx as an example. In this condensed color code we have that the deconfined electric charges of the condensed theory correspond to the ry and rz charges of the parent theory. Both of these charges have a common red colour label, and are therefore both absorbed, uniquely, by a red colour boundary. As such, red colour boundaries of a color code become rough boundaries that absorb electric charges of the condensed theory S rx . Similarly, the magnetic fluxes of the condensed theory correspond to the gx and bx charges of the parent theory. Both of these charges are uniquely absorbed by a Pauli-X boundary, as they share an X Pauli label. We therefore find that the Pauli-X boundaries of a color code become the smooth boundaries that absorb the X X X X X X X X X X X X X X X X Figure 52: The boundaries of the Floquet color code at any point in time can be related to smooth and rough boundaries of the corresponding surface code. We demonstrate this here by drawing the surface code in grey on top of the Floquet color code with rx being condensed. magnetic charges of S rx . Indeed, in Fig. 52 we show a condensed color code S rx where the parent theory had two distinct red boundaries and two distinct Pauli boundaries. The figure shows the corresponding toric code lattice overlaid, with qubits on the edges. We observe that the Pauli-X boundaries produce smooth boundaries in the condensed theory whereas the red boundaries produce rough boundaries.

Boundary transformations
We have argued that the lattice geometry at the boundary of the instantaneous stabiliser groups of a dynamically condensed color codes can be determined by the corresponding excitations that are absorbed at the boundary for the parent color-code anyon theory. We can go on and follow our rule to its conclusion to learn how the boundaries must transform as we perform deformations between different instantaneous stabiliser groups of dynamically condensed color codes, see also Ref. [37]. As an explicit example, in Fig. 53 we show the boundary transformations through a single period of the Floquet color code in terms of the boundaries of its corresponding parent theory together with their corresponding boson tables. We explain this choice of boundary transformations throughout this section.
Without loss of generality we will follow the details of the transformation between the first and second step of the period of the Floquet color code as an example, where we transform from S rx onto S gz ; see steps 1 and 2 in Fig. 53, but we note that the following discussion will hold between any pair of condensed color-codes, S a and S b , with bosons a and b condensed, provided a and b share neither a colour label nor a Pauli label.
Let us posit again that rough boundaries must remain rough after a Floquet code transformation and likewise a smooth boundary must remain smooth. More specifically, this means that the rough boundaries must condense the bosons of the parent the- ory that are identified with electric charges both before and after the transformation and, likewise, the smooth boundaries must condense the magnetic charges throughout the transformation. We must therefore follow how the electric and magnetic charges are maintained throughout the transformation at the level of the parent color-code anyon theory; see Sec. 7.1. To restate our result briefly, if we choose a convention for S rx where we have identify red parent bosons with electric charges, and Pauli-X parent bosons with magnetic charges, then it follows that, after the transformation from S rx onto S gz , then Pauli-Z parent bosons correspond to electric charges and green parent bosons correspond to magnetic charges. This convention is laid out explicitly in the boson tables shown in Fig. 53.
We find that constraining the electric and magnetic charge labels as we transform S rx onto S gz also constrains the boundary transformation. With the convention used above, we have that the red (Pauli-Z) parent bosons of S rx (S gz ) correspond to electric charges and Pauli-X (green) parent bosons of S rx (S gz ) correspond to magnetic charges. This fixes the boundaries of the code. We specifically have that the red (Pauli-Z) boundaries correspond to the rough boundaries of S rx (S gz ) and that the Pauli-X (green) boundaries correspond to the smooth boundaries of S rx (S gz ). If follows that, at the level of the parent theory, red boundaries must transform onto Pauli-Z boundaries as we transform from S rx onto S gz , and likewise, Pauli-X boundaries must transform onto green boundaries in the parent theory under the transformation of interest. This is the result shown in Fig. 53 We also perform single-qubit measurements at certain time steps, shown by coloured spots. Furthermore, certain qubits are not measured at a given step. These are marked by grey circles.
we give microscopic details demonstrating the boundary transformation that we have described here at a macroscopic level.
To conclude here, let us summarise the prescription we have given to determine boundary transformations for dynamically condensed color codes. As discussed in 7.1, the electric and magnetic charge labels are constrained throughout a transformation. The transformation can be displayed clearly in boson tables once a charge label convention is specified at the initial step. Furthermore, boundary stabiliser terms can be obtained at the level of the parent theory by reading the respective rows and columns of the boson table that support the deconfined charges of the condensed anyon theory, see Sec. 7.3.1. Finally, we have argued that constraints among the charge labels under the transformation, together with a rule for finding check operators from the parent theory at the boundary of an instantaneous code, can determine how we transform the boundaries of dynamically condensed color codes.

Microscopic details at the boundary of the Floquet color code
Having given an overview for how the boundaries of the dynamically condensed color codes transform, we Z Z X X Figure 55: Detection cells at the smooth boundary of the Floquet color code. These measurements correspond to a single period with corresponding stabilisers as discussed in Fig. 54. We show detection cells for a red Pauli-Z stabiliser (left), a red Pauli-X stabiliser (middle) as well as the detection cell for a weight-three Pauli-X stabiliser (right).
can also present the microscopic details for how the boundaries transform throughout a period of the Floquet color code. We show these details in Fig. 54. In the figure we concentrate on a smooth boundary that oscillates between color labels and Pauli-X labels. The case of a rough boundary transformation is obtained by replacing Pauli-X and Pauli-Z labels. Details are given in the figure caption.
We also show the detection cells at the boundary of the Floquet color code in Fig. 55. Specifically, we show a boundary detection cell corresponding Pauli-Z stabiliser (left), a weight-six boundary Pauli-X stabiliser (middle), and a weight-three Pauli-X stabiliser (right). In each figure one can check that all of the intermediate measurements in the schedule commute with the initial and final inference of the stabiliser at the first and last time step.
We show a period of the Floquet color code with boundaries in Fig. 56. We also show the support of its logical operators. One may worry that a Floquet code may drift over an array of qubits as transformations are performed. Using the lattice geometry and the measurement pattern we have specified, we find that the footprint of our code remains static.

Remarks on Floquet codes
We have presented a generalised construction for dynamically driven codes called dynamically condensed color codes. Our construction contains the honeycomb code. Moreover, it has enabled us to present a new dynamically driven code that we call the Floquet color code. We have also given a general boundary theory that allows us to write down a valid stabiliser group at the code boundary. Let us now discuss various aspects of dynamically driven codes that may suggest new research directions.

Topological phases for Floquet codes
From the perspective of topological order, the Floquet color code presented in this work and its close cousins like the honeycomb code are in the toric code phase at any given time step. However, from one time step to the next its local representation, given by the instantaneous stabiliser group, changes. In a space-time picture, this corresponds to an invertible domain wall within the toric-code phase appearing periodically in time.
The here presented dynamically condensed color code inherit features from the well studied parent phase. In our construction, we benefit from exploiting details of the color code, such as its symmetries and boundaries [21,23]. For example, we have used the color code boundaries to construct boundaries for dynamically driven codes systematically. Naturally, we inherit beneficial properties of the parent stabiliser group such as the geometric locality and bounded weight of the stabiliser checks.
Continuing in this spirit, in future work it will be interesting to show how we can produce other types of topological defects in dynamically driven codes, such as twist defects, that can be used to perform faulttolerant gates. In addition to finding how they manifest in the microscopic details of an instantaneous stabiliser group, it is also important to find how they transform as they undergo a full period of check measurements for a Floquet code. We may discover an intuitive way of designing these objects by appealing to the details of the parent color-code theory.
On the other hand, we notice that not all sequences of condensation lead to a valid code. In certain sequences, the measured 2-body checks do not let us infer enough syndrome information to perform error correction. It will be interesting to understand the conditions on the validity of a measurement sequence in terms of the macroscopic parent anyon theory and its microscopic stabiliser realisation.
In recent work, see Ref. [72], a general construction of automorphism codes based on string-net models was presented. They use an automorphism of a topological order and the associated domain wall in the microscopic description to define a Floquet code that implements the chosen automorphism in the time direction over a cycle of measurements. Given a phase and a representation of an automorphism, their construction gives rise to a unique Floquet code.
Our construction offers a different perspective on dynamically driven codes. At any time step, we condense a different boson in a parent theory to describe the instantaneous stabiliser group. This allows to construct more measurement sequences to drive codes in the condensed phase. We leave the connection of dynamically condensed to automorphism codes from Ref. [72] for future work. We expect that the automorphism formalism has to be extended to more general invertible bimodule categories in order to capture dynamically condensed codes.
The dynamically condensed color codes that we have studied provide us with an intuitive model that shows us that we can design dynamically driven codes by condensing bosons of a parent color-code theory. Taking the perspective of a parent anyon theory with a non-trivial condensate may illuminate a way for us to design a much broader landscape of dynamically condensed codes. A first step would be to find other topological stabiliser codes corresponding to richer topological phases with non-trivial condensates and perform a similar study as we have conducted for the color code. Going beyond stabiliser codes, we could consider taking a non-Abelian parent phase with a non-trivial condensate to construct a non-Abelian dynamically driven code. One possibility to enforce nontrivial condensates is by doubling an anyon theory. One could take some number of copies of an anyon model with a gappable boundary and dynamically condense bosons in there.
The concept of condensing topological excitations can also be applied to higher-dimensional models. In Ref. [93] a network of (partly) condensing defects within a (3 + 1)-dimensional topological theory gave rise to various Fracton models. Using similar defects interleaved (periodically) in time can define dynamical condensation in three dimensions. Moreover, it would be interesting to see how known threedimensional subsystem codes, like the gauge color code [94], relate to the concept of topological con-densation. Gauge fixing could be related to picking a particular description of a condensate. Changing the gauge would then correspond to an invertible domain wall within the condensate. It may be valuable to find a unifying theory between gauge fixing and dynamically driven code measurement cycles, as such a theory may provide us with new ways of performing fault-tolerant logic gates with other types of topological codes.

A unifying framework for quantum errorcorrecting codes
Dynamically driven codes have provided us with a new way to read out syndrome data from topological phases using a certain sequence of check measurements. The fact that we can obtain syndrome data using only weight-two measurements is particularly appealing from a practical perspective. A generalisation of this idea may lead us to ways of modifying more general quantum codes with constant encoding rate in the number of physical qubits [95]. As such, it is valuable to find a unifying picture to describe Floquet codes together with other types of codes evenhandedly. We might expect any such framework to include different types of circuits that read out stabiliser operators. Let us discuss here other syndrome readout circuits, and check measurement sequences for other subsystem codes. We do this with the aim to identify some similarities between Floquet codes and subsystem codes, to attempt to demystify the physics of these new models.
It is a challenging exercise to point to the differences between dynamically driven codes and more conventional codes. It is argued that choice of sequence is essential for a dynamically driven code to maintain logical information. However, in the case of subsystem codes, given that we have a large set of non-commuting measurements that must be checked to obtain a complete set of syndrome data, a suitable sequence must also be chosen, even if the sequence is found trivially. For instance, for CSS subsystem codes, one typically assumes a sequence where we measure all of the Pauli-X checks simultaneously, followed by the Pauli-Z checks. Other subsystem codes require a non-trivial sequence of check measurements to read out stabilisers [96]. On the other hand, one can easily conceive of poor choices of readout sequences where stabilisers are read out inefficiently. Furthermore, at each step in the sequence, the subsystem code is projected onto a new instantaneous stabiliser group, where certain terms of the gauge group become fixed and join the stabiliser group of the code, while other terms of the gauge group are kicked out of the fixed subspace. The authors of Ref. [97] even consider changing the sequence of check measurements to improve a subsystem code to correct biased noise.
The key innovation that the examples of dynamically driven codes show us, beyond subsystem codes, is that the logical operators need not remain constant throughout a sequence of check measurements, but rather, they can be steadily deformed throughout a sequence of check measurements. As we have shown here, it is not even necessary to maintain a static stabiliser group as we undergo code transformations. Hopefully, these innovations will lead us to discover other new codes that are practical for experimental realisation.
Another way we might consider unifying Floquet codes with other codes is at the level of syndrome extraction circuits. Fault-tolerant syndrome readout circuits have been proposed [98,99] where a code is teleported onto a second auxiliary system, such that the teleportation operation also reveals syndrome data. One could view this teleportation operation as a code deformation, where the stabilisers of a code are teleported onto a new set of qubits with new support. One could imagine a strategy for syndrome readout where a code is periodically transferred between two subsystems. We might regard this strategy for syndrome readout as a dynamically driven code. A similar approach for syndrome readout has also been suggested using measurement-based quantum computation, where a three-dimensional cluster state is prepared over time using a two-dimensional qubit array [10]. We discuss this point of view from the perspective of fault-tolerant logic gates in the following section, see Sec. 7.4.3.

Fault-tolerant logic gates
The realisation of scalable quantum computation with dynamically driven codes will require the development of fault-tolerant logic gates. Given that the dynamically condensed color codes realise the toric code phase, we might expect to be able to perform Clifford gates with dynamically driven codes using a generalisation of code deformation. These operations might include braiding punctures [9] or braiding twist defects [15,63]. The ongoing development of quantum computation with dynamically driven codes will require a more general theory to implement the microscopic details of the measurements to realise faulttolerant logic gates. As we have already discussed in Sec. 7.4.1, we may find such constructions by appealing to the physics of the parent theory of a dynamically driven code that is created by condensation. The work of Hastings and Haah [37] has already considered some lattice surgery operations [14] with Floquet codes. If we additionally show how to initialise Floquet codes in a magic state, we can realise universal quantum computation using magic-state distillation assuming we can perform the Clifford gates.
The development of Floquet codes may also give us new ways of realising fault-tolerant non-Clifford gates. If one subscribes to measurement-based fault-tolerant quantum computation as an example of a Floquetcode encoding [10], then we can regard the gate con-structions given in Refs. [16,17] as Floquet codes that realise non-Clifford operation on their dynamically changing code space. Indeed, in both of these cases, a two-dimensional qubit array is driven between different codes using measurements. Additionally, a just-in-time decoder is used to reproduce the physics of a three-dimensional code to perform non-Clifford operations in (2 + 1)-dimensional space. It will be interesting to determine to what extent we need to periodically drive these two-dimensional systems between different stabiliser codes to realise non-Clifford gates. These examples of two-dimensional non-Clifford gates are well understood by considering the error correction system in a static three-dimensional space-time. It may be an instructive exercise to develop a spacetime theory for dynamically driven codes.

General noise models
For more practical implementations of fault-tolerant quantum computing, we require robust codes that demonstrate a high threshold against the noise models that real qubits experience. It has been shown that the threshold is highly sensitive to local modifications to codes undergoing noise models with biases towards particular types of error [100][101][102][103][104]. In addition to changes to the local bases of the physical qubits of the code, our general construction for designing dynamically condensed color codes also offers us other ways of designing dynamically driven codes. We might, for instance, chose different condensation paths through the color-code boson table. It may be that certain paths are better suited to obtain high thresholds for different choices of biased noise models. Topological codes have also been optimised into rectangular configurations with different height and width in order to reduce overhead in the biased noise setting [101,105]. One can observe that there are no logical Pauli-X operators composed of physical Pauli-Z terms at any instance of the Floquet color code (see Fig. 56). This code may therefore serve as a candidate for a thin Floquet code under noise biased to introduce dephasing errors to data qubits.
A key difference between dynamically driven codes and more conventional static codes is the action of measurement errors. For stabiliser codes, highperformance fault-tolerant syndrome readout circuit can be found by studying an idealised situation where measurements are error-free [101,106]. Then, the decoding strategy does not differ significantly when we extend to the case where measurements are noisy, up to the dimensionality of the decoding problem. In contrast, evaluation of detection cells for dynamically driven codes depends on a large number of measurements. Moreover, a single measurement error may affect a large number of detection cells. For instance a measurement error in the honeycomb code will trigger four detection events. In the physically motivated limit that readout errors are very common, it may not be straight forward to determine the performance of a code tailored to correct for biased noise acting on data qubits by only considering the logical operators of the instantaneous stabiliser groups of a dynamically driven code. Given the non-trivial role of measurements in dynamically driven codes, we might expect that a high rate of measurement error may significantly compromise the performance of a tailored error correction strategy.
Rather, given that readout is very noisy in many real architectures, it may be interesting to find dynamically driven codes that are particularly robust to measurement errors. In spite of their many similarities with respect to error correction, see Sec. 7.2.3, a key difference between the honeycomb code and the Floquet color code is the number of measurements needed to evaluate a detection cell. A detection cell of the honeycomb code depends on twelve measurement outcomes whereas a detection cell of the Floquet color code only depends on six measurements, see Fig. 48. This difference may lead to a significant contrast in their performance, particularly in the limit where measurement errors are dominant.
We will also need to consider more general types of errors in a real quantum system such as qubit leakage errors [107] and fabrication defects [108]. Solutions to these problems typically require the use of additional auxiliary qubits and modifications to the syndrome readout circuit. Simple and elegant modifications have been proposed [109,110] to deal with leakage for the surface code. It will be important for their practical development to find circuits that perform these same tasks for dynamically driven codes. For the case of fabrication defects, Ref. [108] has shown a syndrome readout protocol that demonstrated a threshold with topological codes using a defective qubit array. The protocol adds punctures to the topological code to isolate the defective components. To obtain syndrome data needed to demonstrate a threshold, the protocol also requires code deformations to the boundaries of the punctures to transform the boundaries between different types; rough and smooth. We expect that we can adapt this protocol for dynamically condensed color codes, employing the boundary theory that we presented in Sec. 7.3 to transform between their rough and smooth boundaries.

Discussion and outlook
Many architectures for practical fault-tolerant quantum computation are based on the manipulation of topological phases of matter. In this work we have argued that anyon condensation gives us a framework to describe ways of encoding logical qubits with topological quantum error-correcting codes as well as many of the mechanisms for performing robust logical operations. We have demonstrated the application of this framework explicitly with the color code as our key ex-ample, expressing the many fault-tolerant encodings and implementations of logic gates in the color code as applications of anyon condensation. This framework has also shown us how to generalise many of these color-code encodings and logic gates using the notion of partial condensation, where a subset of bosons of the color code are condensed on a region of the lattice to manipulate topological degrees of freedom. Finally, we have reformulated the notion of a dynamicallydriven Floquet code in terms of a condensate of a parent color code theory, and this new perspective has enabled us to generalise known Floquet codes as well as providing a constructive way to design the boundary stabilisers of our Floquet code construction.
With our work, the catalogue of topological features available in the color code [23] has been significantly extended to now include semi-punctures, semitransparent domain walls and generalised twist defects that appear at their end points. Importantly, the language we use to describe these features is independent of their orientation in the (2+1)-dimensional space-time volume describing the computation. Because of this symmetry, we can make use of a given topological feature in many different ways to perform computational tasks. This perspective allows for these topological objects to be used for fault-tolerant state initialisation and readout, to apply logical gates, and to transform between inequivalent schemes of topological encoding. As a practical application of this new framework, we expect that the large zoo of feasible operations available to us can be used to significantly decrease the physical resource overheads of fault-tolerant logical operations that plague existing constructions. Notions of lattice surgery as discussed in Ref. [20] can be seen as first steps in this direction. The framework developed here is expected to be highly instrumental in developing schemes that are even more resource economical, contributing to the quest of identifying schemes of fault tolerant quantum computing with reasonable overheads.
More broadly, we have shown that partial anyon condensation can provide us a number of novel operations within the framework of topological faulttolerant quantum computing. These operations complement known logic operations that are completed with constant-depth unitary circuits such as transversal gates, as well as more conventional measurementbased operations that manipulate punctures and braiding operations for non-Abelian point-like objects such as twists. We have found that the color-code model to be particularly illustrative of this idea, due to its rich and numerous symmetries exhibited at the level of its low-energy excitations. Moving forward, it will be exciting to understand how similar mechanisms are manifest in more general topological phases. We may study, for instance, other (2 + 1)-dimensional topological quantum field theories [111], including non-Abelian theories [112], as well as higher-dimensional topological phases and fracton phases. In order to make progress along these lines, one could seek other examples of condensation processes in other phases, and to develop a theory of anyon condensation for general classes of phases.
Lastly, we have also shown that dynamicallyprepared Floquet codes can be rederived, and generalised, within the framework of anyon condensation of color-code excitations. We were able to design key features of this novel type of code, such as the code boundaries, by appealing to the physics of the parent color-code model. Given the practicality of their realisation, the development of Floquet codes may provide better ways of realising different types of nontrivial topological phases. In future work, it will be interesting to discover to what extent our theory of Floquet codes from anyon condensation can be generalised to other types of topological phases. Further afield, it may also be that developments of the theory of dynamical codes may show us more practical ways of implementing quantum low-density paritycheck codes [113]. . This equivalence is often referred to as the folding trick. Note that C is inverted by the fold. In this work, however, since we consider qubit stabiliser models, C * = C .
We will see that in this case, many properties of a given (abstractly defined) boundary are easily computable. In particular, the color code is equivalent to 2 layers of the toric code (see Sec. 2.4), so n = 2.
First, let us show why it is important to study boundaries, even if one is interested in domain walls.

A.1 Folding trick
Until now we have seen how to understand domain walls in terms of condensation and symmetry. However, in practical scenarios one might want to have a simpler picture to understand/construct domain walls. To this end we can employ the folding trick. It relates a domain wall to a boundary of a "folded" phase, composed of the phases on both sides of the domain wall of interest.
The folding trick allows us to think about any C-C domain wall as a boundary of the stacked theory C ⊗ C 1 . The folding trick can be easily understood pictorially by folding a plane with a domain wall along it and identifying the cut with a boundary to a vacuum, see Fig. 57. Mathematically speaking, the folding trick is used to classify domain walls in terms of boundaries [34,62,65], which is a simpler task since a topological boundary (of an Abelian phase) is fully described by a Lagrangian subgroup.
In order to think about domain walls as boundaries of a stacked phase, we establish what the structure of the Lagrangian subgroup (folded) tells us about the domain wall (unfolded). The fold gives a natural decomposition of the anyon fusion group C ⊗ C . A generator of L of the form a ⊗ a , without a and a appearing individually means that in the unfolded picture a → a when passing through the domain wall. For an invertible domain wall, every generator is of 1 Technically, one of the phases needs to be inverted. But for stabiliser codes, as considered here, the inversion does not change the phase. that form, for an opaque domain wall all generators can be brought to the form a ⊗ 1 or 1 ⊗ a . The semitransparent domain walls are the ones with generators of both of the above types.
The equivalence of domain walls and certain boundaries shows that, mainly for computational purposes, it suffices to consider how to construct condensable bosons for boundaries. In Sec. 3.3, we will show how the Lagrangian subgroup of any boundary of layers of toric codes can be directly calculated based on its classifying data.

A.2 General structure of boundaries
In Sec. 3.3 we showed that domain walls -gapped interfaces of topological phases -can be understood in terms of the condensate formed by the mobile anyons. This classifies all possible domain walls up to automorphisms on both sides of the interface. In this section, we will explicitly show how this categorises domain walls from n to m layers of the toric code. In particular, we will see how the condition that the mobile anyons have to form a condensate constrains the domain wall.
As the general case, we consider a domain wall from n layers of the toric code, T C n , to m layers T C m . We show that any such domain wall is equivalent to an opaque domain wall on a subset of layers and a fully transparent domain wall on the remaining layers up to symmetries on both sides of the interface, Aut(T C n ) and Aut(T C m ). In the language of anyon condensation an equivalent statement is that any condensate of n layers of toric codes is in the phase of k layers of toric codes, where k ≤ n. We will prove this in the remainder of this section using the tools laid out in the main text of this article. Imagine a stabiliser model for n layers of toric codes, the quantum double model [2] for G = Z n 2 . By construction, it is a qubit Pauli stabiliser code. Any condensate can be modelled by adding the corresponding hopping terms to the stabiliser group generators (see Sec. 3.4). In toric codes, any such string operator is a (multi-)qubit Pauli word. Hence, the stabiliser group in the condensed phase will be a qubit Pauli group. From Ref. [24], we know that any such code is in the same phase as k layers of toric codes. Counting the cosets making up the condensate given a set of condensable bosons and the conditions on them shows that k ≤ n. This completes one proof of the above statement.
Albeit the simplicity of the stabiliser based proof, the microscopic description of the condensate is not necessary. We have given a simple proof that demonstrating how condensates are constrained by appealing to the microscopic details of the G = Z n ble model. Specifically, one can also work out the condensed phase explicitly by looking at the conditions defining the condensed phase when an arbitrary boson in the n layer toric code phase is condensed. Checking that the fusion group and the modular data of the resulting anyons coincide with n − 1 layers of toric codes is straight forward using Z 2 arithmetic.
The proof for any number of condensed bosons then follows by induction.

A.3 Calculating Lagrangian subgroups
It is a well established fact in the mathematical condensed-matter literature that the boundaries of a quantum double model of a finite group G are classified by a subgroup N ⊂ G and a so-called 2-cocycle class [ψ] ∈ H 2 (N, U (1)) [61,62]. Moreover, Ref. [62] has established a formula to calculate the Lagrangian subgroup of a boundary (N, ψ) of a generic quantum double model, Abelian or Non-Abelian. In this section, we explicitly show the formula in the case of n layers of the toric code and give some intuition for the quantities appearing in the expressions. We end the section with some simple examples to see how familiar boundaries of the toric and color code come out of this description.
The topological phase of n layers of the toric code is modelled by a quantum double model with gauge group G = Z n 2 . For the remainder of this section we represent its elements by binary vectors of length n and the group multiplication by entry-wise addition modulo 2, a ⊕ b :=      a 1 + b 1 mod 2 a 2 + b 2 mod 2 . . . a n + b n mod 2 Any subgroup is of the form Z k 2 for k ≤ n and generated by k independent generators. Any such subgroup, together with a 2-cocycle on it, defines a boundary of the quantum double model. A 2-cocycle on the subgroup is a function ψ : N × N → U (1) with the property   ψ(b, c)ψ(a, b ⊕ c) = ψ(a ⊕ b, c)ψ(a, b) (23) for all a, b, c ∈ N . 2-cocycles are sorted into equivalence classes where two 2-cocycles ψ andψ are equivalent if there exists a function β : N → U (1) such that The set of these equivalence classes is called second cohomology group and denoted by H 2 (N, U (1)). For more details on the origin of the this equivalence relation and group cohomology, we refer to the appendix of Ref. [114]. In fact, the type of boundary defined by a pair of subgroup and 2-cocycle only depends on the equivalence class that contains the 2-cocycle. In every 2-cocycle class there is a special representative that satisfies ψ(0, a) = ψ(a, 0) = 1, ∀a, where 0 denotes the identity element in N . We call such a 2-cocycle normalised. Let us elaborate on the form of inequivalent normalised 2-cocycles for N = Z k 2 . In fact, for k = 1, there is only a single equivalence class, represented by the trivial 2-cocycle ψ 0 (a, b) = 1 ∀a, b. (26) For k = 2, however, there exist one nontrivial 2coycleclass which is represented by Since it is of order two, i.e., (ψ 1 ) 2 = ψ 0 ≡ 1, we write H 2 (Z 2 × Z 2 , U (1)) = Z 2 . Luckily, we can construct a representative of any non-trivial 2-cocycle class on Z k 2 for any k from the non-trivial 2-cocycle ψ 1 . Using the Künneth formula for group cohomology [114] and the fact that Z 2 only has trivial 2-cocycles, one can show that for k > 1 the 2-cocycles over Z k 2 decompose into 2-cocycles defined on pairs of tensor factors. Abstracly, where (Z 2 ) i refers to the ith tensor factor of Z k 2 and k 2 = k(k − 1)/2 is the number of pairs in the k factors. For the 2-cocycles themselves, this means that we can write the (normalised) representative of any 2cocycle class as a product of (normalised) 2-cocycles each of which only acts non-trivially on a pair of fac- where a i,j denotes the restriction of a on (Z 2 ) i × (Z 2 ) j ⊂ Z k 2 and the set of n i,j = 0, 1 labels the 2cocycle classes and indicates if the 2-cocycle is nontrivial on pair (i, j). Taken together, inequivalent boundaries of n layers of the toric code are classified by a subgroup Z k 2 ⊂ Z n 2 and a set of Z 2 numbers {n i,j | (i, j) pairs of factors in Z k 2 }. Now that we have introduced the quantities that define the bulk model (finite group, G = Z n 2 ) and a boundary (subgroup N Z k 2 and a 2-cocycle class in H 2 (Z k 2 , U (1))), we can turn our attention on how to describe the bulk anyons and their condensation at the boundary in terms of this defining data. The bulk anyons are labelled by a pair of group elements, in our case Z n 2 × Z n 2 , where the first factor represents the electric part and the other one the magnetic part. For example, e 1 = (0, . . . |1, . . . ), m 1 = (1, . . . |0 . . . ) are, respectively, the electric and magnetic anyon on the first layer. Their composite particle, the fermion on the first layer, is represented by their sum f 1 = e 1 ⊕ m 1 = (1, 0, . . . |1, 0, . . . ). The modular data (monodromy and topological spin) can all be computed by the so-called character function Note that this function couples the first and the second argument on every "layer" individually. This is related to the fact that in layers of toric code an anyon has non-trivial topological spin (of −1) if it has both an electric and a magnetic component on the same layer. For the exact formulas we refer to Ref. [115].
The way we calculate the Lagrangian subgroup corresponding to a boundary labelled by a subgroup N and a 2-cocycle ψ ni,j is to construct an indicator func- where | i denotes the projection onto the ith tensor factor of N . We see that the g-part (magnetic component) is purely determined by the subgroup N . For the origin of this function, we refer to Refs. [62,86]. By which h-part (electric component) it is accompanied is determined by the 2-cocycle characterising the boundary. To understand the formula better, let us look at some examples.
which are exactly the pure electric anyons for N 1 and the pure magnetic anyons for N 2 as expected for a single layer of toric code. Example 2: color code boundaries, n = 2: The color code can be unfolded to two layers of toric code (see Sec. 2.4), i.e., a quantum double model with G 2 = Z 2 × Z 2 . Besides the two trivial subgroups, N 1 = {(0, 0)} and N 2 = G 2 , we find that G 2 has three other subgroups, N 3 = (0, 1) , N 4 = (1, 0) and N 5 = (1, 1) , each of which is isomorphic to Z 2 . As discussed above, N 2 has two 2-cocycle classes, whereas the other subgroups only host a trivial one. In total, this gives 6 boundaries corresponding to the six Lagrangian subgroups in Eqs. (16). In the following, we will see how they can be recovered with formula in Eq. (31).
Depending on the unfolding one chooses to map the color code to two toric code layers the above Lagrangian subgroups correspond to different boundaries . For example, choosing the standard mapping (9), L N1 corresponds to the x boundary, L N4 to the red boundary, L N2,ψ1 to the z boundary, etc. . We see that the Lagrangian subgroup is generated by anyons supported only on the left or the right side of the domain wall so it corresponds to a fully opaque wall when unfolded (see Sec. A.1). This can be traced back to the fact that N 1 is only supported on a single tensor fact of the input group Z ×4 2 . This generalises to all boundaries corresponding to any subgroup that factorises over the input tensor factors and a trivial 2-cocycle.
N 2 also has a single generator, (1010). This generator, however, is supported on two tensor factors each of which was associated with a different side of the domain wall. For this subgroup the indicator function reads m N2 (g|h) =δ g∈{(0000),(1010)} 1 2 Again, since the Lagrangian subgroup is generated by anyons supported on a single side of the domain wall, it corresponds to an opaque one. On each side, m 1 and e 2 can condense individually. The fact that it is fully opaque can again be traced back to the fact that the chosen subgroup factorises over the fold, i.e., is generated by generators solely supported on the first two or last two factors of Z ×4 2 . This argument does not hold anymore for the boundary associated with the same subgroup but a non-trivial 2-cocycle of the form ψ N3 (a, b) = (−1) a1b3 . (44) Plugging this into the indicator function gives m N3,ψ (g|h) =δ g∈N3 1 4 Note that the non-trivial 2-coycle couples the contraints on h and g. The associated Lagrangian subgroup reads L N3,ψ ={(a 1 0a 2 0|a 2 a 3 a 1 a 4 ) | a i = 0, 1} m l 1 e r 1 , m r 1 e l 1 , e l 2 , e r 2 .

(46)
Even though the defining group factorises over the individual tensor factors of the input group the domain wall associated to the Lagrangian subgroup above is semi-transparent. The 2-cocycle couples the constraints on g and h in the indicator function in a way that m l 1 only condenses when accompanied by e r 1 and vice versa. As a domain wall this means that m 1 can pass through from either side but gets transformed into e 1 , i.e., the non-trivial automorphism of the upper layer toric code gets applied. On the lower layer e l 2 and e r 2 condense individually, making the domain wall semi-transparent. When comparing L N3 with L N3,ψ we see that the non-trivial 2-cocycle effectively "twists" the magnetic part in L N3 by appending electric charges on a different layer. This generalises to any non-trivial 2-cocycle on any subgroup isomorphic to Z 2 ×Z 2 . It appends the m-anyons on either of the two factors (of the subgroup) with electric charges on the other one. We see that the constraints on g and h decouple. The Lagrangian subgroup consists of anyons with g ∈ N accompanied with a charge that has even overlap with any element in N , i.e for which i l i h i = 0 mod 2 ∀l ∈ N . This agrees with our understanding that in order for two anyons braiding trivially in layers of toric code the e and the m part has to overlap on an even number of layers. As a consistency check, we can count all g, h for which m N (g|k) = 1. In any Abelian anyon model, the order of a Lagrangian subgroup is the square root the total number of anyons in the bulk. In our case, where the bulk has 2 2n anyons, we hence expect 2 n different (g|k) that condense. The g label has to be in N , giving rise to 2 k different values.
Additionally, h ∈ Z n 2 is constrained by k independent constraints (one for each independent generator of N ) of the form h · l = 0 mod 2, each of which reduces the number of valid values by a factor of 2. Put together, h can take 2 n−k different values, independent of g, and we get 2 k 2 n−k = 2 n anyons for which m N (g|k) = 1.