Single-shot fault-tolerant quantum error correction

Conventional quantum error correcting codes require multiple rounds of measurements to detect errors with enough confidence in fault-tolerant scenarios. Here I show that for suitable topological codes a single round of local measurements is enough. This feature is generic and is related to self-correction and confinement phenomena in the corresponding quantum Hamiltonian model. 3D gauge color codes exhibit this single-shot feature, which applies also to initialization and gauge-fixing. Assuming the time for efficient classical computations negligible, this yields a topological fault-tolerant quantum computing scheme where all elementary logical operations can be performed in constant time.


I. INTRODUCTION
The development of efficient fault-tolerant quantum computing techniques is essential: they provide the means to deal with the decoherence and control imprecisions that are intrinsic to quantum systems, see e.g.[1].Only the presence of such error sources prevents extending the ability to control small quantum systems for a limited time to that of performing arbitrarily long, precise and large quantum computations.
A key element of fault-tolerant quantum computing is error correction, which is intended to detect and eliminate errors in the system.But error detection is itself a noisy process, and the attempt to eliminate wrongly diagnosed errors may end up introducing many more.This problem can be diminished [2] by performing multiple times the measurements from which errors are to be inferred [3].As a drawback, longer times and more operations lead themselves to more accumulation of errors.
This paper shows how certain error correction strategies are robust against imperfections in error detection: for them a single round of local measurements suffices.

A. Locality
Locality plays a crucial role in fault-tolerant quantum computing techniques.This is rooted in the fact that physical interactions have a local nature [4].Accordingly, quantum information is encoded in non-local degrees of freedom that are not directly accessible to the environment.Local degrees of freedom can then absorb the damage caused by errors as the computation proceeds.
Operations on encoded information should be designed so that they preserve the local structure of noise.This is automatically achieved by making use only of local operations.Of interest here are systems composed by many physical qubits, where local operations amount to quantum circuits of bounded depth.The elementary operations are arbitrary but can involve only a bounded number of qubits.In addition, locality can have a geometric meaning if qubits are arranged on a lattice and elementary operations involve only neighboring qubits.

CC CC
FIG. 1: A quantum-local process involves a finite number of local operation rounds, each with a classical output that is globally processed to provide an input for the next round.
As it will become clear, it is natural to consider a larger set of operations in which classical information can be non-locally processed.In particular, consider operations that can be decomposed in a bounded number of local processes, so that the classical output of each is processed globally to produce the classical input of the next, see Fig. 1 Such operations, which will be termed quantumlocal, do not automatically preserve the local structure of noise.However, carefully chosen quantum-local operations can have this property as long as classical information processing is noiseless.This is a central message of the present work.

B. Single-shot error correction
In some quantum error-correcting schemes the measurements needed for error detection are local, and so are the operations involved in correcting a given error syndrome.But processing the error syndrome in order to choose the right correcting operator, and controlling the application of this operator, requires global classi-cal communication and computation.Error correction is thus in such cases a quantum-local operation.
More specifically, noiseless error correction is quantumlocal.But as soon as the measurements are noisy, the error syndrome becomes unreliable and large errors might be introduced through the correction operation.To improve accuracy measurements can be repeated as much as needed, but then in a fault-tolerant setting quantumlocality is lost because higher precision requires more measurements.
As discussed below, in some schemes localized syndrome measurement errors only give rise to localized errors in the correction stage.Then a single round of measurements is enough, and fault-tolerant error correction is quantum-local.The error syndrome will be noisy and after error correction there will be residual local noise, but this is not a problem.The goal is not, and cannot be, to remove all entropy in the system, but just to keep it low so that errors do not accumulate and damage the computation.
This approach to error-correction will be termed singleshot fault-tolerant quantum error correction, or singleshot error correction for short.

C. Self-correction
All the quantum error correction schemes considered in this paper are topological [5].In particular, they are such that (i) physical qubits are arranged in a lattice of variable size, (ii) error correction is quantum-local with respect to the lattice and (iii) logical operators (those acting on encoded qubits) have a support comparable to the lattice size.Codes with these properties are expected to have a noise threshold: for local noise below the threshold value, noiseless error correction is successful with probability almost one in the thermodynamic limit.In particular, the effective error rate is exponentially small in the lattice size.
In conventional topological codes quantum information is encoded in a subspace of the Hilbert space of the manyqubit system, the code subspace.Since error detection measurements are local, this subspace has a local description and one can write a local gapped Hamiltonian such that its ground state is the code subspace.The resulting condensed matter system is said to be topologically ordered [6]: there exist a ground state degeneracy with a non-local origin.
Some of these topologically ordered phases are special in that they survive at finite temperatures.This means that the topological degeneracy of the ground state is not affected by thermal noise, so that such systems would provide a self-correcting quantum memory: a quantum memory that does not require active error correction.
The results below show that there exists a connection between self-correction and single-shot error correction.Namely, all the known topological codes that yield selfcorrecting systems turn out to exhibit single-shot error correction too.The connection boils down to the fact that in both cases the connectivity of excitations/error syndrome gives rise to their confinement.

D. Constant time overhead
Unfortunately known self-correcting phases require at least four spatial dimensions.Thus one does not expect to find a 3D topological encoding scheme allowing singleshot error correction.But it turns out that this is possible by considering subsystem topological codes rather than conventional ones.
Subsystem codes are those in which the code space contains both logical and gauge qubits.The latter are just qubits that can be in any unknown state, and in a topological subsystem code they might include local degrees of freedom.This local degrees of freedom can be measured when recovering the error syndrome, providing extra redundancy that can result in the desired singleshot error correction.
Gauge color codes are a remarkable class of topological subsystem codes [7].In particular, 3D gauge color codes allow the quantum-local implementation of a universal set of gauges via gauge fixing [8], a technique that uses error correction to switch between different encoding schemes.As shown below, in 3D gauge color codes all the elementary logical operations (initialization, gates, measurements) remain quantum-local even in the faulttolerant scenario.Thus, they provide a fault-tolerant quantum computing scheme with a constant time overhead.That is, disregarding classical computations, which in any case can be performed efficiently.

II. CONFINEMENT
This sections intends to give the essential picture of (i) the connection between self-correction and single-shot error correction, and (ii) the mechanism behind single-shot error correction in D = 3 spatial dimensions.The unifying concept will be confinement, either of excitations in a self-correcting memory or of syndromes in error correction.

A. Ising model and repetition code
Maybe the simplest conceivable (classical) selfcorrecting memory is the Ising model.It displays a critical temperature below which a classical bit can be stored reliably for a time that grows exponentially with the system size.In particular this holds for spatial dimensions D ≥ 2. This is due to the fact that excitations have dimension D − 1, and they are only confined when they are extended objects.E.g. for D = 2 excitations take the form of loops.Each loop of length l carries a Boltzmann factor of the form e −βl .Below the critical temperature this factor is stronger that entropy fluctuations and loops are confined.This protects the classical bit because large loops are required to flip its value.
It is possible to construct a quantum code based on the Ising model.It will correct only bit-flip errors, but this is enough to illustrate the role that confinement can play in quantum error correction.
The construction is as follows.Physical qubits are placed on the faces of a 2D square lattice, see Fig. 2. As usual X i , Z i denote the X, Z Pauli operators on the i-th qubit.Between any pair of adjacent faces i, j there is an edge e.For each such edge e there is a check operator that will be measured to recover the error syndrome.Encoded states are those for which Z e = 1, i.e. superpositions of the states |0 ⊗n and |1 ⊗n , where n is the number of physical qubits.Thus, this is just a repetition code.
An error syndrome can be identified with the collection l of edges such that Z e = −1.If a number of qubits are flipped in an encoded state, the resulting syndrome l will be the boundary of the area corresponding to these qubits, see Fig. 2.Not any collection of edges l can be a syndrome: l has to be closed, i.e. an even number of edges of l must meet at every vertex of the square lattice.For every l there are two possible sets of qubits that could be flipped to produce it.When correcting the syndrome l, one must flip the qubits of one of these sets, denoted l + .The complementary set of qubits is denoted l − .An error that flips the set of qubits l − is undesirable: correcting it produces a logical error.
For local noise of low enough intensity flipped qubits will form small clusters.The resulting syndrome l will thus be composed of small disconnected loops.In particular, if each qubit is flipped independently with probability λ, a given set of edges s can be a subset of the syndrome l with probability since for every edge in s there are two qubits that could have been flipped.Thus loops are exponentially suppressed as in the Ising model, and for λ under a critical value this effect dominates over entropic fluctuations and syndrome loops are confined.

B. Noisy error correction
Noiseless error correction aims to produce logical errors with a probability that is as small as possible.For this it suffices to choose l + so that it coincides with the most likely error for a given syndrome loop l.In noisy error correction, however, the form of the unavoidable residual noise is also important.For the present case, it should be such that syndrome loops are confined if measurement errors do not happen too often.
Suppose that check operators Z e are measured and those at edges e belonging to a certain set w give the FIG.2: A quantum error-correcting code based on the 2D Ising model.Qubits sit at faces and check operators at edges.Three stages of error correction are depicted.(Top) When the qubits in the shadowed area are flipped the check operators on the boundary detect the change.(Left) Noisy measurements of the syndrome are performed.Measurements fail at some edges (red) providing a pseudo-syndrome (black) that is not closed.The failed measurements are estimated to correspond to a minimal set of edges with the same endpoints (dotted red), so that the effectively recovered syndrome is the boundary of the shaded area.(Right) After error correction is performed, the new syndrome corresponds to the set of edges with effectively wrong measurement outcome.
wrong eigenvalue.Instead of the correct syndrome l the recovered pseudo-syndrome is l + w, with + the symmetric difference of sets.This needs not be a proper syndrome since it might not be closed, and therefore it needs to be corrected.There exists some set of edges w 0 with minimal cardinality such that l + w + w 0 is closed.Clearly w 0 only depends on w, because l + w + w 0 is closed if and only if w + w 0 is.Since w + w = ∅ is closed it follows that Estimating that w 0 is the set of wrong measurements yields an effective set of wrong measurements w ′ and an effective syndrome l ′ The situation is depicted in Fig. 2.
To explore the effects of noisy measurements, assume that the original error was l + , so that noiseless error correction would not introduce a logical error.In order to correct the error syndrome l ′ the qubits in l ′ + are flipped.Therefore the net effect of noise and correction is to flip the set of physical qubits where the ± indicates the two different possibilities, see Fig. 2. The minus sign corresponds to a logical error.The set of effective wrong measurements w ′ is also the syndrome of the residual error w ′ ± .Does local noise in measurements give rise to confined syndrome loops?Suppose that each measurement fails with probability η.According to (3) more than half of the elements of w ′ are also in w.Since there are 2 |w ′ | subsets of w ′ , the probability for w ′ to be the syndrome is bounded by (2η 1/2 ) |w ′ | .With a bit more of care one can show that for small enough η the probability that a set of edges r is a subset of w ′ is for some υ that goes to zero when η does, see section IV.Thus indeed residual syndrome loops are confined.An interesting way to choose the correcting set l + for each l is to correct each connected component of l separately [9], so that localized loops are corrected by flipping a localized set of qubits.This choice makes it easy to understand that logical errors are unlikely when both the original error syndrome l and the measurement error w ′ are confined in the sense discussed.Indeed, the edges in the union of l and l ′ will form clusters, and ( 5) can be applied separately to each of them.If these clusters are small compared to the lattice, the set l + + l ′ + is localized and has to be w ′ + .Logical errors due to noisy measurements will only happen when the clusters are large compared to the system size, and the probability for such events decreases exponentially with the lattice size as long as confinement is strong enough.

C. Spatial dimension
For D = 1 spatial dimensions the Ising model fails to have a finite critical temperature.The excitations are punctual and can move freely without any energy cost: they are unconfined.These behavior is mimicked by the corresponding 1D repetition code.Local noise will still give rise to confined syndrome points, in the sense that each connected chain of errors produces two endpoints that are unlikely to be far apart.But each wrong check operator measurement will give rise to an isolated syndrome point, and thus there is no confinement.
The situation is somewhat similar when quantum selfcorrecting systems are considered.However, for known systems the spatial dimension needs to be at least four, instead of two.Again the mechanism for confinement involves that all excitations are extended objects.This translates nicely when moving to active error correction.In particular, again one finds that confinement gives rise to single-shot error-correction.

D. Charge confinement in 3D codes
Surprisingly, with subsystem codes it is possible to reproduce in D = 3 spatial dimensions the phenomena of confinement.More precisely, it will be proved below that this is possible at the level of noisy error correction.
The codes that turn out to show this behavior are 3D gauge color codes [7].As in the 1D repetition code, errors can be visualized as strings and syndromes as the endpoints of these strings, all living in a 3D lattice.Direct extraction of the error syndrome provides no confinement but, instead, it is possible to perform a collection of local measurements involving the gauge degrees of freedom.The resulting gauge syndrome is composed of extended objects similar to the closed strings in the 2D repetition code, and noisy measurements will display confinement.The position of the error syndrome points is linked to that of the extended objects, and thus they inherit the confinement.
Details are as follows.The lattice has vertices with four different colors: red, green blue and yellow (r, g, b, y).These are connected through edges that have two colors, namely those complementary to the colors of the two vertices linked by the edge, which have to be different.E.g. an rg-edge connects a b-vertex and a y-vertex.The error syndrome consists of a collection of vertices.The gauge syndrome consists of a collection of edges that has to be closed in the following sense.The subset of edges on the gauge syndrome with a given color on them has to be closed, i.e. composed of loops.In other words, color flux is conserved.This allows to repair noisy gauge syndromes, as illustrated in Fig. 3.
The error syndrome vertices can be recovered from the gauge syndrome edge collection because a vertex is in the error syndrome if and only if an odd number of gauge syndrome edges of any color is incident on it.E.g. if an odd number of gauge syndrome rg-edges meet at bvertex, then it is an error syndrome vertex (and then necessarily and odd number of ry-edges, or of yg-edges, must meet at the vertex to preserve the color flux).As depicted in Fig. 3, the idea is that error syndrome vertices correspond to branching points of the gauge syndrome flux lines.
Since gauge degrees of freedom are not protected in any way, the gauge syndrome is a priori random, except for the constraints imposed by the relationship to the error syndrome.Thus the gauge syndrome loops are not confined at all, but this is immaterial.As in the 2D FIG.4: The set of edges with an effectively wrong measurement constitute a gauge syndrome.If noise in measurements is below a threshold, this gauge syndrome is composed of small clusters.Each cluster contributes branching points that are thus close to each other.Moreover, they have overall neutral charge, i.e. there exists a local error with such a syndrome.This is the origin of confinement.
repetition code, there will be a set w of edges that gave the wrong measurement, and a minimal w 0 such that w ′ = w + w 0 is closed.It is the effective set of wrong measurements w ′ that displays confinement, and this is what matters.Let the correct error syndrome be v, a collection of vertices.Instead the recovered syndrome is v + v ′ , with v ′ the branching points of w ′ .If w ′ is confined it will typically consists of small clusters, each with a collection of branching points that are also thus clustered, see Fig. 4.This is how the error syndrome inherits confinement.
It is possible to attach a charge to the branching points [10].Under this perspective each connected component of w ′ gives rise to a collection of charges with neutral total charge.In other words, the charge is confined.
The error correction just described must be performed twice, one for X errors and the other for Z errors.The two cannot be unified in the sense that the gauge operators to be measured do not commute.Also for this reason it is not possible to upgrade the gauge syndrome to an error syndrome.This would work only for X or Z errors, and confinement would be lost for the other type of errors.

III. MODELS
This section deals with the modeling of fault-tolerant quantum error correction.The focus will be on simplicity, but keeping the models interesting enough so that the results are compelling.

A. Framework
Strictly speaking fault-tolerant quantum computing requires studying the computation process as a whole.In order to isolate the error correction stage, however, here the focus will be on noisy channels, in particular classes (sets) of channels where noise satisfies certain criteria.Given classes of channels A and B their composition is and similarly for the composition A • E or E • A with some channel or operation E.
The noise that accumulates in a computation will be represented by a class of channels N τ,ǫ that follows the line of reasoning of section II: τ is intended to play the role of a 'temperature' that indicates how much the error syndrome is confined, and ǫ indicates how bad logical errors can be.Similarly noisy error correction will be represented by a class of channels R η with a noise parameter η.Let C be the map that projects onto the code subspace.The goal will be to show that for certain quantum-local approaches, under suitable conditions in such a way that (i) the residual temperature τ ′ can be made as small as desired solely by reducing the noise in the recovery operation R η and (ii) the increment δ in logical noise can be made as small as desired solely by increasing the system size.Thus error correction aims to 'refrigerate' the system while introducing arbitrarily little logical noise.

B. Stabilizer codes
In operator quantum error-correction [11], quantum information is stored in a subsystem B of a code subspace of the Hilbert space H representing the noisy system.Thus A represents gauge degrees of freedom.When A is trivial, the code is a conventional subspace code.
Stabilizer codes [12] are defined in systems composed of a number of physical qubits.The subspace C is defined in terms of a stabilizer S, a subgroup of the Pauli group P with −1 ∈ S. In particular C is the subspace with projector A gauge group G ⊆ P with S as its center (up to phases) fixes the decomposition C = A ⊗ B [13].The elements of G generate the full algebra of operators on the gauge subsystem A, and act trivially on the logical subsystem B. The elements of the group Z(G), the centralizer of G in P, generate the full algebra on B. They are called bare logical operators, as opposed to the dressed logical operators in Z(S), which might involve a nontrivial action in A. The elements of Z(S) − G produce a logical error without leaving any trace in the syndrome.This motivates defining the code distance as the integer with Supp E the set of qubits where E acts nontrivially.L will denote a set of representatives (up to phases) of Z(G)/S with 1 ∈ L. These are the logical Pauli operators.
Error detection amounts to measure a generating set S 0 of the stabilizer group S. The error syndrome is the set σ ⊆ S 0 of stabilizer generators that yield a negative eigenvalue.Thus, if the syndrome σ is recovered the system is projected via For encoded states the syndrome is trivial since P = P ∅ .If the error E ∈ P affects an encoded state, the resulting syndrome is SE, defined by The syndrome is a group homomorphism, i.e.

S(E
For every syndrome σ an operator C σ ∈ P must be chosen that will take the system back to the code subspace, i.e. it must satisfy Not every subset σ ⊆ S 0 corresponds to an error syndrome.In particular, σ is a syndrome if an only if P σ = 0.When this is satisfied σ is valid and C σ is defined.If σ and σ ′ are valid, then so is σ + σ ′ due to ( 14).This will be relevant below for the following reason.In presence of noise, instead of the correct syndrome σ measuring the stabilizer generators will yield in general a non-valid set σ + ω.Given σ + ω there are many ω 0 ⊆ S 0 such that is valid.Importantly, it is possible to choose ω 0 in such a way that it only depends on ω, not σ.The reason is that ω + ω 0 is valid if and only if ( 16) is.
In what follows all the operations will take the form where Q i is a CPTP map with Kraus operators in the gauge algebra, p i ≥ 0, E i ∈ P and each P i is the sum of any number of different projectors P σ .This is a quantum channel if Operations of the form (17) will be denoted {K i }, thus ignoring the action on gauge qubits.This is consistent with composition, in the sense that The choice ( 17) is rather artificial, but it is rich enough to represent error correction and non-trivial forms of noise.
In particular, the code subspace C can be characterized by the projection and ideal error correction takes the form

C. Noise characterization
Consider a noisy channel of the form The net effect of applying ideal error correction after such noise affects encoded states is Noting that every E ∈ P decomposes uniquely as (23) takes the form Thus ideal error correction fails with probability To characterize E further it is convenient to consider its syndrome distribution It can be encapsulated in the channel which has the same syndrome distribution as E and satisfies fail (E) = 0. Together, fail (E) and E contain a good deal of information about the noise.In particular, channel composition satisfies: The equality ( 29) can be readily checked.As for the inequality (30), consider the composition of two Pauli errors If L = 1 it has to be the case that either L 1 = 1 or L 2 = 1 or Each of these cases corresponds to one of the terms in (30).A similar reasoning gives Namely, (32) holds for E i as in (31) only if either L 1 = 1 or L 2 = 1 or L = 1, and ach case gives a term in (33).
The noisy channel classes N τ,ǫ to be considered below will consist of channels of the form (22).The parameter ǫ limits logical noise, and the parameter τ constraints the syndrome distribution (27).In particular, the first condition defining the channels The second, involving τ , will depend on the code at hand.The composition of the classes N τ,ǫ will satisfy in such a way that δ can be made as small as desired solely by increasing the system size.According to (29) and (30), this will hold if

D. Local noise
Local noise of the form (22) will be modeled by the class L λ of channels E such that for every set of qubits R Thus, errors that affect many qubits are highly unlikely.
The class L λ is intended to model the noise caused by interactions with the environment or errors in the implementation of local circuits.Thus it is important that L λ fits into the description of noise given by N τ,ǫ , in the sense that In particular the inclusion should be such that (i) the temperature τ can be made as small as desired solely by reducing λ and (ii) the logical noise ǫ can be made as small as desired solely by increasing the system size.
A straightforward version of N τ,ǫ can be constructed using L λ .In particular, let a channel E as in (22) be an element of N τ,ǫ if (34) holds and there exists some L with With this choices the inclusion (38) holds with for some suitable function f (implicitly dependent on the system size) that will, in the codes of interest here, decrease rapidly with the system size for λ below a threshold value.Then (36) also holds setting so that δ can be made as small as desired by increasing the system size for τ + τ ′ below the threshold.The proof closes the section.
The aim is to show that For such E there exists L as in (39), and analogously for E ′ and some This and (29) give, as in (39), Moreover, the inequality (33) takes here the form which completes the proof.

E. Local codes
A stabilizer code with a fixed set of stabilizer generators induces a notion of connectedness: qubits are nodes of a graph, with any two linked if they are both in the support of some generator.A family of stabilizer codes is local if for each code the valence of this graph is bounded [14] and the family includes codes with arbitrarily large distance d.Notices that for such a family the number of stabilizer generators is bounded, namely where n is the number of qubits of a given code in the family.
For local noise it is natural, but not optimal, to choose C σ so that |Supp C σ | is minimal.With this choice any family of local codes displays a threshold.In particular, as shown in [15], for a given family there exists some λ 0 > 0 such that if λ < λ 0 then the bound ǫ on the logical error probability for channels in L λ can take the form, for constant λ, where n is the number of qubits and the proportionality constant is system size independent.Notable among local stabilizer codes are topological stabilizer codes, see e.g.[16].In topological codes locality is geometric, in the sense that qubits are placed on a lattice and stabilizer generators only involve qubits on a given ball of bounded radius.Typically the distance d scales as a polynomial on the linear size of the lattice, and so does the number of qubits n, so that (47) yields an exponential suppression of logical errors with the system size.Thus it would seem that choosing N τ,ǫ as in (39) is the way to go, but actually in some cases the physics of the problem (as exemplified by the Ising model in section II) will provide a different approach, eventually leading to single-shot error correction.
It is maybe also due to their strong physical flavor that topological stabilizer codes display other very interesting features, such as the fact that classical processing for error correction is often efficient [17,18], that error thresholds are high [17,19], and that computations can be performed in many different ways, some conventional and some of a topological nature [17,[20][21][22][23][24][25][26].

F. Fault-tolerant error correction
In modelling noisy recovery, a phenomenological approach that captures the essential difficulties involved in fault-tolerant error correction will be enough.A minimal model could include faulty measurement outcomes with a probability independent of the outcome, and local noise (37) following the ideal recovery operation.The latter form of noise can be disregarded since it is common to any noisy operation and, as long as (38) and (35) hold, does not give rise to any difficulty.
These considerations lead to model noisy recovery as with σ, ω syndromes: the outcome σ ′ = σ + ω differs at the generators in ω from the actual syndrome σ with probability q R (ω).A class of noisy recovery channels R η will be composed of channels of the form (48) satisfying some condition with parameter η.
Eventually the goal is to understand the net effect of errors and noisy recovery, as in (8).The key to this is the 'effective' channel Namely, for a given E as in (22) there exists F such that and with the following properties Indeed, one can take where p(ω, E) := q R (ω)p E (E).To recover the second equality in (51) rewrite this as where the operator in parenthesis is logical.As for the first equality, just compare (53) with The strategy to prove (8) will be to show that in such a way that τ ′ can be made as small as desired by decreasing η.This is enough, as it implies using (35) to bound fail (F ).

IV. SELF-CORRECTION
This section discusses the connection between selfcorrection and single-shot error correction in conventional topological stabilizer codes.

A. Characterization
For a given topological stabilizer code with stabilizer generators S 0 , there is a local quantum Hamiltonian model The ground state is the code subspace, and excitation configurations can be identified with error syndromes, i.e. valid subsets σ ⊆ S 0 .For some code families the system (57) is selfcorrecting: in the thermodynamic limit the memory remains indefinitely protected at finite temperatures, without any active error correction.Known examples [9] rely on the connectivity of excitations and satisfy several properties that will allow single-shot error correction.
Individual excitations (elements of S 0 ) can be regarded as the nodes of some given graph that is consistent with the geometry of the lattice, i.e. linked nodes have a bounded distance.This guarantees that the graph has bounded degree, i.e. each excitation is connected only to a bounded number of other excitations.The graph is defined [9] so as to satisfy the following property:

I.
Each connected component of a syndrome is itself a syndrome.This is, in fact, a slight simplification, see section IV D. The graph of excitations induces another one for qubits.Namely, let two qubits be linked if they belong to the union of the supports of any two linked excitations.The resulting graph is also consistent with the geometry of the lattice and in particular has bounded degree.This connectivity of qubits, which is different from the one defined in section III E, is designed to satisfy the following property: II. Pauli errors with mutually disconnected support have mutually disconnected syndromes.
Two sets of vertices A, B are mutually disconnected if no element of A is linked to an element of B or belongs to B.
According to property I it is possible to choose the correcting operators such that for any mutually disconnected σ, σ ′ , In other words, each connected component of the syndrome can be corrected separately.According to property II, if (58) holds then a bad error, i.e. one with nontrivial L in (24), must be such that its restriction to one of its connected components is also bad.All this is applied in [9] to known self-correcting stabilizer systems, in particular choosing the C σ as local as possible.For such a choice there exist some b, c, j, k > 0 satisfying the following: III.A Pauli error E with a support such that its connected components have at most cn k qubits each cannot be bad.
IV.If two syndromes σ, ω are such that their union has connected components with at most bn j elements each, then As usual n is the number of qubits in a code of the family.

B. Excitations and noise
A tailored class of noisy channels N τ,ǫ is required here.In particular, let a channel E as in (22) be an element of N τ,ǫ if (34) holds and for any (not necessarily valid) set of excitations ξ ⊆ S 0 qE (ξ) : With this definition, there exists some system size independent τ 0 > 0, λ 0 > 0 such that (36) holds setting and (38) holds setting where v is the maximum number of qubits in the support of any stabilizer generator in the code family.Before proving these facts, notice that all the required properties are met, i.e. (i) δ and ǫ can be made arbitrarily small just by increasing the system size as long as τ + τ ′ < τ 0 and λ < λ 0 (recall (46)), and (ii) τ can be made arbitrarily small just by reducing λ.
The first aim is to show that (42) holds in the present context.Due to (14) and proceeding as in (43 and thus E • E ′ satisfies the required constraint.It suffices to bound the probability where σ, ω are bad if (59) does not hold.Let C s be the collection of connected sets of excitations of size s.There exists some τ 0 > 0, dependent only on the local structure of the graph of excitations, such that [9] For σ, ω bad, σ ∪ω must include an element of B := C bn j .Thus the probability (64) can be bounded to get (61) as follows: fail The next aim is to show that (38) holds in the present context.Given a set of excitations σ, let F be the collection of functions f that map elements of σ to qubits in such a way that for any generator s ∈ S 0 the qubit f (s) is in the support of s.Then |F | ≤ v |σ| and for any where f [σ] denotes the image of f .Let C ′ s be the collection of connected sets of qubits of size s.Analogously to (65) above, there exists some λ 0 > 0, dependent only on the local structure of the graph of qubits, such that The support of every bad error E includes an element of B ′ := C ′ cn k , and thus (62) follows noting that C. Single-shot error correction The quantum-local error correction procedure is the following.First the generators S 0 are measured, which yields a set of 'excitations'.To model noise in these measurements, assume that instead of the correct set σ the measurement yields a set σ + ω with probability distribution r(ω) independent of σ and such that r(ω) := Then some ω 0 of minimal cardinality is chosen such that is the effective or corrected syndrome.Recall that ω 0 only depends on ω.Since (71) is the effective syndrome, R η should contain those recovery operations (48) such that q R is obtained from such a distribution r in the obvious way, i.e.
As shown next, there exists some η 0 > 0 such that (55) holds for η < η 0 setting which satisfies the required property, i.e. τ ′ can be made arbitrarily small just by reducing η.
The goal is to prove that the distribution q R is such that R eff ∈ N τ ′ ,0 , i.e. for any set of excitations ξ Let C s be the collection of sets of excitations ω such that there exists a connected set of excitations ω c with There exists some η 0 > 0, dependent only on the local structure of the graph of excitations, such that [9] |C Each term in (74) corresponds to a certain ω.Let ω c be the union of the connected components of ω + ω 0 that contain some element of ξ, and The set ω c is a syndrome, and thus by the minimality of ω 0 the inequality in ( 75) is satisfied because otherwise ω ′ 0 := ω 0 + ω c would be a better choice than ω 0 , a contradiction.Therefore ω ∈ C s and, for η < η 0 , |ξ| > 0, which gives (74) since qR (∅) ≤ 1.

D. Global constraints
In the previous section it has been essential that each connected component of a syndrome is itself a syndrome.This is, however, not always true.In the topological stabilizer codes studied in [9], the linear constraints that sets of excitations have to satisfy in order to be syndromes can be arranged in two types: local and global.Local constraints can be represented via the connectivity of excitations: if a set of excitations satisfies them, so does each connected component of the set.This is not true for global constraints, which depend on the topology of the system.However, connected components that are small compared to n (in the sense of section IV A) will always satisfy them.
In the approach of the previous section (where all constraints are assumed local), ω 0 is chosen as a minimal set of excitations such that (71) is a syndrome.Suppose that there are global constraints and ω 0 is chosen by taking into account only local ones.The resulting ω ′ = ω + ω 0 might not be a syndrome, but only with a probability that decreases exponentially in the system size.Such 'non-syndrome' events signal a large measurement error, and the simplest strategy in practice is to discard the computation.This can only reduce the effective noise, logical and residual, for the non-discarded computations.

V. GAUGE COLOR CODES
This section explains how single-shot error correction is possible in 3D gauge color codes [7], making emphasis in the charge confinement mechanism.It also outlines the procedure to obtain a universal set of quantum-local operations (in particular, local in 4D).
A. Geometry 3D gauge color codes are defined on lattices called 3colexes [10] in which d-cells are labeled with d colors chosen from a set of 4 colors: red (r), green (g), blue (b) and yellow (y).For a given set of colors κ, a κ-cell is a cell with label κ.If the lattice forms a closed 3-manifold the defining feature of 3-colexes is that each vertex is part of exactly one d-cell for each choice of d colors.Thus at a vertex 4 edges (1-cells), 6 plaquettes (2-cells) and 4 cells (3-cells) meet.
It is convenient to consider 3-colexes with colored boundaries.In particular, the boundary is a closed 2manifold divided in regions, with borders between regions and corners where the borders meet such that • each region is labeled with a color, • two regions of different color meet at each border, which is labeled with these two colors, and • three regions (and three borders) meet at each corner, which is labeled with these three colors.
The regions must match the lattice structure, so that regions are collections of plaquettes, borders are collections of edges, and corners are vertices.For any vertex v, let κ v be the set of colors of the regions of which v is part, in particular κ v = ∅ for bulk vertices.The defining feature for a 3-colex with boundary is that each vertex v is part of exactly one κ-cell for each set of colors κ such that It follows that only vertices at corners are missing one of their edges, only edges at borders are missing one of their plaquettes, and only boundary plaquettes are missing one of their cells.Moreover, the plaquettes forming a region have labels not containing the color of the region, and similarly for borders and edges.Some definitions will be useful below.A 3-colex is simple if all its regions are topological disks and pairs of regions only meet at most along a single border.A region of a simple 3-colex is free if its neighboring regions have three different colors, otherwise it is frozen.A simple 3colex is free if all its regions are free.A simple 3-colex is limited if its regions only have up to 3 different colors.Thus all the regions of a limited 3-colex are frozen.A tetrahedral boundary geometry is the simplest that can provide a non-trivial free 3-colex: this is the geometry used in [21].
A crucial observation is that a border has an even number of vertices if and only if it connects two corners with the same label.Thus all the borders of a frozen region have an even number of vertices, and a free region has at least a border with an odd number of vertices.
An important property of simple 3-colexes is that by gluing them to their 'duplicate' it is possible to construct a closed 3-colex.Namely, it suffices to join in the obvious way corresponding corners with an edge, corresponding borders with a plaquette and corresponding regions with a cell.The coloring of the cells joining the two copies of the original 3-colex is fixed by the defining property, but it can also be obtained as the complementary of the set of colors labeling the regions, borders or corners that the cell joins.

B. Codes
To construct a 3D gauge color code from a 3-colex, first attach a qubit to each vertex.Denote by X S the operator that flips the qubits in the set S, and similarly for Z S .For a given geometrical object o, X o is X S with S the set of qubits at vertices in o, and similarly for Z o .The generators of the gauge group are The definition (80) is enough to define the codes up to the choice of signs for the stabilizer generators.Notice that 3D gauge color code are self-dual CSS codes.For closed 3-colexes, it follows from the properties of conventional 3D color codes [10] that (i) the stabilizer can be chosen to be ) there are no encoded qubits.Simple 3-colexes with a boundary are more interesting.Consider the duplicate construction of the previous section.Let G 1 and G 2 be the gauge groups for the two copies of the 3-colex, and G be the gauge group for the closed 3-colex.The generators of G include the generators of G 1 and G 2 plus those corresponding to the plaquettes in the interface between the two copies.Crucially, these interface plaquettes are completely symmetrical up to the exchange of the copies.Given a Pauli operator E 1 on one of the copies, let E 2 be the same operator acting on the other copy.Clearly where S 1 contains the restriction of the elements of S to the first copy (defined only up to a phase).
Going back to a single copy of the 3-colex, let G be the gauge group.It follows from (82) that, up to phases, Z(G 1 ) has generating set (up to phases) because the vertices of an interface cell in one of the copies are just the vertices of the corresponding region.The distinction between free and frozen regions is now crucial.Let R and R ′ be two regions sharing a border (and only one because the 3-colex is simple).Z R and X R ′ commute if and only if the border has an even number of vertices.Therefore the stabilizer generators can be and any bare logical Pauli operator is, up to a stabilizer and a phase, a product of some of the operators It is easy to check that the stabilizer generator X R of a frozen region R is the product of some of the gauge generators X p of plaquettes p in the region.Namely, if R is a b-region that borders with g-and r-regions, and similarly for other color combinations and for Z R .It is important that the plaquettes in (86) have to be rgcells, no other color choice is possible.This is in contrast with a similar relation for cells.Namely, if c is a b-cell [10] When discussing error correction, and also when constructing codes [7], it is better to use the dual lattice rather than the 3-colex.For a closed 3-colex the dual is a simplicial lattice with 4-colored vertices.In particular, the color of a dual vertex is the complementary to the three colors labeling the corresponding cell.For the shake of error correction dual links (or edges) should be labeled with the colors of the corresponding plaquettes, e.g. a yb-link connects a r-vertex and a g-vertex.Only links and vertices are relevant for error correction.
For a simple 3-colex with a boundary a vertex must be attached to each region, with the same color as the region.Three kind of (dual) vertices must be distinguished.Internal vertices are dual to cells of the 3-colex, and the rest are external.Vertices corresponding to free regions are free, and the rest are frozen.Thus internal vertices are frozen, and frozen regions contribute external vertices.
In what follows only the dual picture will be used, and thus the wording 'dual' will be dropped.

D. Syndromes
Two separate and analogous recovery operations can be considered for bit-flip and phase-flip errors.Thus it suffices to discuss the detection and correction of bit-flip errors, in which Z-type stabilizer and gauge generators are involved.
Z-type generators are as follows.There is a stabilizer generator s v per frozen vertex v, and thus an error syndrome σ can and will be identified with a set of frozen vertices.Similarly there is a gauge generator g l per link l (including the ones connected to external vertices!).All these generators commute and form themselves a stabilizer group.Thus it is possible to define a 'gauge syndrome' γ that represents the result of measuring these gauge generators (notice that this fixes σ too).The elements of γ will be identified with a set of links.
As usual there exist linear constraints that characterize which sets of vertices/links are valid syndromes, and in addition there will be a linear relationship between gauge syndrome and error syndrome.These constraints have a geometrical nature [10].The first amounts to the conservation of a certain 'color flux', and has its origin in (87).Let a link carry a color κ if one of its two color labels is κ.Define the subsets of γ Every such collection of links is closed, i.e. at every internal vertex an even number of links in γ κ meet.At an external vertex γ κ might have an endpoint, which should be visualized as the flux ending at the boundary region.This is only possible if it is not a κ-region, because links with an endpoint at the external κ-vertex cannot carry color κ.
The relationship between γ and σ follows from (86,87).Consider an internal r-vertex v.The links meeting at v are gb-, by-and gy-links.Among the gb-links some belong to γ.Consider this set of links, together with the analogous ones with by-and gy-links.For color flux to be conserved there are two possibilities, either (i) the three sets are even or (ii) the three sets are odd.In the second case v is a branching point of γ.The definition for internal g-, b-and y-vertices is entirely analogous.The case of a frozen external r-vertex v is different.Let the region corresponding to v have border with g-and b-regions.Then v is a termination point of γ if the number of gblinks of γ with an endpoint in v is odd.The syndrome σ is composed of the branching and termination points of γ, a linear correspondence that will be denoted σ = Br γ. (89) In addition there might be global constraints that depend on the global topology.This is not relevant neither for free 3-colexes nor for limited 3-colexes, which seem to be the most important for applications [27].In such simple 3-colexes, as shown below, every collection of links γ that satisfies color flux conservation gives rise to a syndrome σ = Br γ.Thus in what follows the term gauge syndrome is applied to any set of links that satisfies color flux conservation.

E. Gauss law
According to the discussion in the previous section the gauge syndrome γ can be visualized as a collection of two-colored 'flux' strings that form a net and might have endpoints at boundary regions.The branching points σ of this net have a color.The subject of this section is the significance of color and its connection with flux.
For an encoded state the error syndrome is σ = ∅.This is the 'vacuum'.Applying local bit-flip operations will change σ in a well-defined way, adding vertices to it.These are 'particles'.Not any set of particles can be created locally, something that can be formulated stating that the elements of σ carry a Z 2 ×Z 2 ×Z 2 charge [10].To specify how color labels fit into this group, construct it as the abelian group with generators r, g, b and y subject only to the relations, in additive notation, r + g + b + y = 2r = 2g = 2b = 0. (90) Only neutral sets of charges (particles), i. e. such that their sum is zero, can be created locally.And conversely, any neutral set of charges can be created locally.
In fact, this is only true in the bulk of the lattice.In the vicinity of a free boundary region of color κ it is possible to create charges with total charge κ [21].This can be visualized as an 'immaterial' charge κ being created at the same time on the free external κ-vertex.
Charges σ (error syndromes) and fluxes γ (gauge syndromes) satisfy a Gauss law.Namely, for a 'volume' within the bulk there is a direct correspondence between the charge contained in the volume and the parity of the number of flux strings with a given coloring crossing its boundary.In particular • For neutral charge all the parities are even.
• For total charge r the parities for rg-, rb-and ryflux strings is even, and the rest odd.
• For total charge r+g the parities for rg-and by-flux strings is even, and the rest odd.
The rest of cases are analogous and need not be listed.Notice that there is a one-to-one correspondence between charge and flux configuration.Instead of formulating this property for the whole volume, it is equally possible to apply it to each separate connected component of γ in it.An immediate consequence of this is that every connected component of γ has branching points with neutral charge, that is, unless it is connected to a boundary region, i.e. it contains an edge connected to an external vertex.This case is treated next, both for free and for limited colexes.
Suppose that the 3-colex is free.The claim is that for connected components of γ that are connected to several boundary regions the total charge of the branching points is the sum of the colors of some of these regions.E.g if a connected component is connected to a b-region and to a y-region its total charge could be neutral, y, b or y+b.This property, which will be crucial below, can be checked in a case by case basis.E.g. if the total charge is r there must be at least a gb-, a gy-and a by-flux ending on boundary regions, and each of these regions can have two possible colors, but all the combinations are compatible with a total charge r.Now suppose that the 3-colex is limited.The claim in this case is that for connected components of γ that are connected to several boundary regions the total charge of the branching points and termination points is neutral.Suppose that the regions have colors r, g and b.To check this property one can disregard ry-, gy-and by-fluxes that end at the boundary.The rest have a termination point with a definite charge, e.g a rg-flux can only end at b-region.Again the property can be checked in a case by case basis, e.g. if the total charge of the branching points is y there is an odd number of rg-, gb-and rbcolored termination points and thus the total charge is neutral.
It is the confinement of charge that makes single-shot error correction possible.The above properties eventually guarantee that non-trivial charge is confined, except in the vicinity of a free boundary region, where charges that can disappear in the boundary are not confined.

F. Faulty gauge syndromes
The notion of charge is also useful to understand the classical error correction of faulty gauge syndromes.When the Z-type gauge generators are measured, instead of the correct gauge syndrome G the measurement yields a set γ + δ.Due to the wrong measurements δ, the recovered gauge pseudo-syndrome γ + δ does not satisfy color flux conservation.A set of links δ 0 needs to be chosen such that does conserve color flux.As usual there is a set of linear conditions that should be satisfied and provide a syndrome for measurement errors.The error syndrome characterizes δ, in particular how color flux is not preserved at each internal vertex.This is best done with a suitable charge group, similar to the one for the bit-flip error syndrome in the previous section.Again the group is Z 2 ×Z 2 ×Z 2 .This time the abstract generators of this abelian group are the labels rg, rb, ry, gb, gy and by, subject to the relations gb + by + gy = rb + by + ry = rg + gy + ry = 0, (92 For a given δ, the charge at a vertex v is the sum of the labels of the links in δ meeting at v. In particular, δ is a gauge syndrome if and only if all charges are trivial.Since charge configuration is a linear property of sets of links δ, and since every link creates equal charges on both of its endpoints, it follows that in the bulk of the lattice the syndrome of every set of links δ is neutral.And conversely, the structure of the lattice guarantees that there is always some local set of links for a given neutral charge configuration.
With boundaries the situation is again different.In the vicinity of a κ-region valid syndromes need not be neutral.Instead the total charge might be any sum of labels not including the color κ.E.g. in the vicinity of a r-boundary the syndrome of a local set of links δ might have charge 0, gb, gy or by.The reason is that there are gb-, gy-and by-links that connect some internal vertex with an external r-vertex, and no charge is assigned to external vertices.

G. Gauge syndrome and errors
Consider a connectivity graph with both qubits and Z-type gauge generators as its vertices, in which two vertices are linked if they share a stabilizer generator: here the stabilizer generators of a qubit q are those with q in their support, and the stabilizer generators of a gauge generator g are those corresponding to the two endpoints of the edge corresponding to g).The idea behind the definition is that given a gauge syndrome γ and a bit-flip operator E with support in a set of qubits Q and such that each of the connected components γ ′ ∪ Q ′ of the set γ ∪ Q satisfies the same relation, i.e.SE ′ = Br γ ′ with E ′ the bit-flip operator with support in Q ′ .It will be useful to define, for every gauge syndrome γ, a set of qubits Q γ , together with its corresponding bit-flip operator E γ , such that . there exist some constant K such that Properties 1 and 2 can be achieved together because, according to the discussion of section V F, each connected component γ ′ of a gauge syndrome γ gives rise to a syndrome Br γ, and thus some Q γ ′ can be chosen for each connected component independently.Property 3 can be achieved simple by removing from a potential Q γ all the connected components that do not include γ: they must have trivial syndrome.Finally, property 4 can be achieved by choosing errors with support on those qubits that are in the support of some of the stabilizers s v such that v is a vertex in γ, which is always possible [10] for free 3-colexes and for limited 3-colexes thanks to the charge neutralization properties proved in section V F. If K ′ is the maximum number of qubits in the support of a stabilizer generator s v , the bound (96) will hold for K = 2K ′ because the number of frozen vertices of γ is at most |γ| + 1 (and in the free case, |γ|).

H. Single-shot error correction
Unlike the noise model of section IV B, which had to be tailored for each specific code, 3D gauge color codes admit the class N τ,ǫ introduced in section III D.
Quantum-local error correction for bit-flip errors proceeds as follows.First the Z-type gauge generators are measured.To model noise in these measurements, assume that instead of the correct set G the measurement yields a set γ + δ with probability distribution r(δ) independent of δ and satisfying (70).In general γ + δ does not satisfy color flux conservation, so a set δ 0 of minimal cardinality is chosen such that (91) does.As usual, δ 0 only depends on δ.The recovered syndrome is Since ( 91) is the effective syndrome, R η should contain those recovery operations (48) such that q R is obtained from such a distribution r, i.e.
The rest of the section is devoted to prove that there exists some η 0 > 0 such that (55) holds for η < η 0 choosing with K the constant of (96).Notice that τ ′ can be made arbitrarily small just by reducing η.
Showing that R eff ∈ N τ ′ ,0 amounts to exhibit a channel L with Recall the definitions of Q γ , E γ in section V G.The first condition holds for the choice Thus it suffices to show that for any set of qubits R pL (R) := strategy is very similar to that in section (IV C) and uses the the connectivity notion of section V G and the construction Q γ there.Let C s be the collection of sets of links δ such that there exists a connected set δ c ∪ Q c with δ c a set of links, Q c a set of qubits, and As in (76), there exists some η 0 > 0, dependent only on the local structure of the lattice, such that Each term in (102) corresponds to a certain δ.Let δ c ∪Q c be the union of the connected components of (δ + δ 0 ) ∪ Q δ+δ0 that contain some element of R, and From connectedness considerations δ c is a gauge syndrome and the first inequality because Q c = Q δc , and the second by the minimality of δ 0 .Therefore δ ∈ C s and, for η < η 0 , which gives (102) since pL (∅) ≤ 1.

I. Quantum-local fault-tolerant operations
For this section the relevant 3D gauge color codes are those introduced in [7], which encode a single qubit and are built from tetrahedron-shaped (and thus free) 3-colexes.
3D gauge color codes are CSS topological stabilizer codes, and as such the initialization of eigenstates of the logical X and Z operators is a quantum-local operation [17].Measurements in the X and Z basis are also quantum-local.In addition, 3D gauge color codes allow the quantum-local implementation of a universal set of gauges via gauge fixing [7].Moreover, all these quantum-local operations are actually local except for the error-correcting part that they incorporate, suggesting that quantum-locality could be preserved in a faulttolerant setting.This is indeed the case, as outlined next.
The initialization of a encoded eigenstate |0 of the logical Z is performed by initializing all the physical qubits to |0 and then correcting phase-flip Z errors [17].The initialization of eigenstates of X is analogous.In both cases error-correction is needed just to bring the state to the code subspace: logical errors do not play any role due to the nature of the encoded states.Clearly singleshot error correction, as described above, will succeed at this and provide encoded eigenstates up to some noisy channel in N τ,ǫ where, as usual, τ can be decreased by improving the accuracy of the operations and ǫ by increasing the system size.
The measurement of the logical Z amounts to measure each single-qubit Z and then perform bit-flip error correction on the resulting classical bits before reading the logical value.The measurement of the logical X is analogous.In both cases measurement errors can be regarded as conventional single-qubit errors that happened before an ideal measurement.Thus the hole process can be modeled as some noisy channel in L λ (with λ reprethe accuracy of the single-qubit measurements) followed by ideal error correction and the measurement of the corresponding operator.
Hadamard gates are transversal and as such can be simply modeled by a perfect gate followed by some noisy channel in L λ .Notice that the perfect Hadamard exchanges X and Z errors.The case of CNot gates is similar, with the peculiarity that X or Z errors of the two codes are combined in one of them.This is not problematic due to (35) (in fact, one can possibly do better by taking into account the logical gates in error correction).
Completing the universal set of gates requires gauge fixing [7].The gauge fixing operation amounts to (i) applying the single-shot error correction procedure of section V H, so that some error E is chosen for an effective syndrome γ + ω with and (ii) applying a gauge bit-flip operator G such that where S g A denotes the gauge syndrome of A. From the point of view of logical errors the second step is irrelevant.Its purpose is to set the gauge syndrome to its trivial value.If the correct gauge syndrome is γ, however, the net effect is instead to fix the gauge syndrome to ω, which is confined for noise below a threshold.
Once the gauge fixing is completed a transversal gate can be applied that completes the universal gate set together with the Hadamard and CNot [7].This gate only preserves the subspace of trivial syndrome, but in addition it leaves phase-flip errors invariant, and maps a set of bit-flip errors that has as syndrome a given connected net ω to a (non-Pauli) error that, from the gauge code perspective, can be chosen to have support within a close neighborhood of ω.Thus the residual noise after gauge fixing and the transversal gate have been performed shows the required confinement, i.e. can be described by a suitable N τ ′ ,ǫ+δ as in (8).
In summary, 3D gauge color codes provide a somewhat straightforward fault-tolerant quantum computing scheme with a constant time overhead.Or rather, there is no overhead if the classical computation time required for error correction is disregarded.This might be enough for practical applications in the sense that all the required computations can be carried out efficiently, as discussed in section VI.An important aspect is that all quantum operations are local, but only in four spatial dimensions.Three of these are required by the the 3D codes, and the forth is for the CNOT gate, which involves pairs of codes that have to be next to each other without overlapping.This difficulty can be overcome [27].

VI. EFFICIENT ERROR CORRECTION
A weakness of the threshold results (47), ( 73) and ( 99) is that they rely on the ability to find errors of minimal support for a given syndrome.If this task cannot be done efficiently, the methods are impractical and the thresholds possibly useless.
Fortunately, a closer inspection of the respective proofs reveals that in fact it is enough to be able to find errors that are only a constant away from optimal, connected component by connected component.To make this explicit, consider in particular (99).It is enough to find a δ 0 such that, for any δ with δ +δ 0 a valid gauge syndrome and for any connected component δ c of δ + δ 0 , for some constant c ≥ 1.The prize to pay is that the constant k in (99) will be worse, in particular Another aspect that admits changes is connectivity, as long as the resulting connected components have at most a size proportional to the subset of errors that they contain.Continuing with the above example, suppose that for each δ there is a set µ with elements in some set M .The elements of M might be connected to each other and to the links in the lattice (recall that the elements of δ are links), but the connections must preserve the locality of the lattice.Instead of taking connected components of the set δ + δ 0 , one can then consider the set (δ + δ 0 ) ⊔ µ (or alternatively the set (δ ∪ δ 0 ) ⊔ µ, which works just as well).If each resulting connected component takes the form δ c ⊔ µ c , it suffices for the proof technique to work that for some constant a.This will result in a different constant η 0 and, again, some extra factor in the value of k in (99).The purpose of this section is to use these observations to map the error correction problems that are relevant to 3D gauge color codes into problems that have an efficient solution but still provide a threshold.Notice that the threshold results (61) and (62) do not suffer from similar dificulties because they rely on error correction methods that are efficient, at least for the codes considered in [9].

A. Strategy
Here is a general strategy to approximate, in the sense of (110), the optimal solution of a given error correction problem in terms of another problem that can be efficiently computed.
Let the problem of interest be defined by two abstract sets E and S and a linear map S that maps errors, i.e. subsets ǫ ⊆ E, to syndromes σ ⊆ S. Two elements of e 1 , e 2 ∈ E are connected if their syndromes S{e i } overlap (but there might be other connections).Clearly, if ǫ c is a connected component of ǫ ⊆ E then A set σ ⊆ S is a syndrome it it has a solution, i.e. some error ǫ with Sǫ = σ.A minimal solution is one that has minimal cardinality.An error ξ ⊆ E is elementary if |ξ| = 1.Assume that there is a second problem E ′ , S ′ , S ′ , with S ′ = S, together with 1. a function m that provides for a given syndrome σ ⊆ S a minimal solution m(σ) ⊆ E ′ , 2. a linear function g mapping errors ǫ ′ ⊆ E ′ to errors g(ǫ ′ ) ⊆ E and such that 3. integers a, b such that for any elementary errors ξ ⊆ The map g provides a solution ǫ 0 for a given syndrome σ ⊆ S constructed via a minimal ǫ ′ 0 ⊆ E ′ , namely The claim is that if for some ǫ ⊆ E and This is precisely what was required in (110) and (112), under the obvious identifications (e.g.ǫ ′ 0 is µ).The proof of (120) is as follows.Let h be the linear map taking errors ǫ ⊆ E to errors h(ǫ) ⊆ E ′ and such that for any elementary ξ By linearity and since S ′ • m is the identity In particular where the second identity uses (116) applied to ǫ⊔ǫ ′ 0 (each of its connected components is a subset of a connected components of (ǫ ∪ ǫ 0 ) ⊔ ǫ ′ 0 ).By the minimality of |ǫ Notice that |A + B| ≤ |A| + |B| for any sets A, B. Then by linearity (115) yields which combined with (117) applied to ǫ 0 ⊔ ǫ ′ 0 and (124) gives (120).

B. Efficient solution
Given an error correction problems E, S, S of interest, the goal is to map it, in the sense of the previous section, to some other problem E ′ , S, S ′ with an m that can be efficiently computed.There is a problem with an efficient solution that appeared early on in the study of topological stabilizer codes.S is the set of vertices of a graph, E ′ the set of edges, and S ′ is the boundary operator ∂ mapping each edge to its two endpoints.For graphs in which paths of minimal length between two points can be computed efficiently (e.g. in a uniform lattice embedded in R n ), m is efficient via minimum weight matching [17].Moreover, a slight modification allows to introduce in E ′ also 'edges' with a single endpoint, so that ∂ maps such an edge to its endpoint.
An error correction problem E, S, S can be mapped to such E ′ , S, S ′ if there exists integers a and b such that for every elementary error ξ ⊆ E there exists errors ǫ i ⊆ E, i = 1, . . ., r, with The construction is as follows.The set E ′ contains an edge e with endpoint(s) the element(s) of Sǫ i for every pair ξ, i, and This fixes g by linearity.It is easy to check that the equation ( 114) and the inequalities (115) hold.
In order to preserve the locality of a problem E, S, S, it suffices to impose in addition that for each ξ the set is connected.This is not a constraint at all because, if it is not satisfied, it suffices to discard from each ǫ i those elements that are not in the same connected component as the single element of ξ.This is a consequence of the property (113).

C. 3D gauge color codes
Error correction in 3D gauge color codes involves two steps.The first one is the correction of measurement errors in the recovery of the gauge syndrome.The second is the correction of errors based on the (stabilizer) syndrome.Both problems have a similar nature in that they are described in terms of a charge group Z 3  2 , and both can be put in a form that satisfies the above requirements (126) while preserving locality.There are, however, some interesting obstacles that deserve a detailed discussion.
Take for example the problem E, S, S where the elements of E are bit-flip errors and the elements of S are the Z-type stabilizer generators.Recall that stabilizer generators have a color κ in the set {r, g, b, y}. (129) Consider first a lattice without boundaries.Then the Z 3 2 charge is well-defined globally, i.e. a subset of S is a syndrome if and only if it has neutral charge (the sum of the labels of its elements is trivial).A single bit-flip error ξ in the bulk has a syndrome σ = {s r , s g , s b , s y }, where s κ is a stabilizer at a κ-vertex [10].The problem is that there is no way to partition σ into subsets of cardinality at most two that are syndromes of some error, because such subsets can never have neutral charge.This can be overcome by choosing a minimal set C of charges that generate the group, e.g.
and an alternative set of local stabilizer generators that have charge either neutral or in C, see [28] for the explicit procedure.Given any elementary error ξ (or in fact any error), if its syndrome consists of n 0 neutral elements and, for each κ ∈ C, n κ κ-elements, then, due to the neutrality of Sξ, Thus σ can always be partitioned by forming (i) singlets of neutral elements and (ii) pairs consisting of elements with the same charge.The corresponding ǫ i of (126) can always be local.
In the presence of boundaries charge is only interesting as a local property.In particular, in the bulk the charge group is Z 3  2 , but in the vicinity of a free κ-region, with κ in the set (129), the relevant local charge group is the quotient of Z 3 2 with the Z 2 subgroup generated by κ (accordingly, in the vicinity of several free regions quotient instead with the group generated by the respective colors).The absence of an interesting global notion of charge is no obstacle to apply the procedure of [28], since it is possible to use the labels of vertices and the corresponding abstract Z 3  2 group.The resulting set of stabilizer generators have labels in C ∪ {0}.Either in the bulk or the boundary, the local charge of a stabilizer generator matches its label via the quotient construction, i.e. a set σ ⊆ S is locally neutral (its labels add up to 0 in the local charge group) if and only if there exists a local operator with syndrome σ.
Since the construction is the same as before in the bulk, bit-flip errors ξ in the bulk have the desired properties.This however might not be the case for bit-flip errors in the boundary.A single bit-flip error in a y-region can have a syndrome of the form σ = {s r , s g , s b }, where s κ has color κ, because such a set is locally neutral.As above, the problem is that there is no way to divide σ into subsets of cardinality at most two with locally neutral charge.This can be overcome by choosing a different set C of charge group generators, namely C = {r, g, x}, x := r + b.
Given any elementary error ξ (or in fact any local error), if its syndrome consists of n 0 elements and, for each κ ∈ C, n κ κ-elements, then, due to the local neutrality of Sξ, either (131) holds or instead In the latter case, σ can always be pertitioned by forming (i) singlets of neutral elements, (ii) pairs consisting of elements with the same label and (iii) a pair of elements with labels g and x.Ultimately the partition is possible simply because y = g + x. (134) In particular, because there exist a set of generators for the group of locally neutral charge (namely,{y}), that are the sum of less than three elements of C (y is the sum of two of them).The set of generators (132), unlike (130), is such that this is true for some generating set of all the locally neutral charge groups.In particular, it is always possible to choose the generators from the set (129), and (the case of r and g is trivial It is crucial that boundary conditions only include r-, g-, b-and y-regions.Other boundary conditions might imply different and possibly incompatible constraints on the valid choices for C. The correction of measurement errors (in the recovery of the gauge syndrome) is entirely analogous.The elements of E are links and the elements of S are pairs (v, x) with v an internal vertex and x one of the two generators of the Z 2 × Z 2 subgroup of charges that a given vertex can hold.E.g. a r-vertex can only hold charge 0, gb, by or gy, and any two nontrivial labels among these might be taken as generators.In this case a valid choice of generators of the charge group Z 3  2 is C = {rg, gb, by}.
(136) Indeed, the generators of the groups of locally neutral charges can be chosen among the elements of It is worth mentioning a special case with an important application [27].When the original state is known to not have branching points, the correction of measurement errors is greatly simplified.The reason is that each of the 6 flux types can be treated separately, i.e. a gauge syndrome δ is decomposed in syndromes δ κ with κ a pair of colors.Each problem is described by a single Z 2 charge, and in fact is directly isomorphic to that in section VI B.

VII. CONCLUSIONS AND OUTLOOK
Quantum-local operations, in particular single-shot error correction, could play a crucial role in fault-tolerant quantum computation.The powerful features of 3D gauge color codes are a great example of this: with singleshot error correction it is a 'straightforward' matter to perform all elementary operations in constant time (disregarding classical computation time).
At the most basic level, one can think of quantum error correcting codes simply as subspaces.On top of that, explicit algorithms for error correction are often crucial: in the absence of efficient algorithms, a code might be unpractical or a threshold irrelevant.Even this is a simplified picture when considering fault-tolerance, where measurement errors play a crucial role.This is exemplified by the techniques for error correction in local stabilizer codes [17], and now also by single-shot error correction.It seems that rather than the code, the focus should be on the error correcting procedure.
In this regard, a family of codes might display locality in at least three levels of strength.The largest class is that of codes that admit a description in terms of local projectors.Then comes the class of codes for which ideal quantum error correction is quantum-local.This is different from the previous, as exemplified by the ground subspaces of system with non-abelian anyons: it is not quite the same to be able to detect errors locally and to be able to obtain the error syndrome locally.Finally there is the class of codes that admit single-shot error correction.
A fundamental open problem is whether a selfcorrecting topological phase might exist in 3D.In this regard, one can conjecture that a Hamiltonian system connected to 3D gauge color codes could give rise to a self-correcting phase [7].The non-local encoding of quantum information in 3D gauge color codes is compatible with the confinement of the two types of particles (Xand Z-type) that will destroy it if free to move around.The problem is that it is not clear whether these two confinements can be compatible, even if for example alternated in time.

FIG. 3 :
FIG.3: Two stages in the recovery of the error syndrome.(Top) The measurements of the gauge generators provides a noisy gauge syndrome that does not satisfy color flux conservation at the points marked with a two-colored circle.(Bottom) The gauge syndrome is corrected by adding suitable edges.The error syndrome is the set of branching points of the flux net (colored circles).