Topological error correcting processes from fixed-point path integrals

We propose a unifying paradigm for analyzing and constructing topological quantum error correcting codes as dynamical circuits of geometrically local channels and measurements. To this end, we relate such circuits to discrete fixed-point path integrals in Euclidean spacetime, which describe the underlying topological order: If we fix a history of measurement outcomes, we obtain a fixed-point path integral carrying a pattern of topological defects. As an example, we show that the stabilizer toric code, subsystem toric code, and CSS Floquet code can be viewed as one and the same code on different spacetime lattices, and the honeycomb Floquet code is equivalent to the CSS Floquet code under a change of basis. We also use our formalism to derive two new error-correcting codes, namely a Floquet version of the $3+1$-dimensional toric code using only 2-body measurements, as well as a dynamic code based on the double-semion string-net path integral.


Introduction
One of the most promising routes towards scalable fault-tolerant quantum computation is topological quantum computation.Thereby, logical quantum information is stored in the ground state space of a topological phase on a topologically non-trivial spatial configuration, which may contain computational defects such as anyons, twist defects, or boundaries [1,2,3].Topological order has been shown to be robust under arbitrary local perturbations [4].In a similar vein, topological quantum error correction (QEC) is believed to provide a threshold for arbitrary local noise.Despite the similarity, these two notions of robustness are technically very different: Whereas topological order concerns ground-state properties, captured by the imaginary-time evolution, topological QEC executes a dissipative real-time evolution including syndrome measurements and corrections.
Both topological phases and topological QEC can be described by path integrals that are discrete in space and time.For QEC, these are mixed-state circuits of quantum channels and measurements.For topological phases, they are fixed-point models in the form of state-sum TQFTs [5,6,7,8,9] or tensornetwork path integrals [10].In this paper, we present a picture for topological QEC, at whose core is the relation between the two types of discrete path integrals.Concretely, there exists a history of "trivial" measurement outcomes (often +1 for Pauli based codes) such that the QEC circuit becomes a fixedpoint path integral.The other histories of measurement outcomes then correspond to the same path integral including different patterns of topological defects such as anyons, which will be called syndrome defects.The path integral is locally invariant under certain changes of the positions of the syndrome defects, giving rise to equivalences between different defect patterns.The corrections correspond to the insertion of additional segments of defects, which are chosen by the classical decoder to ensure that the total pattern of defects is equivalent to the trivial one.The correspondence between QEC circuits and path integrals with defects provides a single simple criterion for topological fault tolerance.
Our formalism has two major practical applications.The first application is to systematically analyze existing codes.In particular, the correspondence to path integrals can be used to assign a topological phase to any topological code.This phase determines the logical dimension on different topologies, the possible boundary conditions, anyons, or other sorts of computational defects that can be introduced, as well as the logical operations that can be performed.Codes within the same phase can be seen as distinct microscopic representations of one another.To illustrate this, we focus on recently developed Floquet codes [11,12,13,14,15,16,17,18].These are specified by a sequence of Pauli measurements, usually 2-body, measured in a fixed schedule.Since the checks are non-commuting, they can be analyzed using the formalism of subsystem codes [19,20,21].However, due to the fixed schedule, they manage to protect a certain number of logical qubits even though the subsystem formalism predicts less or none at all.Lately, there has been a quest to better understand the relation between stabilizer, subsystem, and Floquet codes, and between different Floquet codes among each other.Our formalism helps to establish direct relations between different codes, often by finding that they belong to a common phase.Concretely, we find that the stabilizer toric code [1,2], the subsystem toric code [21], and the CSS honeycomb Floquet code [13,14,15] correspond to the same path integral on different spacetime lattices, and thus belong to a single code family in our spacetime perspective.This can be seen as a spacetime analogue of viewing stabilizer toric codes on different spatial lattices as part of a single code family.We also find that the underlying path integrals of the CSS honeycomb Floquet code and the original honeycomb Floquet code [11] are equal up to a local change of basis.All four codes belong to the toric code phase.They only differ by the microscopic representation of the underlying path integral, as well as by the locations of the syndrome defect segments corresponding to the non-trivial measurement outcomes.
The second application is to systematically construct new codes.Roughly speaking, we start with a fixed-point path integral and interpret it as a nonunitary circuit.Then we turn each non-unitary operator into an instrument that measures the absence or presence of a syndrome defect.The circuit of instruments then defines a fault tolerant dynamic code.By making use of the rich and developed mathematical theory of fixed-point models, this yields a great variety of new dynamic topological codes.First, we can start from different models in different families of fixed-point path integrals, corresponding to different phases.Further, topological fixed-point path integrals have a notion of exact combinatorial topolog-ical invariance, which is at the heart of their success in classifying topological phases.So we can put the fixed-point path integrals on arbitrary spacetime lattices.Finally, even if the path integral and lattice are fixed, they can be turned into a non-unitary circuit in various ways by choosing different causal orderings.An interesting feature of our approach that goes beyond much of the quantum error-correction literature is that there is no necessity for the resulting codes to be based on Pauli/Clifford measurements or operations.Concretely, we illustrate the capability of finding new codes through two examples.First, we construct a Floquet version of the 3 + 1-dimensional toric code that uses only 2-body XX and ZZ measurements.The code lives on a triangulation with 4colorable vertices, with a qubit on every left-handed tetrahedron.In each of 8 rounds we perform measurements on the qubits adjacent to each edge of a certain type.Second, we present a non-Pauli dynamic code based on the double-semion Turaev-Viro path integral [22,23,6,7,8].We sketch a presentation of this code as a circuit of common 2 and 3-qubit gates and measurements.Due to its relatively large spacetime overhead it merely serves as an illustrative example rather than as a practical QEC code.
The structure of the remainder of this work is as follows.In Section 2, we review fixed-point path integrals and their defects, and introduce the main definition of a fixed-point path integral code.In Section 3, we use our formalism to analyze four examples of existing codes as mentioned above.In Section 4.1, construct the two new dynamic codes mentioned above.
2 From fixed-point path integrals to error-correcting codes

Fixed-point path integrals
In this section, we review fixed-point path integrals for topological phases, which are the key to understanding and constructing topological QEC codes in this work.Fixed-point path integrals are defined on lattices representing a discrete Euclidean-signature spacetime.The most common formulation of such path integrals is as state sums [5,6,7,8,9].To this end we associate discrete variables to certain types of places (for example, all edges) in the lattice, and weights to other places (for example, all volumes).Each weight depends on the configuration of the nearby variables.We then perform a sum over all configurations of the variables, where the summand is given by the product of all the weights, Here, c is a configuration of variables, and i 0 , i 1 , . . .label the variables on which the weight ω i at the location i depends.Such path integrals are commonly used as partition functions in classical statistical physics on a space-only lattice, for example in the classical Ising model.Here we will use them on a spacetime lattice to represent the imaginary-time evolution of a geometrically local Hamiltonian.To this end, note that the imaginary-time evolution can be approximately discretized to a non-unitary circuit through Trotterization.This non-unitary circuit yields a discrete path integral where the configurations of variables are the histories of qubit configurations, and the weights are the amplitudes of the non-unitary gates.Even though the path integrals we consider do not directly correspond to discretized imaginary-time evolutions, they share the same qualitative properties and have the same physical interpretation.Note that in this paper, all models will be translation invariant or uniformly defined on some lattice, and fully specified by a single unit cell.If we want to evaluate the number Z, we need to choose a finite spacetime lattice with periodic boundary conditions.As such, the number Z alone has no immediate physical relevance.However, consider evaluating the path integral on some patch with boundary, and only summing over variables in the interior while keeping these near the boundary fixed.The number Z can then be interpreted as the amplitude of a state for the fixed configuration of boundary variables.We will thus refer to such a boundary as a spatial boundary.
Physically, this state is a ground state of the model on the spatial boundary.
An equivalent formulation that is better suited for our purpose are tensor-network path integrals [10].These are tensor networks whose tensors are located at some places (for example, all volumes) of the spacetime lattice, and nearby tensors share bonds (for example, at every face, connecting the two adjacent volumes).Note that this is different from MPS or PEPS which live in space only and describe states, not path integrals.In particular, tensor-network path integrals have no open indices except for when we cut the tensor network at a spatial boundary.Contracting the resulting tensor network with open indices yields a tensor, which analogously to the previous paragraph can be interpreted as a ground state living on the spatial boundary.Also in contrast to MPS or PEPS, path integrals have no distinction between virtual indices that are contracted and physical indices that remain open.Topological fixed-point path integrals have one single powerful property that makes them exactly solvable, namely discrete topological invariance.To this end, we first define the path integral not only on regular lattices, but on arbitrary triangulations or cellulations.Let us consider here the case of 2+1 dimensions where most of topological error correction takes place.One possibility is to put the same 4-index tensor (in black) onto every tetrahedron of a 3-dimensional tri-angulation (in orange), . ( Then, we choose a set of local deformations, which can arbitrarily change the lattice while keeping its overall topology fixed.The local deformations of the lattice correspond to changing the tensor network by cutting out a small patch and gluing in another patch.Topological invariance of the path integral is imposed by equating the cut-out and glued-in patches.In our above example, we can demand invariance under Pachner moves [24], such as On the left hand side, we have two tetrahedra stacked on top of each other.On the right, there are three tetrahedra surrounding the vertical dotted line in the center, such that each tetrahedron is spanned by one of the three edges "around the equator" with the edge "connecting the north and south pole".Note that in addition to the "standard" way of implementing discrete topological invariance above, there are other ways of doing this.A general implementation of topological invariance is a way to assign tensor networks to cellulations such that tensors and the geometry of the network at one place depends only on the combinatorial structure of the cellulation within a constant-size neighborhood.Another implementation would be to put tensors on the edges and faces instead of the volumes, which is how topological invariance is formulated for the toric code below.Different implementations are equivalent in the sense that they describe the same phases.However, these different microscopic representations of the same phase are interesting in practice, since yield different QEC codes via the formalism we propose.For a more detailed discussion of discrete topological invariance in fixed-point path integrals, we refer the reader to Ref. [10]. As an example, let us consider the toric code path integral in 2+1 spacetime dimensions, which will be used in all examples in Section 3. As a stabilizer code, the toric code is defined with qubits on the edges of a 2-dimensional square lattice, a Z 0 Z 1 Z 2 Z 3 stabilizer at each face acting on the four adjacent qubits, and a X 0 X 1 X 2 X 3 stabilizer at each vertex acting on the four adjacent qubits.The ground states (that is, the stabilized states) are equal-weight superpositions of all configurations of one Z 2 -variable at every edge such that at every plaquette the surrounding variables sum to 0 (mod 2 with Z 2 written additively).
On the Poincaré dual lattice, these configurations can be pictured as equal-weight superpositions of all closed-loop patterns.Mathematically, the closed-loop patterns are Z 2 -valued 1-cocycles.The path integral in the 2+1-dimensional spacetime cellulation is just the same, namely a sum over all 1-cocycles.In 2+1 dimensions, 1-cocycles can be pictured as closedmembrane configurations on the Poincaré dual lattice.Indeed, consider the state obtained by evaluating the path integral on some cellulation with spatial boundary as discussed above: Each bulk (closed membrane) 1-cocycle restricts to a (closed loop) 1-cocycle on the boundary, and so the resulting ground state is the expected toric code ground state.So the toric code state sum has one Z 2 -variable on each edge, and one weight at each face which is 1 if the surrounding edge variables sum to 0, and 0 otherwise.As a tensor network, the summation over each Z 2 -variable at an edge is implemented by a δ-tensor, a b c . . .
Each weight at a face is implemented by a Z 2 -tensor, (5) So in total, there is one Z 2 -tensor at every face and one δ-tensor at every edge, and for each pair of adjacent face and edge the tensors are connected by a bond.For example, on a patch of a cubic lattice (in orange), the tensor network (in black/gray) looks like: As shown later in Eq. (27), this tensor network is also directly related to the toric code stabilizers by taking a periodic product of the +1 postselectsd stabilizer measurements.
2-index Z 2 -tensors or δ-tensors are equal to the identity matrix, so at 2-gons and 2-valent edges we can just put a bond instead of a tensor, for example, Note here that the cellulations we consider are combinatorial and not geometrical, so it is possible that we have to bend some edges or faces in order to embed the lattice into Euclidean space.Let us now define combinatorial moves that impose the topological invariance of the path integral.While we could again use Pachner moves, there is a set of moves that is more elegant for the present path integral.First, we impose equality of different ways of splitting faces into triangles along 2-valent edges, Poincaré dually, we also equate different ways of splitting n-valent edges into 3-valent ones separated by 2-gon faces such as the splitting shown in Eq. (8).Finally, we add a move involving both face and edge tensors, On the left-hand side, there are two triangles with two shared 3-valent edges.On the right-hand side, there is one triangle with one adjacent 3-valent edge.Like for Pachner moves, applying the moves above allows us to arbitrarily change the cellulation while leaving the topology invariant.Note that this type of state sum (for general choices of face and edge tensors) can describe not only the toric code but any nonchiral topological phase, and is closely related to weak Hopf algebras [10].Also note that for the toric code, the equations above are a subset of the ZX calculus [25,26].
We could also extend the definition of the path integral to manifolds with boundary, for example by adding two additional tensors associated to boundary edges and faces and imposing a boundary version of topological invariance.More generally, we could introduce any sort of defects, which are lowerdimensional manifolds along which the path integral is altered, including domain walls, twist defects, corners between boundaries, anyons, and so on.In order to turn path integrals into fault tolerant circuits, we will use a subset of all the defects that we will refer to as syndrome defects.For most examples in this paper, the syndrome defects will be the anyons, which are implemented by altering the path integral on 1dimensional worldlines inside a 3-dimensional spacetime.For the toric code, there are two generating types of anyon worldlines, namely e and m anyons.e anyon worldlines are closed paths of edges in the lattice.We can introduce an e anyon by replacing all δ-tensors on the worldline by a charged δ-tensor, a b c . . .
m anyon worldlines are closed paths of edges in the Poincaré dual lattice.For an m anyon, we replace all Z 2 -tensors on the worldline by a charged Z 2 -tensor, An example for a configuration of e and m worldlines inside the cubic lattice (with worldlines marked in semi-transparent red) is: More generally, e anyons can be supported on any 1-cycle.A 1-cycle is a map that associates to every edge an element of Z 2 = {0, 1} depending on whether the edge carries an anyon or not, fulfilling a Gauss law: For every vertex, the sum of Z 2 -values on the incident edges must be 0 (mod 2).In other words, the configuration of anyon worldlines must satisfy the anyon fusion rules.Dually, m anyons live on any 2cocycle, a map that associates a Z 2 -element to every face such that the faces adjacent to every volume sum to 0. In principle, one can define e (m) anyon worldline patterns on arbitrary 1-chains (2-cochains), that is arbitrary maps from the edges (faces) to Z 2 .However, if the cycle (cocycle) condition is violated, the path integral evaluates to 0, for example: To see this, we note that the path integral with a 2-cochain b of m-anyons corresponds to a sum over all 1-cochains a with da = b, where da denotes the coboundary of a associating to each face the sum a on the surrounding edges.Since coboundaries are always cocycles, b must be a 2-cocycle, otherwise we sum over the empty set of configurations and the path integral evaluates to 0. Dually, the path integral with a 1chain c of e-anyons corresponds to a sum over all 1cocycles a, with a weight (−1) ac at every edge.If c violates the cycle condition at a vertex v, then adding the cocycle consisting of all edges adjacent to v to a will change the weight by a factor of −1.Thus, the weights for all configurations cancel and the path integral again evaluates to 0. There are additional tensor-network equations for the tensors of the bulk together with their charged versions, such as ) and the same equations with full and empty circles exchanged.Note that the equations in Eq. (15) are also part of the ZX calculus, where the charged tensors in Eqs.(11) and (12) are the Z and X-type tensor labeled by a phase of π.These equations can be used to freely move the worldlines through the bulk, at least up to a ±1 prefactor, for example, = . ( In other words, these equations impose the topological invariance of the anyon worldline, in addition to that of the bulk itself.More precisely, Eq. (15) allows us to change the e 1-cycle by adding 1 (mod 2) to the edges in the boundary of any face.That is, we can arbitrarily deform the pattern of anyon worldlines as long as the homology class does not change.The same holds for the m anyon worldlines on the dual lattice.
In general, one could use different types of defects as the syndrome defects, whose configurations obey other local constraints than the cocycle condition, and have other equivalences than homology.Examples for this are topological phases with non-abelian anyons that are only topologically (not homologically) invariant, or fracton phases where syndrome defects are to some extent restricted to rigid submanifolds.Also, homological syndrome defects can have a higher dimension, for example they could be located on 2cycles, which are closed-membrane configurations as used in Section 4.1.All other examples in this paper just use closed-loop homological syndrome defects such as the e and m anyons in the toric code.
There is a natural equivalence relation for path integrals.Namely, two tensor-network path integrals X and Y are equivalent if they are related by applying local tensor-network equations.Applying such an equation means to remove the left-hand side from the tensor network and insert the right-hand side, or vice versa.More precisely, we apply such equations in parallel everywhere in the tensor network, for a constant number of rounds.Alternatively, applying the tensornetwork equations only inside some region A yields a domain wall between Y on A and X on the complement A. By applying the tensor-network equations we can make A larger or smaller, which freely moves around the domain wall, making it a topological domain wall.Since we can also remove, fuse, or generate new A islands, the domain wall is also invertible.Equivalence classes under invertible domain walls will be called fixed-point phases.Fixed-point phases are the natural notion of phases of matter for fixed-point path integrals, analogous to how local unitary circuits can be used to define phases in fixed-point Hamiltonians.Exact tensor-network equations still provide an interesting equivalence relation for general (non-fixedpoint) path integrals.However, for them to capture phases of matter in this general context, some notion of approximation will be necessary.This is because applying exact tensor-network equations cannot change the correlation length of a path integral.In this light, consider tensor-network equations imposing topological invariance such as Eq.(3) or Eq.(10): They imply that the path integral on one lattice is in the same fixed-point phase as that same path integral on another lattice, for any way of superimposing the two lattices.For more detail and examples we refer the reader to Ref. [10].

Dynamic codes
In this paper we are thinking of QEC as a dynamic processes, or more technically, as a circuit executed in spacetime.An error-correcting process needs to be able to filter out noise introduced into the system by extracting entropy.Thus, the corresponding circuits are circuits of quantum channels rather than unitaries.It is useful to consider channels that simultaneously act on classical and quantum degrees of freedom, even though these can always be embedded into purely quantum channels.Mathematically, such a quantum/classical hybrid channel is a tensor where every classical or quantum degree of freedom, either at the input or the output of the channel, corresponds to one index.More precisely, a qu-d-it is represented by a pair of d-dimensional indices, one for the ket and one for the bra part, whereas a classical d-it is just a d-dimensional index.For example, a channel with one quantum input and one classical input, and two quantum outputs and one classical output can look like: where the time direction is from bottom to top, like everywhere in this paper.
A proper channel needs to fulfill two conditions: First, it needs to be completely positive: For every fixed value of the classical indices, block all ket indices and all bra indices such that the tensor becomes a matrix.This matrix has to be non-negative, for example, In this context, the matrix M is also known as the Choi matrix.Second, it needs to be trace preserving: When closing all quantum output (double-)indices with a trace, and all classical output indices with a sum, we obtain a trace and sum at all classical and quantum input indices, for example, Here the black dot is the δ-tensor in Eq. (4) with one index, that is, a vector with all entries equal to 1.For more discussion on representing quantum-classical hybrid channels as tensors, see Ref. [27].
In topological QEC, we demand the circuit to be geometrically local.Only then it is fair to assume that also the noise occurring in the process is local.The great achievement of topological QEC is fault tolerance with respect to arbitrary local noise, and thereby any noise that is possible.We will refer to this type of QEC, where the complete circuit of quantum/classical channels is geometrically local, as fully local QEC.Topological QEC has the additional property of being uniform in spacetime, or at least to scale in a uniform way.Fully local topological QEC is not only of practical but also of fundamental physical interest since it might provide a model for the process of cooling a topologically ordered material.Fully local QEC can also be viewed as self-correction using engineered dissipation, formulated in discrete time.Examples for fully local QEC circuits are given by cellular automaton decoders [28].While fault tolerant fully local decoders are known exist in 4 + 1 dimensions, the situation is unclear in 3 + 1 and 2 + 1 dimensions.
Since the feasibility of fully local topological QEC in low dimensions is an open question, we consider quantum-local QEC as a second type of topological QEC, where only the quantum part of the circuit is assumed to be local.Quantum-local QEC consists of a geometrically local circuit of channels with additional open classical inputs and outputs.These inputs and outputs are then coupled to a purely classical decoder that is not implemented by a classical circuit in the same spacetime, but treated as a black box that can be evaluated instantly and without noise.In practice, the efficiency of this decoder is of course still of great importance, and any reasonable decoder should be executable in at most a polynomially larger spacetime.An example for this is minimum-weight-perfectmatching decoding of the toric code: The quantum parts, namely the stabilizer measurements and corrections, are local, while the classical decoding algorithm has more-than-constant runtime even if we allowed for instant non-local communication.From a fundamental point of view, quantum-local QEC is not scalable with a fault tolerant threshold.This is because for large enough system sizes the quantum circuit has to wait for the results of the decoder, and during this waiting time additional errors accumulate.Nonetheless, quantum-local QEC might have a practical impact, since current implementations of qubits are by orders of magnitude larger, slower, and noisier, than classical information technology.A toy example for quantum-local QEC in a 1 + 1-dimensional spacetime looks like D . . . . . ., (20) where we have semi-transparently drawn some of the classical bonds connecting the circuit and the decoder D, and omitted the remaining ones.Note that for a real topological error-correcting circuit we would need at least 2 + 1 spacetime dimensions.The shown example has a special layout where we first apply only hybrid channels without classical inputs for a time T ∼ L. Physically, such hybrid channels are known as instruments in quantum information theory and describe measurements, which are 2-qu-d-it measurements in the example above.We will refer to the recorded classical outputs/measurement results as spacetime syndrome.Then, at time T , we perform a constant-depth correction layer of quantum channels with an additional classical input, which are singlequ-d-it operators in the example above.The inputs to these correction channels are obtained from applying the decoding algorithm D to the spacetime syndrome.
Note that in general, corrections could also be applied in every time step like measurements, and not only after a time T ∼ L. This might be necessary for example for topological error correction based on nonabelian phases.However, for all examples considered in this paper, a layout as in Eq. (20) works.

Imaginary versus real time
In topological quantum computation, we store information in the ground space of topologically ordered models defined on spatial configurations of non-trivial topology.In order to perform logical operations we change the topology, either by adiabatic variation of the model parameters or by code deformation.It is in principle possible to perform logical operations by only changing the topology of some bare spatial manifold, for example by physically performing a Dehn twist on a torus and using Pachner moves to undo the associated distortion of the lattice.However, the set of accessible logic gates becomes much richer if we introduce defects, such as boundaries, anyons, domain walls, twist defects, and so on.We refer to such defects as computational defect to stress that they serve a very different purpose from the syndrome defects introduced in Section 2.1.Computational defects are also necessary for implementing computation in practice where we need to faithfully embed the topological manifolds into the Euclidean space we happen to live in.Consider the following two examples of processes involving defects, with time flowing from bottom to top, The left side shows a process where two of four anyons on a disk are exchanged. 1The right side shows a code on a rectangle with two different types of boundary like the surface code, blue at the back and front and green on the left and right.An anyon is moved from the green boundary on the right to the green boundary on the left.The operations implemented on the logical quantum degrees of freedom only depend on the topological phase of the bulk, boundaries, anyons, etc.Since the phase is a ground state property, it is captured by a path integral in a spacetime with an imaginary time direction, that is, with a Euclidean signature.Now assume we are given a Euclidean fixed-point path integral for the bulk, boundary, anyons, and other computational defects involved.The logical operations corresponding to a spacetime process are obtained by simply evaluating this path integral, which can be done for a minimal cellulation.Note that at the blue and green boundaries in Eq. ( 21), the tensor-network path integral is terminated without open indices, possibly by introducing some extra tensors and bonds.There are different choices for such a termination corresponding to different physical boundary conditions, and we will thus refer to these boundaries as physical boundary.In contrast, at the gray-red boundaries at the bottom and top we simply cut the tensor network resulting in open indices such that we get open indices, and evaluating the tensor network yields a state on this boundary.We call these boundaries spatial boundaries, as discussed in Section 2.1.So the evaluation yields a linear operator from the bottom to the top open indices of the path integral.This operator is only non-zero inside the ground state subspace at both input and output, and restricted to this ground state subspace yields the logical operation.
In other words, performing topological quantum computation is the same as executing the imaginary time evolution of some topological phase on some spacetime manifold, possibly including computational defects.However, in the real world, we can only perform real time evolution.Real time evolution can be described by a tensor-network path integral as well, namely as a unitary circuit.However, the tensors of the imaginary time path integrals are not at all unitaries, and therefore it is impossible to execute the Euclidean path integral in the real world.In this paper, we will understand how topological QEC is precisely a way to circumvent this impossibility by enriching the Euclidean path integral with syndrome defects.Namely, a topological QEC protocol together with the according corrections effectively performs a fixed-point imaginary-time evolution through a realtime evolution, when restricted to the ground-state subspace.As argued in Section 2.2, the resulting realtime path integrals will in fact not be unitary but circuits of quantum/classical hybrid channels.
For fully local QEC, the overall QEC protocol defines a dissipative circuit consisting of CPTP maps, and defines a real-time dissipative path integral.We will now propose a very direct way in which a dissipative circuit representing a topological QEC protocol should be related to an imaginary-time fixed-point path integral of the underlying topological phase.More precisely, we conjecture that this relation holds for known fully local QEC protocols in 4 + 1 dimensions [28], and propose it as a criterion for hypothetical fully local protocols in lower dimensions.Note that this is not the relation that we use to construct and analyze codes in this paper.To relate the real and imaginary-time path integrals in this direct way, we look at the spectrum of the transfer operator.The transfer operator is the operator consisting of one time slice of the path integral, or one time period of the circuit.When viewing the path integral as a tensor network, the transfer operator is a projected entangledpair operator (PEPO).In an imaginary-time fixedpoint path integral, this transfer operator is a projector onto the l-dimensional ground state space.Away from the fixed-point, the set of the highest l eigenvalues2 is contained inside an interval that shrinks exponentially with the system size L, and the remaining eigenvalues are separated by a gap that is lower bounded by a constant independent of L. The operator consisting of the path integral on a patch of both spatial and temporal size ∼ L, corresponding to the product of ∼ L times the transfer operator, thus converges to the ground state projector exponentially quickly in L.More generally, the operator corresponding to the path integral on some topologically non-trivial spacetime converges to the groundstate projector followed by some logical gate acting on the ground-state space.
We propose that part of this spectral behavior directly carries over to a real-time dissipative circuit corresponding to a fully-local QEC dissipative circuit.Namely, the highest-magnitude eigenvalues3 are still contained within an interval shrinking exponentially with L, and the operator corresponding to a circuit with non-trivial spacetime topology equals that of the imaginary-time path integral inside the ground state eigenspace and in the thermodynamic limit.Outside of the ground state space, however, the real-time path integral has a different spectral behavior from the imaginary-time path integral: There, the gap of a real-time QEC circuit must shrink at least like L −1 due to the the causality restriction of a circuit, or in other words, the finite propagation speed of information.Namely, if we insert an "error" operation of size L into the circuit, then it takes time L to correct this error and return to the steady state.In contrast, a gapped operator returns to the steady state from any starting point at a system-size independent rate.Note that despite the closing gap, the ground state space is still well distinguished from the rest of the spectrum, since the shrinking of the ground state interval is exponential instead of polynomial.We conjecture that fully local QEC protocols in 4+1 dimensions such as in Ref. [28] indeed have the spectral behavior described above, even after we add arbitrary perturbations below some threshold.In contrast, imagine a local decoder without threshold, such as locally matching nearest-neighbor syndromes in the 2 + 1-dimensional toric code.Here we expect that the exponential degeneracy of highest-magnitude eigenvalues in the transfer operator breaks after adding arbitrarily small perturbations.
The direct relation suggested above only applies to full-local QEC which so far is only known to exist in unphysical dimensions, and also does help much with constructing such QEC protocols.Thus, in this paper, we will use a more specific relation that does not take into account the classical decoder: Namely, for a QEC circuit containing "syndrome" measurements, we consider this circuit post-selected on a configuration of measurement outcomes.This yields a tensornetwork path integral that equals an imaginary-time path integral.The configuration of measurement outcomes corresponds to a pattern of defects inside this path integral.

From path integrals to circuits
In this section we describe an explicit general method to construct topological QEC circuits from topological fixed-point path integrals.In fact, we will only construct the quantum part of the QEC circuit.Which classical decoder works depends on the nature of the syndrome defects used.However, for all examples in this paper, the syndrome defects are of a homological nature.We propose that in these cases a decoder based on minimum-weight matching works.
We start by putting the path integral on some regular lattice and choosing a time direction.Then we interpret the tensor network as a geometrically local circuit of operators, where each operator corresponds to a single tensor, or a patch of a few tensors.The indices of each tensor or patch are divided into input and output in accordance with the chosen time direction.This can always be done, however the resulting operators, like are not in general unitaries, or equivalently, stacking two copies does not result in a channel that is normalized as in Eq. ( 19), In fact, it does never happen that all operators are unitary, since the operator corresponding to a full layer of imaginary-time evolution is a projector of low rank, and thus not a unitary.Even though T 1 does not define a channel, it can always occur as part of an instrument.To this end, we choose further tensors T 2 , T 3 , . .., that we combine into one single tensor using an additional classical output index, We then use this tensor to define an instrument, The small dot on the right denotes a δ-tensor as defined in Eq. ( 4), though here it serves a different function and the bond dimension can be different from 2.
The normalization condition in Eq. ( 19) of this instrument reduces to the following condition for T : In other words, we are looking for tensors T 2 , T 3 , . .., such that the collection T = (T 1 , T 2 , T 3 , . ..) forms an isometry.
We now turn the fixed-point path integral into a circuit of instruments as in Eq. (25).If we happen to always get the trivial measurement outcome corresponding to T 1 , then we have successfully executed the imaginary-time fixed-point path integral.However, if some of the outcomes are non-trivial, we have performed another path integral including some tensors T 2 , T 3 , . ... In this case we need to apply corrections such that the corrected time evolution is equivalent to that with only T 1 .In order to be able to do this, also the non-trivial outcomes must correspond to an exactly solvable fixed-point path integral of some sort.This is where we use the syndrome defects such as anyons: We choose T 2 , T 3 , . . .such that each of these tensors corresponds to a piece of fixed-point path integral that includes one or more segments of syndrome defect.Then every configuration of classical outputs corresponds to a topological path integral with a pattern of syndrome defects.The corrections are then implemented by classically controlled operations in the circuit that insert additional segments of syndrome defects depending on the classical control.This motivates the following informal definition.

Informal definition 1.
A fixed-point path integral code is a uniform geometrically local circuit of quantum channels with additional classical inputs and outputs, such that the following holds: • When fixing a configuration of classical inputs and outputs, the circuit becomes a mixed-state tensor-network path integral.This path integral is a stack of two copies of the same (pure-state) path integral, with one of them complex conjugated.
• This path integral is (in the same fixed-point phase as) a fixed-point path integral for a topological phase, including a pattern of syndrome defects.This pattern only depends locally on the classical inputs and outputs.
The phase of a fixed-point path integral code is the phase of the underlying topological path integral, with the trivial pattern of syndrome defects.Two codes are considered equivalent if they are in the same phase, that is, the underlying path integrals (without defects) are related by local tensor-network equations.
In order to turn a fixed-point path integral code into a completely specified process, we have to couple the classical inputs and outputs to a classical decoder D. Very vaguely speaking, the resulting process is error correcting if D yields a total defect pattern (formed by the outputs and inputs) that is equivalent to the trivial one.If there is noise, the total defect pattern does not fulfill the local constraints, so instead we take the closest defect pattern that does.More concretely, let us give a decoder that works if the defect pattern form (co-)cycles, which is the case for all examples given in this paper.This can be viewed as a generalization of decoding the toric code in the presence of measurement errors [2].Proposition 1.A fixed-point path-integral code whose syndrome defects are (co-)cycles can be turned into a complete fault tolerant process as follows.The overall circuit layout is that of Eq. ( 20), where we first record measurement outcomes for a time T ∼ L, and then perform corrections at time T .Here, T ∼ L denotes that T scales proportional to the linear system size L, for example if we put the code on an L × L torus.Thereby, we need to insert enough controlled operations at time T to be able to close off any measured defect pattern.The classical decoder D is given as follows: 1. Consider the (co-)chain(s) corresponding to the recorded spacetime syndrome by definition of the fixed-point path integral code.Choose a minimum-weight fix turning the (co-)chain(s) into (co-)cycle(s).Thereby, treat the time-like boundary at time T as "open", such that (co-)cycles can freely terminate there.In contrast, treat the initial time-like boundary at time 0 as "closed", such that (co-)cycles are not allowed to terminate there.
2. Consider the endpoints of the (co-)cycle(s) at time T .Choose a set of defect segments at time T that together with the fixed (co-)cycle(s) in the spacetime forms homologically trivial (co-)cycle(s).This set of defects determines the input to the classically controlled correction operations.
Let us give a rough argument for why this process has a fault tolerant threshold under local noise, a detailed proof will appear in future work.If we perform the circuit without noise, then the classical outputs correspond to a defect pattern consisting of (co-)cycle(s).Otherwise the path integral evaluates to zero as in Eq. (14), and the corresponding configuration of outcomes is measured with probability zero.However, if we perturb the circuit by adding (weak) noise, the (co-)cycle(s) are (slightly) broken.We find that (1) the probability that they are broken everywhere inside a connected region is exponentially small in the size of that region, (2) two cycles of different homology classes differ inside a region of at least size ∼ L, and (3) the number of connected regions of size L is at most exponential in L. Thus for weak enough noise, the probability for the minimumweight fix to yield the wrong cohomology class is exponentially small in L. This loop-counting argument is analogous to the one in Ref. [2].
For all examples in this paper except for Section 4.1, the syndrome defects are anyon worldlines.In this case, the correction operators closing the spacetime string net pattern at time T are known as string operators.Fixing the string net pattern in the presence of noise means pairing up the string endpoints in spacetime.A polynomial-time algorithm solving this problem is known as minimum weight perfect matching [29].
As we have seen, it is the task of the decoder to perform corrections that close off the syndrome defects in such a way that it is equivalent to the empty syndrome.Thus we see that the phase of a code alone determines the operation that the code performs on the logical space.This holds whenever we use the code as building block in some larger protocol of topological quantum computation, which may involve defects, boundaries, interfaces to other codes, etc.

Known codes in terms of path integrals
In this section, we consider four different examples of fixed-point path-integral codes, which we all find to be equivalent to existing codes, namely the stabilizer toric code, subsystem toric code, CSS honeycomb Floquet code, and honeycomb Floquet code.The first three examples are all based on the toric-code path integral introduced in Section 2.1, which we put on different spacetime lattices with different choices of time direction.The fourth example differs from the previous ones by only a change of basis of the tensornetwork path integral.

Stabilizer toric code
As a first example let us consider the first of all topological error-correcting codes, namely the toric code on a square lattice [1,2].The underlying tensornetwork path integral is the toric-code path integral from Section 2.1 on a cubic lattice, whose unit vectors we call x, y, and z.The time direction t is coincident with z, where the background cubic lattice is in orange and the tensor-network diagram is in black.We now view the tensor-network path integral as a circuit of operators, where each operator corresponds to one or a few tensors.There are two types of operators, as marked above in semi-transparent blue.Both operators act on 4 qubits that correspond to t-directed bonds in the tensor-network diagram.Specifically, there is an operator T 1 at each xy face, and an operator V 1 at every t edge, Note that these diagrams are identical to well-known ZX diagrams for the vertex and plaquette terms of the toric code [30,31,32].In order to get the decomposition, we need to split up all the 4-index Z 2 tensors at the xt and yt faces into two 3-index Z 2 -tensors, As shown, this splitting up can be represented geometrically as dividing each plaquette into two triangles.After this, V 1 corresponds to a t edge together with the adjacent triangles.As shown (see also Eq. ( 9)), there are two different ways to split up the plaquette/tensor.As we will discuss more later, these correspond to different orderings in which V 1 at neighboring t edges act on the same qubit.Dually, we need to split each 4-index δ-tensor at a x or y edge into two 3-index δ-tensors.Geometrically, this corresponds to splitting a 4-valent edge into two 3-valent edges separated by a 2-gon face yielding a configuration as shown in Eq. (8).After this, T 1 corresponds to a xy face together with the adjacent 3-valent edges.
Neither T 1 nor V 1 are unitary, which is not a surprise given that the path integral represents an imaginary, and not a real time evolution.In fact, T 1 is the projector onto the +1 eigenspace of the Pauli operator Z 0 Z 1 Z 2 Z 3 , and V 1 the projector onto the +1 eigenspace of X 0 X 1 X 2 X 3 .To fix this, we define a second projector T m corresponding to a xy face carrying a segment of m worldline, This way, T 1 is extended to an isometry T, T defines an instrument I[T] via Eq.(25), which is in fact just a projective Z 0 Z 1 Z 2 Z 3 measurement.Dually, we can define an operator V e carrying an e anyon segment along a t edge, This gives rise to an isometry V, V yields an instrument The presence of the Hadamard matrix, seemingly spoils the duality between Eq. (33) and Eq.(30).This is explained by the fact that in Eq. ( 25) we use a δ-tensor for both I[T] and As mentioned earlier, the way in which we divide each plaquette into two triangles and each 4-valent edge into two 3-valent edges determines the ordering in which we act on the qubits.A straight-forward way to choose an ordering is to checkerboard-number each vertex and t edge with x/y-coordinate ax + by by a + b mod 2. Then we first act with all the 0labeled V operators (which act on mutually disjoint quadruples of qubits) and then with all the 1-labeled ones.Dually, we can checkerboard-number cubes and xy faces according to their x/y coordinate and act with 0-labeled T operators first.One full period of the circuit then consists of four rounds of instruments, Geometrically, this corresponds to dividing each xt and yt plaquette along a diagonal edge connecting a 0 vertex at time T to a 1 vertex at time T − 1. Dually, we also split each 4-valent edge by inserting a 2-gon that is adjacent to a 0 cube at time T and a 1 cube at time T − 1.The following shows a section of this modified cubic lattice (this time in black instead of orange), Here we should imagine the 1-labeled xy faces and the adjacent edges being bent slightly towards the positive t direction.The fact that all microscopic details of the protocol can be captured by a modified or refined cellulation also has at least one practical application: When decoding the syndrome, it is natural to perform minimum-weight matching on precisely this spacetime lattice or its Poincaré dual: If we assume single-qubit circuit-level noise acting with a Pauli operator on each qubit at each time step in the protocol with a constant probability, then the matching weight in this lattice is proportional to the probability of the corresponding error configuration.Note that, since all the operators commute, applying them in any order defines a valid spacetime cellulation.For example, consider the alternative ordering This yields a modified cellulation where the 1 xy faces are replaced by faces formed by four diagonals.That is, the 0 cubes remain the same, but the 1 cubes have their 0 vertices shifted by +1 in t direction.The following shows the original (gray) and modified (black) 1-cubes: In addition to changing the ordering of measurements, we may put the toric code on different spatial cellulations.In this case the spacetime cellulation is based on the cartesian product of the spatial cellulation with the regular 1-dimensional lattice.Further, different decompositions of a stabilizer measurement into CX gates acting on an ancilla also yield different cellulations.As an intermediate step to obtain these cellulations, we may translate the measurement circuit into a ZX diagram, which is a standard technique in the literature [30].Then, we replace every X-type tensor with a face and every Z-type tensor with an edge.The representation of the circuit as a spacetime cellulation also has a practical application: The spacetime cellulation provides a natural lattice on which the classical decoder performs minimum-weight matching, since individual Pauli-X or Pauli-Z errors at specific moments in time correspond to different faces and edges in this lattice.
Let us briefly describe the general decoder of Proposition 1 for the present code.We first record the spacetime syndrome until the time T ∼ L that we assume to be after the plaquette measurements, where the associated spatial slice of the lattice is a square lattice.This syndrome is a subset of t edges and xy faces forming an e 1-chain and a m 2-cochain inside the (modified) cubic spacetime lattice.The classical decoder D now finds a minimum-weight set of edges (faces), such that flipping these edges (faces) fixes the e 1-chain (m 2-cochain) to a 1-cycle (2-cocycle).It is important to note that the flipped edges (faces) can be any edges (faces) of the modified cubic lattices and not only t edges (xy faces).Thereby the fixed e 1-cycle (m 2-cocycle) is allowed to terminate at the square-lattice spatial slice at time T .To perform the corrections, we insert a 2-gon and a 2-valent edge in between every time-T x and y edge and the adjacent time-(T + 1  2 ) xt and yt face.Then D chooses any subset of the inserted 2-valent edges (2-gon faces), such that these edges (faces) together with the fixed spacetime e 1-cycle (m 2-cocycle) forms a homologically trivial 1-cycle (2-cocycle) that does not terminate on the spatial slice at time T .At every chosen 2-valent edge (2-gon face), we put an e (m) worldline, such that the overall defect configuration is equivalent to the trivial one, for example, .(39) As shown, adding these the worldlines corresponds to inserting 2-index δ and Z 2 -tensors into the circuit, which are single qubit Pauli operators, Note that in the absence of noise, the measured e 1-chain (m 2-cochain) is a 1-cycle (2-cocycle) with probability 1.Since e (m) is only supported on t edges (xy faces), the measured syndrome consists of a subset of infinite (dual) lines in t direction.Thus, future measurement outcomes are determined by the past history.In particular, if we start with the ground state, we deterministically measure the trivial syndrome.This property is not necessary for fault tolerance and is the key qualitative difference between the stabilizer toric code and the subsystem and Floquet versions thereof that we will look at in the following.

Subsystem toric code
The subsystem toric code is a topological subsystem code developed in Ref. [21], that only involves 3-body measurements.The code has qubits located on both vertices and edges of a square lattice.The gauge checks consist of X 0 X 1 X 2 measurements involving either the three qubits near the top-right or the three qubits near the bottom-left corner of each square, and Z 0 Z 1 Z 2 checks involving the three qubits near the top-left or bottom-right corner.The subsystem code is defined by these gauge checks alone, but in order to obtain a concrete QEC protocol we need to choose a periodic schedule in which we measure them.The QEC protocol that we reconstruct in this section corresponds to a schedule where we alternatingly mea-sure first all X and then all Z stabilizers.The underlying path integral is still the toric-code path integral an a specific spacetime cellulation.This cellulation is similar to that of stabilizer toric code on a regular triangular spatial lattice, and obtained from the latter by a simple modification.For the stabilizer toric code we would consider a spacetime cellulation consisting of triangle-prism volumes, This way, the operators T 1 at the xy faces are already 3-qubit, but the operators V 1 at the t edges are 6-qubit.However, V 1 can be split up into two 3-qubit operators V a 1 and V b 1 by the following trick.We choose one spatial direction x aligned with one third of the edges, and refer to the orthogonal direction as y.Then at every spatial vertex, we pair up the two adjacent triangles whose centers are located in the positive and in the negative y direction, In the spacetime cellulation, we get a pair of triangle prisms adjacent to each t edge.We simply split up each 6-valent t edge into two 3-valent edges a and b, such that the two adjacent prisms become one single volume, As for the stabilizer toric code we split each rectangle face into two triangles.Then we define V a 1 and V b 1 as the operators corresponding to a and b together with the three adjacent triangles, for example We also introduce versions V a e or V b e where a or b carries an e anyon, and the according instruments In total, the QEC circuit consists of X 0 X 1 X 2 and Z 0 Z 1 Z 2 measurements on different triples of qubits, which are located at the edges of a triangular lattice.After drawing a square lattice (black) over the triangular lattice (gray) as follows, we recover the subsystem code as presented in Ref. [21] with qubits on the edges and vertices, and measurements at the corners.
The general decoding procedure of Proposition 1 is similar to the stabilizer toric code.The spacetime lattice in which we find a minimum-weight fix of the e 1-chain (m 2-cochain) is now the modified lattice with volumes as in Eq. (43).The spatial slice of the lattice is a triangular lattice, and the correction works in the same way.The crucial qualitative difference to the toric code is that the edges where V e measurements are performed come in a, b pairs forming little loops that support small 1-cycles.Thus even in the absence of noise measurements are non-deterministic and the results (x, y) and (x + 1, y + 1) (mod 2) at an a, b pair both occur with probability 1  2 .If we start with the ground state, then the measured e 1-cycle is a random subset of a, b-loops.

CSS honeycomb Floquet code
As a third example, we consider the recently discovered CSS honeycomb Floquet code [13,14,15].This code is defined on a hexagonal lattice where each face is colored such that each vertex is adjacent to one red (r), one green (g), and one blue (b) face.There is one qubit at every vertex.The code is defined by a dynamic protocol consisting of 6 rounds of measurements that we label rX, gZ, bX, rZ, gX, bZ.In the round labelled "fG", we measure the operator G 0 G 1 on the two qubits at the vertices of each edge whose two adjacent faces are not colored "f".Note that in every round, each qubit is involved in one 2-body measurement.To obtain this code from our path-integral picture, we start with the toric code path integral on a cubic spacetime lattice, just as for the stabilizer toric code.The only difference is that instead of z, we choose t = x + y + z as the time direction, The operators of the circuit are now individual tensors at the edges and faces as marked in blue above.
Traversing the path integral in the t direction gives a natural direction to each tensor, acting as 2-qubit operators Neither T 1 nor V 1 are unitaries.In fact they are projectors onto the +1 subspace of 2-qubit operators Z 0 Z 1 and X 0 X 1 .Our construction proceeds by defining versions T m and V e of these operators including an anyon worldline segment.To this end, we slightly modify the cubic lattice.We split each face into two triangles by diagonal 2-valent edges along the x + y, x + z, or y + z direction, respectively.Dually, we split each 4-valent edge into two 3-valent edges separated by a 2-gon, such that the 2-gons are perpendicular to the x + y, x + z, and y + z directions.A volume of this slightly modified cubic lattice thus looks like Note that each edge of the cube gives rise to a 2-gon face, but this 2-gon is not always part of the boundary of the modified cube.In this modified lattice, T 1 now corresponds to a 2-gon together with the two adjacent 3-valent edges.T m is the same with an m anyon worldline perpendicular to the 2-gon, Together with T 1 , we obtain an isometry T, The according instrument Dually, V 1 now consists of a 2-valent diagonal edge together with the two adjacent triangles.V e is the same with an e anyon worldline segment along the diagonal edge, yielding an isometry The according instrument In principle, the spacetime cellulation fully specifies the combinatorics of the circuit formed by the instruments defined above.However, it is instructive to express the circuit in a more conventional form as a sequence of measurements acting on qubits located on a fixed spatial lattice.We start by decomposing the circuit into rounds of operators acting in parallel.Within one t = x + y + z period there are three different levels of vertices, which we will label 0/red, 1/green, and 2/blue, respectively, Accordingly, there are three levels of edges, 01, 12, and 20, and three levels of faces, 012, 120, and 201 (though the cube above only contains faces from two of the levels).So one t period of the circuit consists of 6 rounds of instruments: An appropriate spatial lattice on which the circuit acts can be obtained by projecting the 3-dimensional cubic lattice along the t direction.This yields a 2-dimensional regular triangular lattice such that the vertices of each triangle have different numbers/colors, .
The spacetime faces become rhombi in this spatial lattice, consisting of two triangles.
Each qubit corresponds to a time-like continued string of bonds in the tensor network/circuit diagram.The goal is to arrive at a circuit that consists only of 2-body measurements without any swap operations.This fully determines the time-like strings by the way the inputs and outputs are paired in Eq. (50) and Eq.(52).Geometrically, these time-like strings are sequences of adjacent faces and edges.In the space projection, there is one such sequence for every triangle F as follows, As we have seen, there is one qubit associated to each triangle.For each edge, the instrument I[T] acts on the qubits at the two triangles adjacent to its projection.For each face, I[V] acts on the qubits at the two triangles contained in its projection.Note that the instruments I[T] 01 act on the same pairs of qubits as the instruments I[V] 120 , and analogous for cyclic permutation of the numbers/colors.Taking into account that I[T] is a Z 0 Z 1 measurement and I[V] is a X 0 X 1 measurement, we can rewrite Eq. (54) as After going to the dual hexagonal lattice, we recover the CSS honeycomb Floquet code as introduced in Refs.[13,14,15].Let us briefly describe the general decoding procedure in Proposition 1 for the present code.The spacetime lattice in which we fix the measured e 1-chain (m 2-cochain) is the rotated modified cubic lattice.If we choose the correction time T after the I[T] 01 measurements, the spatial slice of the lattice looks like . (58) The fixed spacetime e 1-cycle (m 2-cocycle) terminates at a 0-cycle (2-cocycle) on this spatial lattice.It is closed in a homologically trivial way by inserting 2-valent edges (2-gon faces) potentially carrying e (m) anyon worldlines similar to Eq. (39).The static toric code on this spatial lattice also coincides with the instantaneous stabilizer group of the code at time T .In contrast to the stabilizer and subsystem toric code, the edges (dual edges) where measurements potentially yield e (m) anyon worldlines are not aligned with the t direction.Furthermore, the graph formed by these edges (dual edges) is much more connected.
In the absence of noise, any 1-cycle (2-cocycle) supported these edges (dual edges) is measured with equal probability.So as for the subsystem toric code the measurement results are non-deterministic, but now they are even more fluctuating and may include homologically non-trivial loops.This is not a problem for decoding though, since these homologically nontrivial loops are recorded and can be corrected.The following three pictures illustrate a typical syndrome in the absence of noise on a spacetime patch for the toric code, subsystem toric code, and CSS honeycomb Floquet code, Stabilizer Subsystem CSS honeyc.
(59) The syndrome is in red and boundary conditions are periodic with left and right identified.The illustrations differ from actual syndromes in that the spacetime dimension is 2 instead of 3, the underlying lattice is not shown, and we only show one part (either e or m) of the syndrome.Note that if we start in the code space (with empty syndrome at the bottom boundary), the stabilizer toric code syndrome will be empty, the subsystem toric code syndrome consists of a random set of "bubbles", and the CSS honeycomb Floquet code syndrome can contain homologically non-trivial loops as shown.
We have seen that the CSS honeycomb Floquet code and the stabilizer toric code are both based on the cubic-lattice toric code path integral, but with different time directions.If we superimpose the two cubic lattices such that the time directions align, the path integrals are different.Nonetheless, they are in the same fixed-point phase as defined at the end of Section 2.1.The tensor-network equations applied to get from the cubic lattice to the rotated cubic lattice are the equations imposing topological invariance, for example, Eq. (9) and Eq.(10).So the time evolutions of the two codes postselected to the trivial 0 (or +1 ∈ {±1}) measurement outcomes are locally equivalent.In both codes, the non-trivial 1 (or −1 ∈ {±1}) outcomes correspond to e or m anyon worldline segments.However, the positions of these segments in spacetime are different for the two codes.The subsystem toric code, as well as the honeycomb Floquet code discussed in the following section, are related in the same way.

Honeycomb Floquet code
In this section, we consider the honeycomb Floquet code introduced in Ref. [11].This is a code defined on a hexagonal lattice whose faces are rgb-colored like for the CSS honeycomb Floquet code.The code is defined by a QEC protocol consisting of three rounds of measurements that we label r, g, and b.In the round labeled "f", we apply a 2-body measurement involving the two qubits at the vertices of every edge whose two adjacent faces are not colored "f".The type of measurement depends on the direction of the edge: The edges of a regular hexagonal lattice point in three different directions, and the performed measurement is XX, Y Y , or ZZ depending on this direction.The underlying tensor-network path integral will be referred to as the honeycomb path integral.It has the same geometry as the cubic-lattice toric-code path integral used in previous sections.However, it involves a third kind of tensor, (60) We will refer to this tensor as C-tensor since it is related to the two-dimensional real algebra of complex numbers.Note that the tensor depends on a choice of arrow direction at each index, which we indicate by an arrow at the incoming indices.The honeycomb path integral has δ-tensors at every z edge and every xy face, Z 2 -tensors at every x edge and yz face, and C-tensors at every y edge and xz face, The arrow directions of the C-tensors are chosen to point in the positive x and z direction, respectively.The honeycomb path integral can be decorated with two types of topological syndrome defects, located on 1-cycles and 2-cocycles.To this end, we define a charged version of the C-tensor, a b c . . .
Then, at every edge of the 1-cycle, we replace the associated tensor with the charged version thereof.We do the same for the faces of the 2-cocycle.The tensors satisfy tensor-network equations such as: (63) Using these equations, we can locally change the 1cycle and 2-cocycle.For example, we can add the boundary of a xz face to the 1-cocycle as follows, (64) Note that global prefactors are irrelevant due to the quantum mechanical interpretation of the path integral.Also note that the honeycomb path integral and its defect configurations are only defined on a fixed cubic background lattice.
We will now turn the honeycomb path integral into a circuit of instruments using the same time direction as in Section 3.3 when discussing the CSS honeycomb Floquet code.δ-tensors and Z-tensors become operators T 1 and V 1 yielding instruments I[T] and I[V], which are Z 0 Z 1 and X 0 X 1 measurements as before.The operator W 1 corresponding to a single C-tensor, will be complemented by another tensor is a projective Y 0 Y 1 measurement.We now need to turn a configuration of measurement outcomes into a configuration of defects on the cubic lattice.To this end, we apply tensor-network equations to move the "charge" from the middle 2-index tensors in Eq. (49), Eq. (51), or Eq.(66) to the tensors of the original honeycomb path integral.For example, for the operator W x , this results in a "charge" at the neighboring δ and Z 2 -tensors, but also at the C-tensor itself, So the W x measurement outcome corresponds to three different syndrome defect segments being present.For a W x operator located at a xy face, we get 1-cycle defect segments on two adjacent edges, but also a 2cocycle defect at the xy face itself, Note that also in the CSS honeycomb Floquet code in Section 3.3, a V e operator at a face corresponds to an e defect segment at a diagonal edge, which is equivalent to e defect segments at two boundary edges like above.However, in this case there is no m defect segment at the face itself.Dually, for a W x measurement outcome at an edge, we obtain 2-cocycle defects at two adjacent faces as well as a 1-cycle defect at the edge itself.The same is also true for T m and V e instead of W x , ∝ , ∝ .
(69) All in all, we find that the condition of Definition 1 still holds, just that now each measurement outcome corresponds to multiple defect segments of different types.
Let us now look at the combinatorics of the resulting circuit.The overall geometry is as for the CSS honeycomb Floquet code in Eq. (54), just that the type of measurement now depends on the orientation of the edge or face and not on the time step: After projecting the cubic lattice along time as in Eq. (55), x, y, and z refer to the three different directions of edges in the resulting triangular lattice.The measurements at x01 and yz120 (and analogous pairs) act on the same pair of qubits and are in fact the same type of measurement.We thus find that the circuit repeats already after three rounds, yielding After going to the dual hexagonal lattice, we obtain the honeycomb code as presented in [11].
It has been argued in Ref. [11] that the honeycomb Floquet code is closely related to the toric code since the instantaneous stabilizer group of the former is equivalent to the latter.Here we will make this relation precise by showing that the underlying path integrals are in the same fixed-point phase.The sequence of tensor-network equations transforming the toric-code path integral into the honeycomb path integral (or vice versa) is as follows: We first insert a resolution of the identity, 1 = GG −1 at every bond.G is an invertible matrix that depends on the bond within a unit cell, but not on the unit cell.Then we contract each 4-index tensor with the four surrounding matrices G or G −1 , yielding a new 4-index tensor at that place.Note that this is just a complicated way of saying that the two tensor networks are equivalent up to a basis change at every bond.The matrices G are built from the Hadamard matrix H in Eq. ( 34), together with the following two matrices, (74) Due to Eq. (73), each H, S, or U matrix can be either on the right or on the left-hand side.Furthermore, two S matrices adjacent to a δ-tensor can be canceled, and the same for H and C, as well as for U and Z 2 : * = , = , * = .
(75) With this, we are now ready to find matrices G that transform the toric-code path integral into the honeycomb path integral.Each bond inside a unit cell can be specified by the involved edge a (either x, y, or z), the involved face b (either xy, xz, or yz), and the direction ± of the bond a → b relative to the x, y, or z direction.Thus, we need to specify 12 different matrices G(a, b, ±).As an ansatz, we set G(a, b, −) := G(a, b, +) * , and impose that every G is some product formed by H, S, and U .For each edge a, there are different choices for the two matrices G(a, . . ., +), such that the toric-code tensor together with the surrounding G matrices yields the according honeycomb tensor.For example, for a = x, we want to transform a toric-code δ-tensor into a honeycomb Z 2 -tensor.First, any of the two matrices G(a, . . ., +) may or may not contain S, since each G appears at two (±) indices and can be annihilated using the first of Eq. (75).Then, both matrices G(a, . . ., +) need to contain H in order to transform the δ-tensor into a Z 2 -tensor via the second of Eq. (74).Finally, each of G(a, . . ., +) may or may not contain U , due to the third of Eq. (75).This yields a set of possible choices for either matrix G(a, . . ., +) which we denote by (S)H(U ).The following table shows all potential G(a, . . ., +) for edges a or G(. . ., b, +) for faces b, a/b toric code honeycomb potential G(a/ . . ., . . ./b, +) .
(76) In order to find G(a, b, +), we write out all potential G(a, . . ., +) and G(. . ., b, +) and take any common element.A solution is given by So we have found that the toric code and honeycomb path integrals are in the same fixed-point phase.Next we notice that Eq. (74) and Eq.(75) still hold after we replace all δ, Z and C-tensors with their charged versions, at least up to a phase prefactor.Thus, the toric code path integral with a configuration of e and m defects is locally equivalent to the honeycomb path integral with the same configuration of 1-cycle and 2-cocycle defects.However, the original honeycomb Floquet code and its CSS version differ by the selection of defect segments corresponding to a measurement in the circuit: A face measurement in the CSS honeycomb Floquet code corresponds to the presence of an e defect segment at a diagonal edge, or an equvialent pair edges of the original lattice.A face measurement in the honeycomb Floquet code corresponds to the same e defect segments and an additional m defect segment at the face itself.The analogous holds for the edge measurements.So in other words, the direct equivalence of the original honeycomb Floquet code and its CSS version by local tensor-network rewriting only holds for the circuits postselected to +1 measurement outcomes, and not for the full circuit of instruments with arbitrary measurement outcomes.For both codes, the circuit postselected to arbitrary measurement outcomes is the toric code path integral with a pattern of e and m defects, but the locations of these defects depending on the measurement outcomes are different.
Note that the reduced time periodicity is closely related to the fact that the honeycomb path integral on a cubic lattice allows for a smaller choice of unit cell, namely one consisting of only one δ, one Z 2 , and one C-tensor.For example, consider an xy plane containing xy faces, and the honeycomb path integral restricted to this plane including the tensors at all xy faces, x edges, and y edges.When shifting this plane by 1  2 z, the tensors at z edges, xz faces, and yz faces form exactly the same tensor network on the Poincaré dual lattice, that is, shifted by 1  2 x + 1 2 y.So instead of {x, y, z}, we can choose {x, y, 1  2 x+ 1 2 y + 1 2 z} as a unit cell.When we instead consider these two planes shifted by 1  2 z for the toric code, we swap δ and Z 2 tensors in addition to going to the dual lattice.This has the same effect as inserting a duality domain wall (exchanging e and m anyons) in between the two planes.So with the new unit cell, the phase of both path integrals is a toric code with a rigid stack of duality domain walls perpendicular to z.The according exchange of e and m after one code cycle has already been observed in the honeycomb code [11].The halved unit cell is also responsible for the weak breaking of translation symmetry in the closely related Kitaev honeycomb model Hamiltonian [33].
Let us briefly discuss the decoding of Proposition 1 for the honeycomb Floquet code.Each spacetime syndrome maps to a 1-chain and 2-cochain in the cubic spacetime lattice.The novel feature compared to earlier examples is that a single measurement outcome corresponds to both 1-chain and 2-cochain segments.Apart from this, the decoding proceeds as usual by finding a minimum-weight fix of the spacetime syndrome and then closing the syndrome at a spatial slice at time T such as in Eq. (58).Defects along 1-chains or 2-cochains can be introduced by applying Pauli X, Y , or Z operators to the corresponding places in the circuit.Let us discuss when the syndrome 1-chain is broken at a specific vertex v, by looking at the measurements for which the boundary of the corresponding defect segments contains v.These include the measurements at the 6 faces in the cubic lattice for which v is the temporally first or last vertex, like for the CSS honeycomb Floquet code.However, they also include the measurements at the 6 edges indicent to v themselves.This is in accordance with the fact that a detection cell is formed by 12 measurements in the honeycomb Floquet code [34], but only 6 in the CSS honeycomb Floquet code [13].

New codes from tensor-network path integrals
In this section we use our path integral framework to construct two new dynamic error-correcting codes.First, we introduce a generalization of the CSS honeycomb Floquet code to 3 + 1 dimensions.Then we construct a non-Pauli dynamic code based on the doublesemion string-net model.

Floquet toric code in 3+1 dimensions
In this section, we use our method to construct a new Floquet code, namely a Floquet version of the toric code in 3 + 1 dimensions.As a stabilizer code, the 3-dimensional toric code is defined on a cubic lattice with one qubit at every face.There is one Z 0 Z 1 Z 2 Z 3 Z 4 Z 4 stabilizer acting on the qubits at the 6 faces adjacent to every volume, and a X 0 X 1 X 2 X 3 stabilizer acting on the 4 qubits adjacent to every edge.The ground state of the model is an equalweight superposition of Z 2 -configurations on all faces that obey a Gauss law at every volume.That is, it is an equal-weight superposition of 2-cocycles, which can be pictured as closed-loop configurations on the Poincaré dual lattice.Analogous to the ground state, the path integral representing the 3 + 1-dimensional toric code is given by a sum over all cellular 2-cocycles inside an arbitrary 4-dimensional spacetime cellulation.Such a cocycle is a configuration of Z 2 variables on all the faces, such that at every volume the sum of variables at its boundary faces is 0 (mod 2).These 2-cocycles can be pictured as closed-membrane configurations inside the 4-dimensional spacetime cellulation, which restrict to a closed-loop configuration at a spatial boundary.As a tensor network, the path integral consists of one δ-tensor at every face and one Z 2tensor at every volume, with bonds shared between pairs of adjacent face and volume.
We can also introduce defects inside the path integral.We will use two types of syndrome defects, namely line-like m defects, as well as membrane-like e defects. 4The e defects are placed on 2-cycles, and at every face of the 2-cocycle we replace the δ-tensor by the charged δ-tensor in Eq. (11).The m defects are placed on 3-cocyles, and at every volume of the 3-cocycle we replace the Z 2 -tensor by the charged Z 2tensor in Eq. (12).
To construct the Floquet code, we take a 4dimensional hypercubic lattice spanned by the four unit vectors w, x, y, z, and choose t = w + x + y + z as the time direction.The operators of the circuit are individual 4-index δ-tensors at the faces, and 6-index Z 2 -tensors at the cubes.The diagonal t direction allows for a natural interpretation of these tensors as operators by dividing their indices into inputs and outputs, The 4 indices of T 1 connect it to the four cubes adjacent to the face (in orange), whose position in the drawing should not be taken literal due to the 4dimensional nature.The 6 indices of V 1 connect it to the 6 faces of the cube.T 1 is a projector onto the +1 eigenspace of Z 0 Z 1 , whereas V 1 is a projector onto the intersection of the +1 eigenspaces of X 0 X 1 and X 1 X 2 .Since both T 1 and V 1 are non-unitary, we turn them into instruments using additional operators that include defect segments.In addition to T 1 at a face we define another operator T m that includes a line segment of m defect.To this end, we modify the lattice slightly by replacing each 4-valent face by a pair of 3-valent faces separated by a pillow-like volume, whose boundary is formed by these two faces only.T 1 then corresponds of the pillow-like volume together with the two faces, and T m is the same with the pillow-like volume carrying an m anyon segment, The drawn m worldline goes perpendicular to the pillow volume connecting the two adjacent 4-cells, and its positioning in the drawing should not be taken literal.T 1 and T m together yield a Z 0 Z 1 measurement I[T] as usual.
To turn V 1 into an instrument, we define three new operators, V 1e , V e1 , and V ee , corresponding to the absence or presence of two different e membrane defect segments.To this end, we divide the cube into three volumes along two internal 2-valent faces g and f .V 1e , V e1 , or V ee then correspond to an e membrane segment being present at either g, f , or at both.Specifically, in a cube with faces labelled like we choose f to have the same boundary as i 0 together with o 0 , and g with the same boundary as i 2 and o 2 .
The isometry resulting from combining the different V operators is given by As shown, V can be split up, such that I[V] consists of two consecutive measurements X 0 X 1 and X 1 X 2 .Geometrically, this corresponds to adding another internal 2-valent face h whose boundary is that of i 0 , i 1 , and o 0 together (or equivalently i 2 , o 1 , and o 2 ).Note that h does not carry a potential e defect segment.
The definition of V above depends on a choice of labelling the bottom faces of a cube by i 0 , i 1 , and i 2 , and of the top faces by o 0 , o 1 , and o 2 .In principle, any choice would yield a valid error-correcting circuit.However, we aim to obtain a circuit consisting of projective 2-qubit measurements acting on a fixed set of qubits without intermediate swap gates.The following choice achieves this goal, as will come clear later in this section.First, we divide the cubes into 8 different sorts labelled by p abc , and there will be a different choice for each sort.p ∈ {0, 1} labels whether the cube appears at an even (0) or odd (1) time step in the circuit.abc labels the three spanning directions {a, b, c} ⊂ {w, x, y, z} of the cube, ordered according to w, x, y, z.With this, i 0 , i 1 , and i 2 are the bottom faces with spanning directions ab, bc, and ca, respectively.If p = 0, then o 0 , o 1 , and o 2 are the top faces with spanning directions bc, ca, and ab.If p = 1, then they are given by ca, ab, and bc.For example, Eq. (80) shows the labelling for a 1 wxy cube.
In principle, the combinatorics of the circuit formed by the instruments I[T] and I[V] is fully specified by the 4-dimensional cellulation.However, it is instructive to give a more conventional description of this circuit in terms of measurements acting on fixed qubits on a spatial lattice.We start by decomposing the circuit into rounds of instruments that are applied in parallel.To this end, we notice that there are four different levels of vertices in the 4-dimensional cubic lattice along the t direction, which we label/color by 0/red, 1/green, 2/blue, and 3/yellow.Accordingly, there are four levels of faces, 012, 123, 230, and 301, and four levels of volumes, 0123, 1230, 2301, and 3012.So one time period of the circuit consists of 8 rounds of instruments, (82) To get an appropriate spatial lattice, we project the 4-dimensional cubic lattice onto 3-dimensional space along the t = w + x + y + z axis.To this end, we choose new basis vectors orthogonal to t.The projected 0 and 2 vertices then form a cubic lattice A with unit vectors x, y, and z.The 1 and 3 vertices form a second cubic lattice B shifted by 1 2 (x + y + z), such that the vertices of A are the centers of the cubes of B and vice versa.Within A, 0 and 2 vertices alternate in a checkerboard manner, and the same for 1 and 3 vertices within B. The projected edges have length 3  4 and connect each B vertex with the 8 corner vertices of the corresponding A cube, and vice versa.The edges of the A and B lattice themselves are not projected edges of the 4-dimensional cubic lattice.The following depicts a section of the lattice with four layers of vertices in y direction, projected edges in gray, edges of A and B in black, and edges connecting vertices of the two back layers dotted: The edges of A and B together with all the projected edges define a triangulation where each tetrahedron has one 0, one 1, one 2, and one 3 vertex.The projections of spacetime faces are rhombi consisting of two triangles.The projections of the spacetime cubes are (rhombic) cubes consisting of 6 tetrahedra, 3 lefthanded and 3 right-handed ones.If a cube is adjacent to a face, then one of the right-handed tetrahedra contains one of the triangles of the face.As usual, qubits can be identified by following the timeline of the bonds in the tensor-network/circuit diagram.There is one such timeline for every tetrahedron F that is right-handed relative to the vertex ordering 0123, .
Let F i,i+1,i+2 be the spacetime face whose projection is spanned by the (i, i + 1) and (i + 1, i + 2) edges of the tetrahedron, where all numbers are understood mod 4. Let F i,i+1,i+2,i+3 be the spacetime cube whose projection is spanned by the (i, i+1), (i+1, i+2), and (i + 2, i + 3) edges of the tetrahedron.Then, within a fixed t-period, the timeline of bonds is given by the following sequence of adjacent faces and cubes, To go from the face F i,i+1,i+2 to the face F i+1,i+2,i+3 inside the projection of the cube F i,i+1,i+2,i+3 , we have to either rotate left or right when looking in the direction i → i + 3. Since the tetrahedron is right-handed relative to the orderings 0123 and 2301 but left-handed for 1230 and 3012, we rotate right for i = 0 and i = 2, and right for i = 1 and i = 3.This fits our choice of labeling the faces of each cube by i 0 , . .., o 2 , which we have discussed in the paragraph after Eq. (81): As can be seen in Eq. (80), in order to go from i x to o x we turn either right or left in the spatial projection of the cube when looking from bottom to top.We turn left for even time steps (p = 0 which we identify with i = 1 or i = 3), and right for odd time steps (p = 1, which is i = 0 or i = 2).
As we have seen, there is one qubit associated to every right-handed tetrahedron.Each instrument I[T] at a spacetime face acts on the qubits at the two righthanded tetrahedra adjacent to the two triangles that are contained in the projection of the face.Alternatively, these two right-handed tetrahedra are the ones adjacent to the diagonal (i, i+2) edge of a (i, i+1, i+2) face, which is an edge of the A or B cubic lattice.Each instrument I[V] at a spacetime cube acts on the qubits at the three right-handed tetrahedra contained in the projection of the cube.Alternatively, these two right-handed tetrahedra are the ones adjacent to the diagonal So in total we obtain the following dynamic code.Consider two shifted cubic lattices A and B together with all length-3 4 edges connecting A and B, defining a triangulation whose vertices are 4-colorable as 0, 1, 2, or 3.There is one qubit at every right-handed tetrahedron.The sequence of measurements consists in 8 rounds, (87) In each round we measure either Z 0 Z 1 on the two adjacent right-handed tetrahedra adjacent to all edges of the specified type, or we measure X 0 X 1 and X 1 X 2 on the three right-handed tetrahedra adjacent to all edges of that type.Note that the rounds 0 and 4 (numbered starting from 0), as well as 2 and 6 in Eq. (87) are identical.
This Floquet code can be generalized to arbitrary triangulations with 4-colored vertices.In every round, we measure Z 0 Z 1 , Z 1 Z 2 , . . .Z i−1 Z i on the set of right-handed tetrahedra adjacent to the specified type of edges in the lattice, or the same for X instead of Z.The Poincaré dual to such a lattice has 4colorable volumes and is used in the definition of the 3-dimensional color code [35].However, our code involves only half of the qubits.The dual lattice of the triangulation depicted in Eq. (84) is known as bitruncated cubic honeycomb [36].The volumes are bitruncated cubes, . (88) The drawn volume is dual to a 3 vertex.The blue shaded 6-gon faces are dual to 23 edges, and the red shaded 6-gon faces to 30 edges.The green shaded 4gon faces are dual to 13 edges.The red, green, and blue edges are dual to 123-triangles, 230-triangles, and 301-triangles, respectively.The overall lattice also contains faces dual to 01 edges, 12 edges and 02 edges, as well as edges dual to 012 triangles, but none of these are contained in the boundary of the 3 volume shown above.There are qubits on all the full vertices, and none at the empty vertices.The measurements in the dual lattice take place on the faces and involve the qubits at the vertices.For example, the ZZ 13 measurements take place simulteneously on all green 4-gon faces shown above.
Let us briefly look at the decoding procedure from Proposition 1 for the present code.The spacetime syndrome measured over some time T ∼ L consists of one outcome at every face and two outcomes at every cube of the hypercubic lattice.The syndrome yields a e 2-chain and an m 3-cochain inside the 4-dimensional modified hypercubic lattice, supported on the pillowlike volumes and the dividing f and g faces.The boundary of the m 3-cochain is a (0-dimensional) 4cocyle, and the boundary of the e 2-chain is a (1dimensional) 1-cycle.We then use the classical decoder D to find a low-weight fix that turns e into a 2-cycle and m into a 3-cocycle.For closing off the e 2-cycle and m 3-cocycle, we choose T to be after a round of I[T] 123 instruments.The corresponding spatial slice of the modified hypercubic lattice at this time is obtained by (1) taking only the 123 faces in the lattice in Eq. (84), and (2) replacing every face by two copies separated by a pillow-like volume.The non-pillow volumes of this spatial slice are rhombic dodecahedra, each formed by the four 0123 cubes adjacent to a 0 vertex in Eq. (84).Each 123 face in Eq. (84) has two adjacent qubits, so there is one qubit for every face of the spatial slice.The m 3-cocycle restricted to this spatial slice is again a 3-cocycle, that is, a collection of rhombic dodecahedra and pillow volumes.We close this 3-cochain by a 2-cochain, and apply a Pauli-X operator to the qubits at each face of this 2-cochain.The e 2-cycle restricted to the spatial slice becomes a 1-cycle, that is, a collection of edges.We close this 1-cycle by a 2-chain, and apply a Pauli-Z operator to the qubits at each face of this 2-cochain.Following Proposition 1, the error configurations that potentially lead to a wrong correction of the e (m) syndrome must contain more than half of a membrane (line) of non-trivial homology.The number of such configurations grows at most exponentially in the number of errors, whereas the probability for an error configuration shrinks exponentially, with the error probability p in the basis.Thus, for p below some threshold, the probability of a logical error shrinks exponentially in the size of the smallest membrane (line) configuration of non-trivial homology, so like ∼ e −L for the m syndrome, and ∼ e −L 2 for the e syndrome.Note that the e part of the syndrome could also be corrected by a local cellular automaton shinking the corresponding 1-cycle in each time step using a mechanism similar to Toom's rule [28].

Dynamic double-semion string-net code
In this section we will give an example for a non-Pauli fixed-point path integral code, which is based on the double-semion Turav-Viro/Dijkgraaf-Witten model [6,7], the state-sum version of the doublesemion string-net model [22,23].The double-semion model is not a Pauli stabilizer code, but only a commuting-projector Hamiltonian.The model is defined a triangular lattice with a branching structure, that is, a direction assigned to all edges that is acyclic around every triangle.The branching structure defines a local ordering of the vertices within each triangle, and accordingly allows us to label the vertices by 0, 1, and 2. There is one local ground state projector at every vertex v, acting on the 12 qubits at the edges of the 6 adjacent triangles.This ground state projector is given by (1+ Here, e runs over all edges adjacent to the vertex v, and t over all adjacent triangles.CZ denotes a controlled-Z operator, t 01 and t 12 are the 01 and the 12 edge of the triangle t, and t 1 is the 1 vertex of T .P cocycle denotes the local projector onto the subspace given by the configurations that form 1-cocycles, Note that there are in fact non-Pauli as well as Pauli stabilizer codes for this phase (and any Abelian nonchiral anyon model) [37,38,39].Here, we present a dynamic non-Pauli and non-stabilizer code.This code can be seen as somewhere between stabilizer and Floquet codes, since the anyon worldlines forming the spacetime syndrome move in a fixed direction, but this direction does not coincide with the t direction.Apart from this, our code has some similarities to recent protocols for syndrome extraction for the non-Abelian double-Fibonacci string-net model presented in Ref. [40].The goal here is not to produce a particularly practical code, but rather to demonstrate the applicability of our framework beyond the toric-code phase.
We consider a path integral defined on any 2 + 1dimensional triangulation with a branching structure, that is, a direction for all the edges that is acyclic around every triangle.As for the toric code, the path integral is a sum over Z 2 -valued 1-cocycles A, but now there is a non-trivial action (−1) A∪A∪A .That is, the state sum has an additional weight, ω(a, b, c) = ω a,b,c = (−1) abc , (91) Note that since the configuration of state-sum variables is restricted to a 1-cocycle, the variables at the three edges of each triangle sum to 0 mod 2. Thus, the variables at two edges of a triangle determine the variable on the third edge.Hence, all variables on the 6 edges of the tetrahedron are determined by the variables at three "generating" edges, which are labeled a, b, and c above.The state sum can be written as a tensor network with one δ-tensor at every edge, one 3-index Z 2 tensor at every face, and one 3-index ω tensor at every tetrahedron.This path integral is invariant under Pachner moves including the one depicted in Eq. (3).The equations corresponding to this invariance are equivalent to the fact that ω is a Z 2 group 3-cocycle.The string-net picture of this model is obtained by considering space-only Poncaré dual lattices.We can equip this path integral with anyon worldlines.Geometrically, these worldlines are represented by sequences of cylinder-like 3-cells or tube segments embedded into the triangulation.The boundary of such a tube segment consists of two anyon 1-gons (in red at the bottom and top) and one rectangle (wrapping around the side) which can be divided into two triangles, There are further tube segments attached to the two anyon 1-gons, and ordinary tetrahedra attached to the two triangles.There are no additional state-sum variables other than the group elements at each edge, but there is an additional state-sum weight at each tube segment with Z 2 variables as in Eq. (93).
There are four types of anyons, 1, s, s, and ss, and the associated weights are The different ρ x are irreducible representations of the tube algebra defined by ω [41,42].For a review of defects in the path integral language used here, see Appendix D of Ref. [43].The string-net analogue of this way of introducing anyons as explicit defects is given in Ref. [44].We now consider this path integral on a triangulation consisting of two cubic lattices A and B with unit vectors x, y, and z, shifted by relative to each other by 1  2 x + 1 2 y + 1 2 z.Each tetrahedron is formed by one A edge, one nearby B edge, as well as four length- 3  4 -edges connecting A vertices with nearby B vertices.So this is the same as the lattice depicted in Eq. (84), just that we color all A vertices red and all B vertices green.The branching structure can be chosen such that for every directed edge with associated vector ax + by + cz, we have a + b + c > 0.
We turn the path integral into a circuit of operators choosing t = z as the time direction.There are two kinds of operators in the circuit which correspond to different volumes as follows.For every t edge, there is an operator T 1 consisting of the four adjacent tetrahedra, acting on 8 qubits (here with coloring for a t (96) The large ket around diagram denotes the computational basis state given by the labels, supported on the drawn edges.P cocycle acting on a triangle with edge labels a, b, and c is the projector onto the cocycle subspace, spanned by the configurations that fulfil a + b = c.Here and in the following, we also use P cocycle for the product of P cocycle on all the triangles that are currently acted on.As shown, T 1 contains the ω-tensors of the involved tetrahedra, and the Z 2 -tensors at the internal and bottom faces.The δ-tensors at the edges of the lattice are split between the adjacent volumes.
For every x or y edge of A or B there is an operator V 1 consisting of the tetrahedron spanned by this edge and the y or x edge of B or A whose center is shifted by Neither T 1 nor V 1 are unitary since we have ) and the same for V 1 instead of T 1 .So the support of T 1 and V 1 is contained in the cocycle subspace of the involved triangles.Restricted to this cocycle subspace, V 1 is indeed unitary, On the right, we have depicted the corresponding volume that arises from gluing the tetrahedron with a reflected copy. 5This is not the case for T 1 , whose support is contained in but not equal to the cocycle subspace.We will now show how to extend T 1 to an isometry that is fully supported on the cocycle subspace, and later extend both T 1 and V 1 to the full Hilbert space using a different method.To this end, we slightly modify the spacetime lattice to incorporate anyon worldlines running along the x + y + t direction.We consider all the edges aligned with the x + y − t direction.We split every such edge into two edges separated by a 2-gon perpendicular to the x + y + t direction.Then we insert an anyon 1-gon into each such 2-gon, at the vertex with the smaller t component, for example, The T 1 volume then gets two anyon 1-gons at its boundary, which we connect using an anyon tube along the x + y + t edge, .
With this, we can replace T 1 by a collection of partial isometries T = (T x ) x∈{1,s,s,ss} , (102) Here we have used a cellulation of the volume with one anyon tube and 7 tetrahedra.T is indeed an isometry when restricted to the cocycle subspace, In order to see this, we compute T † x T x by gluing Eq. (102) with a time-reflected copy and using the topological invariance, yielding a projector, where the bottom and top 1-gon are connected via a tube segment along the t edge. 6Then we compute the sum over all tube segments, Setting h to 0 geometrically corresponds to removing the anyon tube and the t edge in Eq. (104), and identifying the loop edges at the top and bottom.So we obtain the following volume of solid-torus topology: (106) For the last equation we have used that this spacetime volume can be obtained from gluing one volume as in Eq. (99) for every pair of neighboring triangles.With this, using T in Eq. ( 25) defines an instrument I[T] restricted to the cocycle subspace.
We will now discuss how to extend I[T] and I[V] to full instruments also outside the cocycle subspace.The first step is to choose arbitrary extensions T and V to the full Hilbert space. 7However, the circuit consisting of the extended instruments I[ T] and I[ V] clearly violates Definition 1.This can be fixed by introducing a new channel C to the circuit, with the following task: C measures whether the cocycle constraint is violated at any of the triangles, and maps back to the cocycle subspace if yes.Roughly speaking, this works because (1) T and V still preserve the cocycle subspace, and C acts on that same space.C is the product of one 3-qubit channel C t for each of the 5 different triangles, Each instrument C t acts on the qubits at the three edges of the triangle, as indicated by the labels which refer to Eq. (108).The 3-qubit instrument C t a,b,c is defined as follows.First we measure x = a + b + c mod 2, which is the same as a Z 0 Z 1 Z 2 measurement just that we label the outcome with x ∈ {0, 1} instead of ±1.Then we apply a classically controlled operation c → c + x, which is the same as a CNOT after turning the classical bit x into a qubit.In other words, C t a,b,c fixes the cocycle condition by flipping the edge c, and C pushes potential cocycle constraint violations into the anyon 1-gon.It is easy to see that C (1) maps everything into the cocycle subspace, and ( 2) acts as the identity inside the cocycle subspace, With this, the complete QEC circuit consists of 6 rounds of channels/instruments. First we apply I[ T] for every t edge of A whose center is within a fixed xy plane of the B lattice, and apply the according operator C before that.Then we apply I[ V] at all x and all y edges of B inside this xy plane.We then shift the xy plane by 1  2 t and perform the same instruments with A and B exchanged.In total we obtain Let us now show that this circuit defines a valid pathintegral QEC circuit according to Definition 1.To this end, we use the tensor-network equations Eq. (110), Eq. (107), and Eq.(111) transform the circuit in Eq. (112) into the circuit Depending on how we map the circuit onto a fixed set of qubits, I[ T] acts on at least 10 qubits.So in order to implement it in practice we should decompose it into smaller gates.Surely, any gate can be written as a circuit using a small fixed universal gate set, but this circuit might be approximate and finding it might be hard for such a large operator.However, a first decomposition can be obtained by decomposing the volume in Eq. (102) into tetrahedra or at least smaller volumes.Let us give such a decomposition as a sequence of spatial lattices that we get from gluing these smaller volumes step by step, In the first step we glue two tetrahedra, applying twice a 5-qubit operators U 1 .The same happens in the last step with an operator R 1 .U 1 and R 1 are the same as V 1 shown in Eq. (97) except that the involved edges have different directions.In the second step, the volume we glue can be cellulated with an anyon tube together with two tetrahedra, defining an operator S x acting on 6 qubits, As discussed before, we now arbitrarily extend U, R, S, and W into isometries U, R, S, and W supported on the full Hilbert space.Then, we replace the instrument I[ T] by a sequence of up-to-6-qubit instruments To extend the operators, we essentially just remove the P cocycle terms from the corresponding definitions.This way, V 1 in Eq. (97) becomes a unitary (120) S x in Eq. ( 116) is a map from 6 to 3 qubits.Since there are 4 anyons and thus 4 measurement results x, we need to measure one further qubit to turn S into an isometry on the full Hilbert space.In order to fulfil Definition 1, the measurement outcome for this further qubit must be deterministic inside the cocycle subspace.This can be done by measuring the cocycle constraint, e.g., on the (a, c, e) triangle in Eq. (116).
Using ω e,f,a ω e,a,f = 1 and f = d+e inside the cocycle subspace, we obtain an isometry acting trivially on b and f .S x be expressed as a circuit, Here we have split x → (x 0 , x 1 ) into two qubits using 1 → (0, 0), s → (1, 0), s → (1, 1), and ss → (0, 1).So the qubits labeled x 0 , x 1 , and c + e + a are measured after applying the above isometry.ρ is a 2-qubit gate which in fact equals a Hadamard on the a qubit followed by a controlled-S gate.The operator W 1 in Eq. (117) becomes an isometry We have thus decomposed our QEC process as a circuit of common 2 or 3-qubit gates.For a practical implementation it might again be useful to write this circuit in terms of measurements and unitaries acting on qubits on a fixed spatial lattice.This is straightforward, but might involve auxiliary qubits and swap operations.
Finally, let us briefly discuss how the decoding from Proposition 1 applies to the present code.The recorded syndrome at a time T ∼ L consists of labelings of the x + y + t-edges by the anyon types 1, s, s, and ss.By interpreting the anyon types as elements of Z 2 ×Z 2 , generated by s and s, the syndrome defines a 1-chain in the spacetime cellulation, only supported on the x + y + t-edges.In the absence of noise, this 1chain is a Z 2 ×Z 2 -valued 1-cycle, and hence every edge on the same x + y + t-line has the same value.With noise, the syndrome is a 1-chain whose boundary is a Z 2 × Z 2 -valued 0-cycle.We let the decoder D choose a minimum-weight fix of the 1-cycle, supported on all of the spacetime lattice and not just the x + y + tedges.Restricted to the spatial lattice at time T , the syndrome yields a Z 2 × Z 2 0-cycle corresponding to a pattern of anyons in space.We then apply corrections that match up the anyons through "horizontal" (when time goes upwards) worldlines such that we obtain a homologically trivial syndrome in spacetime.The correction operators are well-known as ribbon operators in the double-semion model [22].In our language, these operators can be obtained by embedding an anyon tube segment as in Eq. (93) horizontally into the spacetime cellulation instead of vertically as in Eq. (104), or diagonally as in Eq. (101).

Discussion and outlook
In this paper we have proposed a perspective on topological quantum error correction based on topological fixed-point path integrals.Our approach provides a unified view on topological stabilizer, subsystem, and Floquet codes, as demonstrated in Section 3.
In particular, we have that the stabilizer toric code, subsystem toric code, and CSS honeycomb Floquet code can be considered the same code on different spacetime lattices.The approach can also describe topological QEC codes that are not based on Pauli/Clifford operations as we have demonstrated in Section 4.2.As summarized in Definition 1 and Proposition 1, we have given a simple unified criterion for when a circuit of measurements forms a faulttolerant topological error-correcting code.Namely that, for every spacetime history of measurement outcomes, we obtain a topological fixed-point path integral including syndrome defects.
Our framework provides a way to systematically construct new codes.To this end, we start with some known fixed-point path integral, and possibly apply some tensor-network equations to obtain another path integral in the same fixed-point phase.Then we interpret this path integral as a circuit of operators by setting a time direction.Dressing every operator with segments of syndrome defects, we obtain a circuit of instruments with the desired properties.We have demonstrated this at hand of two examples in Section 4. First, we have presented a Floquet version of the 3 + 1-dimensional toric code, by considering the tensor-network path integral on a hypercubic lattice and traversing it in the t = x+y+z+w direction.The model has qubits living on the right-handed tetrahedra of a triangulation with 4-colored vertices.The code cycles through 8 rounds, in each of which we perform 2-body measurements among the qubits adjacent to edges of a certain type.Second, we have constructed a Floquet code based on the double-semion string net.This code is not designed to be particularly practical for implementation, but is decomposed into a sequence of common 2 or 3-qubit gates.
While this paper was being finalized, Ref. [32] appeared on the arXiv which proposes a similar perspective based on the ZX calculus.In that reference, it was independently recognized that the tensor-network diagrams for the stabilizer toric code and CSS honeycomb Floquet code are the same, just traversed in a different direction.In addition to this, our work provides a clear physical interpretation of the tensor networks as topological fixed-point path integrals including topological defects.We also give a neat geometric interpretation of the phaseless ZX diagrams as cellulations, the ZX rules as topological invariance, and the Pauli webs or detection cells as volumes and vertices.As can be seen from Ref. [32], also fusion-based topological quantum computation [45] is described by our formalism.This holds true for topological measurement-based quantum computing [46] in general.A relation between the fusionbased model and the CSS honeycomb Floquet code has also been pointed out in Ref. [47].In contrast to all of the above examples, our formalism is not limited to the ZX calculus or stabilizer framework, but works for arbitrary tensor-network path integrals, as demonstrated in Section 4.2. 8he framework can be generalized in various directions.First, topological state-sum path integrals do not cover all zero-correlation length path integrals, and similarily not all gapped phases.Exemptions can be obtained from topological path integrals by inserting a rigid network of topological defects, which we refer to as foliation defects.To this end, we choose some cubic "superlattice" with a potentially larger unit cell than the topological path integral.Then (in 2+1 dimensions) we introduce domain walls at all superlattice faces, which meet at 1-dimensional foliation defects along the edges, which in turn meet at the vertices.Examples for this in 2+1 dimensions seem to yield topological path integrals again after choosing a larger unit cell, and thus correspond to a "weak breaking of translation symmetry", as we have seen in Section 3.4.In 3+1 dimensions however, topological defect networks can describe fracton phases [48], and potentially more if we also insert foliation defects perpendicular to time [49].Floquet codes based on fracton phases have been presented in Refs.[14,18].So all in all, topological defects can play three different roles in our formalism, namely computational defects, syndrome defects, and foliation defects.
A second straight-forward generalization is to consider spacetime lattices that change with time.By changing the topology of the spatial configuration, we obtain circuits that do not only fault-tolerantly store, but also process logical information.Both storing and processing of logical information becomes much more versatile if we equip the topological path integral with computational defects such as boundaries, domain walls, or other sorts of interfaces and defects.For example, we can then perform computation braiding with anyons or via lattice surgery with boundaries.
Another direction is to consider path integrals where the defects that we use for error correction (such as anyons) do not possess abelian fusion rules.In this case the scheme of Proposition 1 outlined in Eq. (20) cannot work, since there is not necessarily a unique way to perform a correction.For example, consider a path integral QEC circuit based on the double-Fibonacci phase, and assume we measure the following spacetime syndrome on a torus, with the left and right, as well as front and back identified.There are two ways of fixing the syndrome inside the red dashed circle, namely which correspond to different logical operations acting on the ground space on a torus.There is no way to find out which superposition of these logical operations will correctly undo the error that occured.A decoding strategy that has been tested successfully is based on a hierachical decomposition of the lattice into colonies [50,51].A different strategy that might work is to "continuously" apply small corrections in every timestep instead of one large correction after a large time T ∼ L. That is, in every time step, we choose a new low-weight fix of the spacetime syndrome in all of its past.Then we consider the set of string operators that could be used to close the repaired spacetime syndrome in a cohomologically trivial way inside the current spatial cut.We pick a low (e.g., minimum) weight representative from this set.Then, we apply only a single segment of this closing string operator near each of its endpoints.Independent of the choice of classical decoder, it will be interesting to see whether and how our framework can be used to construct syndrome extraction circuits for arbitrary non-abelian phases.
Another very interesting question concerns chiral phases, that is, topological phases in 2 + 1 dimensions whose anyon theory is described by a unitary modular tensor category that is not a Drinfeld center.It is a common believe that chiral phases do not allow for exactly solvable fixed-point zero-correlation length descriptions, and no such descriptions are known to date.Concretely, it has been shown that chiral phases do not admit commuting-projector Hamiltonian models [52].However, there are indications that going from Hamiltonians to discrete path integrals might resolve this problem [53].In contrast to condensed matter physics, discrete path integrals (i.e., circuits) are the much more common in topological QEC.Thus, it is natural to look there for candidates of chiral topological fixed-point path integrals.Indeed, subsystem codes based on chiral topological phases exist.Already more than a decade ago, Ref. [20] presented a subsystem code that appears to be related to the 3-fermion phase.Recently, subsystem codes based on arbitrary (including chiral) abelian anyon theories have been constructed in Ref. [54] using a mechanism of "gauging out" anyons.While it seems to be possible to construct a measurement schedule such that the logical dimension of the instantaneous stabilizer group equals the ground-state dimension of the chiral phase, it is unclear whether the path integral corresponding to these codes genuinely represent the chiral phase.It might not be a robust topological path integral at all, in which case it seems unlikely that the resulting QEC protocol is fault tolerant.Or, it might correspond to some larger non-chiral phase (such as the doubled phase), in which case these codes should not be called "chiral" when thought of as concrete QEC protocols.If the resulting path integral is indeed a chiral fixed point, this would solve an important open problem in TQFT.In any way, it will be highly interesting to analyze subsystem codes related to chiral anyon theories using the path integral formalism, and shed light on their fault-tolerance properties.
Here the labels a, c, e correspond to projections of edges, and the labels b, d, f at triangles correspond to projections of faces formed by this triangle together with F .Then the sequence a − b − c − d − e − f is the time-like string within one t period.
) H, S, and U are all unitary, where the * denotes complex conjugation.H, S, and U , together with the 4-index δ, Z 2 and C tensors satisfy two types of equations.First, adding H to all indices exchanges δ and Z 2 , and the same holds with S, Z 2 , and C, as well as with U , δ, and C, f,f +y ω f,f +y,g+y ω h,h+y,g+y ω e,h,h+y ω i,h,h+y ω h,h+y,g+y ω e,f,f +j+y ω f,f +j+y,g+j+y ω i+y,g+j+y,j ω e,g,j ω e,j,g

) and ( 2 )
P cocycle consists of the same triangle terms for each isometry.Concretely, it suffices to apply a channel C before every I[ T] instrument.The space that T acts on is given by

=
δ d+a,b δ e+a,c ρ x f,a ω e,f,a ω e,a,f P cocycleIn the third step, we glue a tetrahedron at a single face, yielding a 6-qubit operator W 1 ,

V 1
|d, a, b, e⟩ = ω d,a,b |d, a, b, e + d + b⟩ , (119)acting trivially on the label c.This unitary can be written as a circuit of controlled-X and controlledcontrolled-Z gates,

)
Specifically, applying Eq. (110) to all channels C At /C Bt inserts P cocycle on all triangles of the corresponding spatial cut of the lattice (here coloring like before C Bt ), Bt /C At .The remaining P cocycle can be absorbed into the following I[T] Bt /I[T] At using Eq.(98).The transformation implies that the circuit in Eq. (112) is in the same fixed-point phase as the circuit in Eq. (113).Since for the circuit in Eq. (113), every spacetime syndrome corresponds to a fixed-point path integral with anyon worldlines, the circuit in Eq. (112) fulfils Definition 1 as well.
Then applying Eq. (107) moves P cocycle to different spatial cuts.Finally, applying Eq. (111) removes all the channels C