<<

ARTICLE

DOI: 10.1038/s41467-017-01418-2 OPEN Fault-tolerant interface between quantum memories and quantum processors

Hendrik Poulsen Nautrup 1, Nicolai Friis 1,2 & Hans J. Briegel1

Topological error correction codes are promising candidates to protect quantum computa- tions from the deteriorating effects of noise. While some codes provide high noise thresholds suitable for robust quantum memories, others allow straightforward gate implementation

1234567890 needed for data processing. To exploit the particular advantages of different topological codes for fault-tolerant quantum computation, it is necessary to be able to switch between them. Here we propose a practical solution, subsystem lattice surgery, which requires only two-body nearest-neighbor interactions in a fixed layout in addition to the indispensable error correction. This method can be used for the fault-tolerant transfer of between arbitrary topological subsystem codes in two dimensions and beyond. In particular, it can be employed to create a simple interface, a , between noise resilient surface code memories and flexible color code processors.

1 Institute for Theoretical Physics, University of Innsbruck, Technikerstr. 21a, 6020 Innsbruck, Austria. 2 Institute for and Quantum Information, Austrian Academy of Sciences, Boltzmanngasse 3, 1090 Vienna, Austria. Correspondence and requests for materials should be addressed to H.P.N. (email: [email protected])

NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications 1 ARTICLE NATURE COMMUNICATIONS | DOI: 10.1038/s41467-017-01418-2

oise and decoherence can be considered as the major encoding k = n − s . We denote the normalizer of S by Nobstacles for large-scale quantum information processing. NðSÞ, which here is the subgroup of Pn that commutes with all These problems can be overcome by fault-tolerant elements of S. That is, elements of NðSÞ map the codespace to quantum computation1,2, which holds the promise of protecting itself. We write L¼NðSÞ=S for the (quotient) of logical a quantum from decoherence for arbitrarily long times, operators which induces a structure on C, i.e., k provided the noise is below a certain threshold. Quantum error C¼ i¼1Hi. This construction implies that different logical Pauli correction codes are indispensable for any fault-tolerant quantum operators are distinct, non-trivial classes of operators with an computation scheme3. Among these, stabilizer codes4, building equivalence relation given by multiplication of stabilizers. on classical coding theory, admit a particularly compact The distance of an error correction code is the smallest weight description. In particular, the subclass of topological stabilizer of an error E 2Pn such that E is undetectable. The code can 5 = codes (TSCs) is promising since TSCs are scalable and permit a correct any of errors E¼fgEa a iff EaEb2NðSÞ À hiSi local description on regular D-dimensional lattices. 8Ea; Eb 2E. A defined through S has distance d Two of the most prominent examples of TSCs in two dimen- iff NðSÞ À hiSi contains no elements of weight less than d. sions are surface codes6,7 and color codes8. While surface codes Equivalently, any non-trivial element of L is supported on at least support adaption to biased noise9 and have better error thresh- d qubits. By the above error-correction condition, an error with olds than comparable color codes10, they do not support a weight at most (d−1)/2 can be corrected while an error E with transversal phase gate. However, transversality is essential for any weight d/2 ≤ w(E) < d can only be detected. From a slightly encoded quantum since it guarantees a straightforward different perspective, codewordsP are degenerate ground states of s implementation within a code. Gauge the Hamiltonian H ¼À i¼1 Si. Adopting this viewpoint, color codes, for example, were recently shown to support the correctable errors are local excitations in the eigenspace of H transversal implementation of a universal set of gates in a three- since they anticommute with at least one Si 2S, while dimensional (3D) layout11. It is hence desirable to store quantum logical operators map the degenerate ground space of H to itself. information in surface code quantum memories while performing 12 computation on color codes in two (and three) dimensions . Subsystem stabilizer formalism. A subsystem structure can be Here we present a protocol that makes such hybrid computa- induced on stabilizer codes by considering non-Abelian gauge tional architectures viable. We develop a simple, fault-tolerant symmetries15. The group of gauge transformations is defined as conversion scheme between two-dimensional (2D) surface and G¼LG ´ S ´ hii where S is a stabilizer group and LG is the group color codes of arbitrary size. Our flexible algorithm for code 13,14 of operators in NðSÞ À hiSi that are not in a non-trivial class of switching is based on a formalization of lattice surgery in L¼NðSÞ=G. This imposes a subsystem structure on the code- terms of operator quantum error correction15 and measurement- space C¼HL HG where all operators in G act trivially on the based quantum computation16. This introduces the notion of 17 logical subspace HL . While logical operators in L define logical subsystem lattice surgery (SLS), a procedure that can be under- qubits in HL, operators in LG define so-called gauge qubits in stood as initializing and gauge fixing a single subsystem code. The HG. That is, operations in L and LG both come in pairs of required operations act locally on the boundaries, preserve the 2D (encoded) Pauli X and Z operators for each logical and gauge structure, and are generators of a topological code. As all gen- , respectively. We recover the stabilizer formalism if G is erators of the resulting code have constant size, errors on any of Abelian, i.e., LG ¼;. As before, a set of errors E¼fgEa is their components only affect a constant number of qubits, a correctable iff EaEb2=NðSÞ À G 8Ea; Eb 2E. Errors can again be making the protocol inherently fault-tolerant. As we explicitly consideredP as local excitations in the eigenspace of a Hamiltonian show, this generalizes the methodology of lattice surgery to any g H ¼À Gi; where g is the number of generators Gi 2G. combination of 2D topological subsystem stabilizer codes, with i¼1 color-to-surface code switching as an example of particular interest. While we restrict ourselves to 2D topological codes for Topological stabilizer codes. Stabilizer codes S are called topo- the better part of this paper, we show that the essential ingre- logical if generators Si 2Shave local support on a D-dimensional lattice. Here we focus on 2D rectangular lattices Λ = [1, L] × [1, dients of SLS carry over to higher-dimensional codes. In fact, the ′ ′ procedure works even for non-topological codes at the expense of L ] with linear dimensions L and L in the horizontal and vertical locality. Therefore, our results represent a significant step toward direction, respectively, where qubits are located on vertices (not a fault-tolerant interface between robust quantum memories and necessarily all are occupied) but our discussion can be easily extended to arbitrary regular lattices. We call a generator Si 2S versatile quantum processors, independently of which topological 5 2 codes will ultimately prove to be most effective. The method local if it has support within a square containing at most r proposed here hence has the prospect of connecting different vertices for some constant r, called interaction range or diameter. components of a future quantum computer in an elegant, prac- Moreover, we require of a TSC that its distance d can be made tical, and simple fashion. arbitrarily large by increasing the lattice size. In other words, the generators Si are not only local but also translationally invariant at a suitable scale18. This definition of TSCs can be extended straightforwardly to topological subsystem stabilizer codes Results 19 Stabilizer formalism. We considerÀÁ a system comprised of n (TSSCs) where we impose locality on the generators of G n qubits with H¼ C2 . The group of Pauli instead of S. Then, generators of S are not necessarily local. operators Pn on H is generated under multiplication by n independent Pauli operators and the imaginary unit i. We write Logical string operators. An intriguing feature of 2D topological ; ; ; :::; ; ; Pn ¼ hii X1 Z1 Xn Zn where Xj, Zj are single-qubit Pauli codes is that logical operators can be interpreted as moving operators acting on qubit j. An element P 2Pn has weight w(P)if point-like excitations around the lattice, i.e. logical operators it acts nontrivially on w qubits. We define the stabilizer group form strings across the lattice. Specifically, for any 2D TSC or S¼hiS1; :::; Ss for s ≤ n as an Abelian subgroup of Pn such that TSSC on a lattice with open boundaries there exists a quasi-1D ∀ = the generators Si are independent operators i 1, ..., s and string of tensor products of Pauli operators generating a logical À12S= . S defines a 2k-dimensional codespace C¼spanðÞfgjiψ Pauli operator whose support can be covered by a rectangle of of codewords jiψ 2Hthrough the condition Sjiψ ¼ jiψ 8S 2S, size r × L′5, i.e., a vertical strip of width at most r.IfS obeys the

2 NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications NATURE COMMUNICATIONS | DOI: 10.1038/s41467-017-01418-2 ARTICLE

A abA B A B Merging protocol and code splitting. Given the two codes G PL {GM} PL PL {GM} PL B A B i i and G with respective logical Pauli operators PL and PL along r boundaries, the goal is to achieve a mapping A ´ B A ´ B ´ A B G G 7!G G PL PL that projects onto an eigenstate of Λ A B fi A PL PL (i.e., a ). Therefore, we now de ne a fault- tolerant protocol that merges the two codes into one, similar to r A Λ Λ the method of lattice surgery, which has been developed for B Λ B 13 14 A surface codes and extended to color codes . As we will see, the r B merged code can then be split to realize the mapping described Fig. 1 Subsystem lattice surgery between two topological codes. a above. The merging procedure has the following four steps. (i) Including ancillas. We introduce a set Q of N − 1 ancillas Depiction of two topological codes defined on lattices ΛA and ΛB (grid not C PI I = initialized in the +1 eigenstates of their respective Pauli X shown), respectively. Logical Pauli operators L of the respective codes A, B are represented by solid red lines connecting qubits (blue dots) within operators. The ancillas are placed on newly added vertices along a Λ and Λ , respectively. These operators have support on a vertical strip column between boundaries (Fig. 1a) and we order the set QC A B = − r I = PI accordingly from top to bottom, i.e., QC {1, 2, ..., N 1}. More (gray areas) of width I for A,B. Qubits in the support of L are associated with a set QI. Ancillas added in step (i) of the merging protocol formally, including ancillas in jiþ -states is equivalent to adding N − 1 single-qubit X stabilizers to GA ´ GB. Note that this step is are depicted as red dots and are associated with a set QC. Merging M not strictly necessary but it has been included here to highlight operations Gi , which are defined in Eq. (2), are indicated (in part) by dashed green lines (with only the ith component being covered). The the similarity to lattice surgery. Nonetheless, this step is useful if PA PB one operates solely on TSCs (rather than TSSCs), since this can product of all merging operations acts as L L such that a collective measurement projects onto a joint eigenstate of the two logical operators. allow reducing the interaction range of the resulting merged code M (see Methods section for details). Here, the diameter of an operator Gi can grow with the lattice sizes since (ii) Preparing lattices. Redundant vertices are added to the rA > rB. b Adding redundant vertices (gray dots) to the lattices increases the lattices Λ and Λ without adding corresponding new qubits. interaction range of the codes such that QA, QB, and QC contain the same A B number of qubits within each horizontal strip of thickness r between This corresponds to a relabeling that increases the interaction adjacent blue, dashed lines (e.g., the yellow area). Then, the diameter of range on both lattices and the distance between ancillas by at 2 = merging operators can be kept constant, i.e., independent of the system most a constant r , where r max{rA, rB}. This is done in such a size way that horizontal strips of width (height) r contain the same number of qubits in QA, QB, and QC (Fig. 1b). Beyond the strip locality condition, logical operators can be implemented row-by- containing the last element of QB we only require the same row by applying Pauli operations along paths connecting two number of qubits in QA and QC, except for the last strip, where boundaries such that excitations emerge only at its endpoints. If S QC contains one qubit less than QA. The lattices are then connected along their vertical boundary such that the resulting is not local, excitations might also emerge elsewhere since logical Λ operators can anticommute with generators that act nontrivially merged lattice M has linear dimension LA + LB + 1 along the on gauge qubits. Due to the translational invariance of generators horizontal direction. This step guarantees that the merged code remains topological according to the definition above. If a with respect to the underlying lattice, one can always increase the fi code distance or choose the lattice such that there exists a logical different de nition of locality is adopted for topological codes, Pauli operator whose support is covered by a vertical strip of step (ii) can be replaced by a stretching of the lattices to ensure maximal width r along the boundary (or at most a constant that the merged code is topological in the same sense as well. number of lattice sites away from it). (iii) Merging codes. After combining the underlying lattices, the codes are merged. To this end, one measures N merging Since it is a general feature of topological codes to support fi Λ logical string operators5, we can generalize the method of lattice operators, which are de ned on the new lattice M as 13,14 surgery to such codes. To this end, we consider any two TSCs M A B C C ; :::; ; A B Λ = 2 G ¼ P ; P ; Z Z 8i ¼ 1 N ð2Þ or TSSCs G and G on two 2D lattices, e.g., A [1, LA] and i L i L i i iÀ1 Λ = 2 B [1, LB] , with open boundaries that have distances dA and C ≡ 1 ≡ 1 ≥ dB, respectively. We place the lattices such that their vertical where Zi acts on ancilla i with Z0 and ZN . Since NA NB, A A B B B 1 > boundaries are aligned. Let PL 2L and PL 2L be two logical we identify PL;i  for i NB. operators defined along the aligned boundaries with maximal (iv) Correcting errors. In order to retain full fault tolerance, = width rA and rB, respectively, where rI is the interaction range of dmin min{dA, dB} rounds of error correction are required on the code I = A, B. The logical operators act nontrivially on a set of merged code. For this purpose, the structure of the merged code = = qubits, say QA and QB, respectively. Let NI jjQI (for I A, B) can be deduced from the SLS formalism that is introduced and = = and N max{NA, NB}. W.l.o.g. we assume NA N. We order the analyzed in Methods section. 5 Λ sets QI according to walks along paths on I running, e.g., from We now formulate the following theorem. top to bottom such that we can implement PI in a step-by-step = L Theorem 1. For any two TSCs (or TSSCs) defined on regular 2D fashion as described above. We write QI {1, 2, ..., NI} for such an ordering. For ease of notation, we denote qubits in the support of lattices with open boundaries, the procedure described in steps – A B PI by i = 1, ..., N since the association of qubits to the sets Q is (i) (iv) fault-tolerantly projects onto an eigenstate of PL PL . L I I Moreover, all operations in steps (iii) and (iv) correspond to clear from the context. Consequently, the logical operators take fi the form generators of a TSSC de ned on the merged lattice with potentially increased interaction range and distance no less than the minimum distance of the merged codes. PI ¼ PI PI ::: PI ; L L;1 L;2 L;NI ð1Þ For the proof of Theorem 1, we refer to Methods section, where the required SLS formalism is described in full detail. In this approach, the merged code is effectively treated as a subsystem I A B for single-qubit Pauli operators P ; acting on qubits i with i = 1, code and the original codes G and G are recovered by gauge L i fi ..., NI. xing. Note that in the merged code, some stabilizers at the

NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications 3 ARTICLE NATURE COMMUNICATIONS | DOI: 10.1038/s41467-017-01418-2

a | 〉 (SC) (SC) (CC) L MX m2 XL ZL ZL

MZZ m1

(CC) XL | 〉 | 〉 +L XL ZL L

Fig. 3 Circuit for measurement-based information processing implemented via lattice surgery. The upper and lower single, horizontal lines correspond to the logical qubits encoded in the color and surface codes, respectively. MZZ and MX are projective measurements that project onto an eigenstate of Z ⊗ Z X ⊗ 1 M b L L and L L respectively. ZZ is implemented through the merging protocol and code splitting described in the main text. The double lines (M) (M) XL ZL labeled m1 and m2 represent classical conditioning of the XL and ZL gates on the measurement outcomes m1 and m2, respectively

are defined on 2-face-colorable regular lattices with qubits located on vertices. The two colors are identified with X-orQ Z-type X; Z ðÞSC P generators Sp Sp 2S , respectively, acting as Sp ¼ v2N ðpÞ Pv, where NðpÞ is the set of vertices adjacent to the plaquette p and P = X, Z (Fig. 2a). Horizontal and vertical boundaries cut through plaquettes and can be associated with their respective colors. The lattice is constructed such that opposite boundaries are identified Fig. 2 Lattice surgery between a surface and a color code. a Examples of a with the same color. The number of logical qubits can be obtained surface code (SC) and a color code (CC) with distance 3 defined on lattices by a simple counting argument. It is given by the difference with open boundaries. Different types of boundaries are color coded. Qubits between the number of physical qubits and the number of are located on vertices depicted in blue. While plaquettes in the surface independent stabilizers. For the SC, the former is equal to the code correspond to X-type (yellow) and Z-type (orange) stabilizers, number of vertices v, while the latter equals the number of faces − = fi respectively, each plaquette in the color code corresponds to both X- and Z- f. Since v f 1, we nd that the SC encodes a single logical qubit. Logical operators for SCs are strings connecting boundaries type stabilizers. Representative logical Pauli operators XL and ZL are depicted by dashed lines and are tensor products of single-qubit X and Z of the same color that are separated by a boundary of a different operators, respectively. b Merging stabilizers are (orange) plaquette color. Note that, for any choice of SC, one such logical operator is operators acting as Z on qubits along the boundary and ancillas (all shown guaranteed to be aligned with the chosen (e.g., the vertical) 5 in fuchsia). Measuring all merging stabilizers projects onto a joint boundary , but one may not be able to freely choose whether this 8 ZðÞSC ZðÞCC Z logical operator is of Z-orX-type. 2D color codes are defined on eigenstate of the two logical operators L and L . While -type stabilizers remain unaffected, the procedure merges X-type stabilizers and 3-face-colorable regular lattices with qubits located on vertices. ðÞCC logical X operators, respectively, as displayed. In particular, the resulting The generators of the corresponding stabilizer group S are X Z merged code, labeled by M, encodes only one remaining logical qubit pairs of operators Sp and Sp , i.e., two independent stabilizers per fi ZðMÞ XðMÞ plaquette. The lattice is constructed such that we can use three de ned by L and L . Note that the geometry of the underlying codes can be chosen to fit the geometry of a specific computational architecture. colors to distinguish three types of boundaries and plaquettes. Note further that there are many different layouts realizing the same error That is, any two adjacent plaquettes have different colors from correction code and this figure merely shows a common variant each other and from their adjacent boundary (Fig. 2). In the CC, the number of physical qubits is equal to the number of vertices, boundary are merged while others can generate new gauge qubits. but there are two independent stabilizers for each face. A quick − = More details on the merged code structure in the most general count then reveals that the CC encodes one (v 2f 1) logical case and in the case of a specific TSSC can be found in the qubit. Logical operators for CCs are string operators along the Methods section. After the merging procedure described in steps lattice connecting three boundaries of different colors. This (i)–(iv), the two individual codes can be recovered by measuring implies that there exists a string along the boundary of one type all ancillas in the X-. In this case the merged code is split and that effectively connects all three boundaries. the two logical subspaces are left in a joint eigenstate of their As an example for the application of our protocol let us respective Pauli operators. Here it is important to note that error consider the situation shown in Fig. 2a, where the outcome of a correction has to be performed on the separate codes in order to quantum computation, encoded in an arbitrary logical state ψ α β retain full fault tolerance13. Quantum information can then be jiL ¼ ji0 þ ji1 of a color code, is transferred to a quantum teleported from one logical subspace to the other by measure- memory based on a surface code initialized in the state jiþL .A ment. This fault-tolerant way of transferring quantum states from circuit representation of this task is shown in Fig. 3. Since both one arbitrary TSC (or TSSC) to another provides a simple initial codes in Fig. 2a have distance 3, we include two ancillas in method that allows exploiting the advantages of different error the state jiþ , as instructed in step (i). Step (ii) of the protocol can correction codes. In particular, it can be used to realize an be omitted since the lattices in this example already have the interface between a (e.g., based on a surface desired structure. As laid out in step (iii) and illustrated in Fig. 2b, code) and a quantum (using, for example, a color code). one then measures joint Z stabilizers across the boundary, We will therefore now demonstrate our protocol for this crucial projecting the two surfaces onto a single, merged surface (M) corresponding to an eigenstate of ZðÞSC ZðÞCC . That is, the merging example of two TSCs. L L ðÞSC ðÞCC procedure projects onto a merged code that contains ZL ZL as a stabilizer. The reduced 2D logical subspace can be Color-to-surface code switching ðÞM ðÞCC . The archetypical examples for represented by Z ¼ Z and a merged X operator along TSCs are surface codes (SC) and color codes (CC). Surface codes6 L L L

4 NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications NATURE COMMUNICATIONS | DOI: 10.1038/s41467-017-01418-2 ARTICLE

ðÞM ðÞSC ðÞCC both surfaces, e.g., XL ¼ X X . Since both color and codes support other useful features such as single-shot error surface codes are TSCs, the merged code can be understood as a correction39. As we show in the Methods section, SLS can also be TSC (as opposed to a TSSC) and merging operators coincide with employed to switch between codes of different dimensions, as merging stabilizers. Then, as instructed in Fig. 2b, X-type well as between topological and non-topological codes. This stabilizers have to be extended onto ancillas while Z stabilizers facilitates the circumvention of both no-go theorems in an elegant remain unaffected. For details on the distinction between TSSCs fashion. At this point it should also be pointed out that many and TSCs, we refer to the SLS formalism introduced in the non-topological codes supporting transversal non-Clifford – Methods. Having obtained this merged code of distance 3, three gates35 37 have lower resource requirements than comparable consecutive rounds of error correction ensure fault tolerance as 3D topological codes or . However, while suggested in step (iv). Note that the merging procedure increases all 2D (and some 3D) TSSCs (including the merged code that the bias toward X-type errors since the minimum weight of appears during SLS) with local stabilizers feature error thresh- logical X operators is increased. However, note that increasing the olds19,38, the existence of error thresholds has not been proven for weight (and interaction range) of X stabilizers on the boundary any of the mentioned non-topological codes. That is, in the case can cause a temporarily worse error correction performance w.r.t. of non-topological codes it is not guaranteed that the storage time Z errors for the merged code than for the individual codes. can be made arbitrarily large by enlarging the code distance. Irrespective of this we can then proceed by splitting the codes. Codes have to be concatenated instead4. To this end, we simply measure ancillas in the X-basis, while In any of these cases, quantum can only be expected refraining from further measurement of the merging stabilizers. to operate as well as their weakest link. Here, this applies to the This procedure projects onto the separate surfaces while error correction code used. The clear advantage of SLS in this entangling the logical subspaces. After another three rounds of context is that the weakest link (i.e., code) may be employed on- ðÞCC error correction to preserve fault tolerance, measuring XL demand only and can otherwise be avoided. For instance, in a teleports the information according to the circuit displayed in distributed architecture a code for the implementation of, e.g., a Fig. 3. non-Clifford operation can be called only when required. In this scenario, SLS is particularly beneficial since non-Clifford opera- tions could also unfavorably transform errors present in the Discussion system36, while SLS does not carry such errors to other codes. SLS We have introduced the method of subsystem lattice surgery should thus not be seen as a stand-alone contender with other (SLS) as a generalization of lattice surgery13,14 to any pair of 2D methods of realizing universal fault-tolerant quantum computa- topological codes, exploiting their similarities20. The applicability tion, but rather as a facilitator thereof, allowing to selectively of our algorithm to all topological codes such that all topological combine and exploit the advantages of other methods. We hence features are preserved arises from their property to support expect lattice surgery to play a crucial role in future quantum logical string operators on the boundary5. Therefore, the rele- computers, be it as an element of a quantum bus or for dis- vance of our algorithm remains unchanged even if other topo- tributed quantum computing29. logical codes, such as the subsystem surface code21 (see also the Our findings further motivate experimental efforts to develop – Methods section) or Bacon-Shor code22 24, are used as quantum architectures that are flexible enough to implement and connect memories or processors. Indeed, our method can even be gen- surface and color codes and/or other codes. For instance, ion trap eralized beyond 2D topological codes at the expense of the 2D quantum computers40 may provide a platform soon capable of layout or topological features (see Methods section for details). performing lattice surgery between two distinct codes. In this In contrast to the method of code deformation18,25,26, where a endeavor, the inherent flexibility attributed to multizone trap single underlying lattice is smoothly deformed everywhere arrays41 may be beneficial. Moreover, topological codes and our through multiple rounds of local Clifford transformations, we approach to code switching are obvious choices for fault-tolerant combine two initially separate lattices through operations within quantum computation with architectures requiring nearest- constant distance of their boundaries. To the best of our neighbor interactions in fixed setups, such as superconducting – knowledge, other established methods for code conversion27 29 qubits42 or nitrogen-vacancy diamond arrays43. However, given have either been applied solely to specific codes, or have not been the local structure of topological codes and the simplicity of our generalized to subsystem codes. algorithm, the requirements for any architecture are compara- To highlight the usefulness of incorporating SLS into future tively low. quantum computers, let us briefly assess the current contenders Despite the inherent fault tolerance of SLS, the codes on which for fault-tolerant quantum computation. At present, one of the it is performed are nonetheless subject to errors. Further inves- most promising techniques is SC quantum computation supple- tigations of error thresholds2,19 for (non-)topological codes and mented by magic state injection30 in order to promote it to a bench-marking44 are therefore required, in particular with regard universal quantum computer. However, the overhead on magic to (subsystem) lattice surgery. Finally, our code switching method state distillation is large6,7 and it is expected that more effort will may find application in the design of adaptive error correction be directed towards identifying more resource-efficient techni- schemes45. ques. At the same time, other approaches to universal fault- tolerant quantum computation are significantly constrained by Methods no-go theorems that prohibit a universal set of transversal gates in Subsystem lattice surgery. In the main text, we have introduced a subsystem a single stabilizer code31 and transversal non- in 2D lattice surgery (SLS) protocol that is applicable to arbitrary 2D TSSCs, and we have topological codes32,33. The former no-go theorem can be cir- shown how it can be used to teleport quantum information between surface and fi 11,34 color codes. In this Methods section, we explain how lattice surgery can be cumvented by gauge xing or (subsystem) lattice surgery, and understood entirely within the subsystem stabilizer formalism. To this end, we is hence no issue for our approach. The latter no-go theorem can fi A ´ B A ´ B ´ A B – de ne SLS by the fault-tolerant mapping G G 7!G G PL PL , where the be avoided in a 3D architecture or non-topological codes35 37. merging procedure as described in steps (i)–(iv) and formalized in Theorem 1 is an One potential replacement for magic state distillation is hence the initialization of an intermediate, merged code GM and the splitting fixes gauge A ´ B ´ A B M 11,38 degrees-of-freedom to obtain G G PL PL from G . 3D gauge color code which successfully sidesteps both no-go To see this, we again consider two “standard” TSSCs, GA and GB. Note that we theorems. Even though the resource requirement is similar to that thereby exclude certain pathological “exotic” codes as will be explained in the proof of quantum computation with the surface code38, 3D topological of Lemma 1. Adopting the previous notation, we assume that the lattices have been

NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications 5 ARTICLE NATURE COMMUNICATIONS | DOI: 10.1038/s41467-017-01418-2

I = chosen such that the logical operators PL (I A, B) along their boundaries have restricted cases that (to the best of our knowledge) do not feature in any practical support on NA and NB qubits, respectively. For ease of presentation we further scenario, we will exclude codes with such properties from our construction. = = I = A B choose NA NB N. Now, let G with I A, B be codes characterized by the tuples Note that we can also exclude cases where wðP j ÞþwðP j Þ¼0. In such KA KB [[nI, kI, gI, dI]], where nI are the numbers of physical qubits, kI the numbers of A; B A ´ B I I cases at least two logical operators P P 2L L with suppðP ÞsuppðPLÞ logical qubits, gI the numbers of gauge qubits, and dI are the distances, respectively. (I = A, B) exist. However, we are only interested in projecting onto the joint I ; :::; I I = − − We choose the generating set fG G g for code G , where sI nI kI gI is A B 1 sI þ2gI eigenstate of any two logical operators P and P along the boundary. Therefore, the number of independent stabilizer generators (or the number of stabilizer qubits L L we can always exclude the aforementioned case by choosing PA and PB such that in accordance with our previous terminology). The lattices are then aligned and L L there does not exist a logical operator that has support on a subset of Q . In the case prepared as in step (ii) of the algorithm described in the main text, but we omit I of TSSC with non-local stabilizers, such logical operators may have support on including ancillas for now. We proceed by defining the merging operators disconnected regions of a lattice19. Then, these regions have to be connected using M A B ; :::; local generators to obtain proper string operators. Then, any non-trivial logical Gi ¼ PL;iPL;i 8i ¼ 1 N ð3Þ operator of the merged code has support on at least dmin qubits. The distance of the merged code is hence at least dmin. Λ Δ ≤ − on the merged lattice M. From these merging operators, we then collect g N Third, the merged code is scalable since the separate codes are scalable. Thus, M M A B 1 (where the meaning of this notation becomes apparent in theÈÉ following section) we can conclude that G is indeed a TSSC. At last, note that fixing S to S ´ S A ´ B ´ A B M through a measurement of stabilizers S 2SA ´ SB anticommuting with at least one inequivalent ones (w.r.t. G G PL PL ) in the set W¼ Gi i¼1;:::;Δg , and call the group generated by these operators M. We refer to elements of W as merging generator, the separate codes can be recovered while retaining the A B fi merging generators. This allows us to define the subsystem code eigenstate of PL PL . This gauge xing has to be accompanied by error correction DEDE to ensure full fault tolerance. Q.E.D. fi M A A B B To nally prove Theorem 1, we will now explain the connection between the G :¼ G ; :::; G ´ G ; :::; G ´ M ´ hii : ð4Þ M 1 sA þ2gA 1 sB þ2gB merged code G defined in Eq. (4) and the framework discussed in the main text. The merging procedure described in steps (ii)–(iv) can be understood as an fi Note that, technically, Eq. (4) specifies a subsystem stabilizer code only if the center initialization of the merged code. Speci cally, measuring merging generators as in M A ´ B of GM is non-empty, such that a stabilizer subgroup SM can be defined. That this is Eq. (3) (or similarly, Eq. (2)) initializes G from the prepared codes G G . The parity of all random measurement outcomes yields the parity of PA PB and error indeed the case follows from Lemma 2. As we will show next, the code GM has the L L correction has to be performed thereafter in order to ensure correctness (see step structure of the merged code discussed in Theorem 1. The essential features of this (iv)). Fault tolerance is guaranteed since merging generators are constant-weight structure can be captured in the following Lemma. and errors can only propagate to a constant number of physical qubits. Since we M fi Λ M Lemma 1. The code G de ned in Eq. (4) is a TSSC on the merged lattice M with have established in Lemma 1 that G is indeed a TSSC with distance at least dmin, = M fi distance no less than dmin min({dA, dB}). In addition, G can be gauge xed to this concludes the proof of Theorem 1. GA ´ GB ´ PA PB , effectively splitting the code into GA and GB. Altogether, by proving Theorem 1 and Lemma 1, we showed that SLS is fault- L L A B M Proof. First, let us show that GM obeys the locality condition for TSSCs. By tolerant and well-defined through a merging, i.e., a mapping G ´ G 7!G , M A ´ B ´ A B definition, generators of the separated codes are also generators of the merged code. followed by a splitting, i.e., a mapping G 7!G G PL PL . Their interaction range is increased by at most a constant along the vertical Concluding this Methods section, we return to the discussion of the ancillas direction due to the relabeling in step (ii). Thereby, the interaction range of added during step (i) of the preparation. As already discussed in the main text, merging generators is also kept constant. The generators of the code GM are hence ancillas can be understood as additional stabilizer qubits included into the initial all local. codes. In the merged code these become gauge qubits. The usefulness of ancillas arises when one considers TSCs as it is the case for the example discussed in the Second, we verify that the distance of the merged code isÀÁ at least dmin. Since GA ´ GB ´ PA PB is a subgroup of GM, the normalizer N GM is a subgroup of Results section. In that case the merged code can be understood as a TSC with ÀÁL L stabilizers merged across the boundary. Here, introducing ancillas means that N GA ´ GB ´ PA PB . Then, note that there exist stabilizers S 2SA ´ SB that L L stabilizers of one surface are instead merged with stabilizers of ancillas, allowing for anticommute with some GM 2M. If that was not the case, all GMj would either QI the possibility of reducing the interaction range of the merged code. be elements of the code GI or undetectable errors. The latter option can be ruled out in accordance with the argument in the proof of Lemma 2. The former option, GMj 2GI 8GM 2M, would imply that PI is not a logical operator. In a quantum Merged code structure. In this section, we provide a careful analysis of the QI L M error correction code, such mutually anticommuting operators act either on the merged code. In particular, we will discuss the structure of the subgroups S and M M − Δ logical subspace or on gauge qubits. However, any stabilizer of the separate codes is LG . Here we claim that G is a [[nA + nB, kA + kB 1, gA + gB + g, dM]] code with ≥ also contained in GM according to the definition of the merged code in Eq. (4). distance dM dmin. That is, the distance dM merged code has nA + nB physical qubits, k + k − 1 logical qubits, and g + g + Δg gauge qubits, where Δg is the Now recall that if GM is a subsystem stabilizer code, it can be decomposed as A B A B M M ´ M ´ number of merging generators (see Eq. (3)). To see this, we have to understand the G ¼LG S hii , as explained in the main text. Therefore, the aforementioned M M A ´ B structure of S and GG in comparison with the separate codes G G . anticommuting stabilizers S must act on gauge qubits and we can hence identify S fi Δ M M First, note that we can de ne g new gauge qubits via theirÂÃ respective Pauli as belonging to L . Later, we will further elaborate on the structure of G . Since M; ∈ A B ∀ M; ≠ G operators G Si ;:::;Δ where Si S × S i such that G Sj ¼ 0 for i j. A B M i i¼1 g i S ´ S contains elements that are not in the stabilizer of G but not vice versa, That is, there exist Δg independent stabilizers which are now included as gauge M A ´ B ´ A B S must beÀÁ a subgroup of S S PL PL . Consequently, any equivalence operators together with the same number of merging generators. As we will see, the M M A class of N G =S is contained in an equivalence class of existence of such stabilizers is guaranteed by the choice of logical operators PL and ÀÁ ÀÁ B A ´ B ´ A B = A ´ B ´ A B PL as explained in the proof of Lemma 1. N G G PL PL S S PL PL . The quotient group NðGÞ=S defines so-called bare logical operators that do not A B Lemma 2. For the operators PL and PL chosen above thereÈÉ exists a stabilizer act on gauge qubits. Generally, NðGÞ=hiSi contains all information about the hiA ´ B M M; Si 2S S for any mergingÈÉ generator Gi 2Wsuch that Gi Si ¼ 0 and logical operators but not about all undetectable errors. At the same time, M M M G ; Si ¼ 0 8G 2WÀ G . undetectable errors are related to bare logical operators, since NðSÞ=G’ j j i 19 Proof. Suppose such a stabilizer does not exist. Then, there exists a G 2Mthat NðGÞ=hiSi for any subsystem stabilizer code G . To conclude then that the M ψ M ψ M yields the same error syndrome as Gi , i.e., Gi G ¼ 0 for any codeword distance of G is dmin, we have to verifyÀÁ that deformations (i.e., multiplications) of ψ A ´ B M = A ´ B A ´ B M M M ji2C C . Since Gi G2G G , it is a non-trivial logical operator in L L . any non-trivial, logical operators P 2 N G =S by operators in G yield M A ´ B Combining this with the fact that WfGj gj¼1;:::;N , the existence of the logical operators of weight at least dmin. Since any such P is also contained in L L this M I is true for deformations by operators in GA ´ GB. But we still need to confirm this operator Gi G is not compatible with our construction of PL as discussed in the ÀÁ I M A ´ B fi proof of Lemma 1. That is, there exist no logical operators PI 2L with for operators in G ÀG G . Speci cally, we have to consider deformations ÀÁ ðÞI I = I under GM . In principle, these merging operators can reduce the weight of supp P supp PL (I A, B) for our choice of PL. Q.E.D. i i¼1;:::;N We have hence defined Δg new gauge qubits by W and the same number of operators P below dmin. However, this can only happen under rather exotic independent stabilizers. As another consequence of Lemma 2, we can also define an = A ⊗ B circumstances. That is, only for logical operators of the form P P P , where additional stabilizer equivalent to PA PB. That is, the merged code has s + s − I I = I ≁ I I ⊂ L L A B P 2L (I A, B) and P PL acts as PL on a region KI QI such that for the Δg + 1 independent stabilizers and thus, a necessarily non-empty center (but ∪ Λ complementary regions KI (with KI KI being the set of all qubits on lattice I and reduced logical subspace). K \ K ¼ K À K ) the weights of these operators satisfy 0

6 NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications NATURE COMMUNICATIONS | DOI: 10.1038/s41467-017-01418-2 ARTICLE

generators. Consequently, we can identify 2 additional gauge qubits, i.e., 4 in total, a A A B B S3 ZL ZL S3 M A; A B; B; B; M; B; M; A : LG / G1 G3 S1 G1 G3 G1 S1 G3 S4 ð8Þ

Here we included a semicolon between generators of independent gauge qubits and G A GA G B GB A 1 3 B 1 3 neglected additional phases. Evidently, this code has the structure predicted in the S1 S1 preceding Methods section and is indeed a TSSC with distance 3.

Beyond 2D topological codes. Finally, let us discuss the applicability of SLS to A B A S B S higher-dimensional topological codes as well as to non-topological codes. As we X A A 4 X B GB 4 L G2 G4 L G2 4 shall argue, all of the above holds true in these cases. In short, this is because the essential feature of SLS is to project onto a joint eigenstate of two logical operators by measuring generators of a merged code. Such a merged code can always be A B S2 S2 formally defined, irrespective of whether or not the initial codes are topological. Let us first consider topological codes in more than two dimensions. For instance, 3D topological codes (as opposed to 2D topological codes) can support b A B ZL ZL membrane-like logical operators on their 2D boundary46,47. Similarly, it can be GM 1 expected that most topological codes in D dimensions can support logical operators that are associated with (D − 1)-dimensional extended objects on the boundary46. With this assumption, it is straightforward to show that SLS can be applied in any

M dimension. This leaves us with the question of whether SLS can also be used to G2 switch between dimensions. This is indeed the case, since, interestingly, 3D topological codes also support string-like logical operators33 which can be used to teleport information from a 2D topological code to a higher-dimensional one via X M L GM SLS. In fact, at the expense of its 2D layout, a 2D code can even be wrapped along 3 the surface of a 3D code to perform SLS between a string- and a membrane-like logical operator while preserving a 3D notion of locality. Finally, let us consider the effects of relaxing the constraint of demanding topological features for the quantum error correction codes under scrutiny. For Fig. 4 Subsystem lattice surgery between two subsystem surface codes. a such codes there exists no notion of locality or scalability. Therefore, an underlying Example of two subsystem surface codes with distance 3 labeled by A, B, lattice of physical qubits cannot be defined in a meaningful way. However, when respectively. Qubits are located on vertices depicted in blue, while the revising the arguments from Lemmas 1 and 2 in the spirit of non-topological codes, central gray vertices are unoccupied. Plaquette generators GI and SI (I = A, it turns out that one does not require any topological features to prove that the i i distance of the merged code is the minimum distance of the initial codes. Neither is X Z B) are color coded with -type and -type operators drawn in yellow and it necessary to require locality or scalability to show that the merged code can be XI ZI fi fi orange, respectively. Representative logical Pauli operators L and L are gauge- xed to the original codes. The merged code as speci ed in Eq. (4) is always depicted by dashed lines and are tensor products of single-qubit X and Z well-defined algebraically even without topological features. That is, at the expense operators, respectively. b The merged code, labeled by M, with additional of locality and/or scalability, Lemmas 1 and 2 hold and we can use SLS to switch between topological and non-topological codes. Nevertheless, one can expect that GM X M merging generators i colored in fuchsia. Some -type operators in S scalability in particular is a feature that is desirable for any code. Therefore, let us M and LG are merged across the boundary in accordance with Eqs. (7) and note that the merged code is scalable if the separate codes are scalable even if it is (8). Including merging generators to the codes reduces the dimension of not topological otherwise. As an example of codes that are scalable but not 36 the logical subspace by one topological consider the doubled codes which are also amenable for SLS.

..., Δg. Otherwise, we would simply have to apply the same argument to ~g 2 Data availability. Data sharing is not applicable to this article as no data sets were A ´ B ~; M ∈ ′ ⊆ Δ generated or analyzed during the current study. LG LG with fg Gj g¼0 for some j J {1, ..., g}. One can see that this code is indeed generated as indicated in Eq. (4). Hence, the distinction to the separated codes is that some stabilizers now act on gauge qubits Received: 20 March 2017 Accepted: 14 September 2017 which can be reversed by gauge fixing. Interestingly, applying this formalism to two Bacon-Shor codes22 on regular square lattices [1, L]2, yields a merged, asymmetric Bacon-Shor code23 on a [1, 2L] × [1, L] lattice.

Subsystem surface code lattice surgery. Here, we exemplify SLS by means of the subsystem surface code (SSC)21. Therefore, consider two such codes GA and GB References fi 2 de ned on regular square lattices [1, L] with qubits located on vertices. In Fig. 4a, 1. Nielsen, M. A. & Chuang, I. L. Quantum Computation and Quantum = = fi we chose the smallest SSC with distance d L 3de ning a unit cell where the Information (Cambridge University Press, Cambridge, 2000). central vertex is unoccupied. The codes are generated by triangle and boundary 2. Preskill, J. Fault-tolerant quantum computation. in: Introduction to Quantum I I = = operators, labeled Gi and Si , respectively, with i 1, ..., 4 and I A, B (Fig. 4a). Computation and Information (eds Lo, H.-K., Spiller, T. & Popescu, S.) (World- I TriangleQ operators fGi gi¼1;:::;4 act on qubitsQ adjacent to a triangular plaquette p as Scientific, Singapore, 1998). I = I = Gi ¼ v2N ðpÞ Xv for i 2, 3 and Gi ¼ v2N ðpÞ Zv for i 1, 4. Boundary operators 3. Campbell, E. T., Terhal, B. M. & Vuillot, C. The steep road towards robust and I 549 fSi gi¼1;:::;4 are weight-two Pauli operators acting on every other pair of boundary universal quantum computation. Nature, , 172-179 (2017). qubits as either X-type or Z-type operators for i = 1, 4 and 4. Gottesman, D. Stabilizer Codes and Quantum Error Correction (California i = 2, 3, respectively. The stabilizer group is defined as Insitute of Technology, Pasadena, 1997). 5. Bravyi, S. & Terhal, B. A no-go theorem for a two-dimensional self-correcting I I ; :::; I ; I I ; I I : S ¼ S1 S4 G1G4 G2G3 ð5Þ quantum memory based on stabilizer codes. New J. Phys. 11, 043029 (2009). 6. Bravyi, S. B. & Kitaev, A. Y. Quantum codes on a lattice with boundary. Henceforth, we write A ∝ B whenever we identify a group A with a generating set B Preprint at https://arxiv.org/abs/quant-ph/9811052 (1998). up to phases. A single gauge qubit is defined up to irrelevant phases by 7. Fowler, A. G., Mariantoni, M., Martinis, J. M. & Cleland, A. N. Surface codes: towards practical large-scale quantum computation. Phys. Rev. A 86, 032324 I I ; I : LG / G1 G3 ð6Þ (2012). 8. Bombín, H. & Martín-Delgado, M. A. Topological quantum distillation. Phys. I I 97 Logical operators XL and ZL are tensor products of single-qubit Pauli X- and Z Rev. Lett. , 180501 (2006). operators, respectively, connecting two opposite boundaries as shown in Fig. 4a. 9. Fujii, K. & Tokunaga, Y. Error and loss tolerances of surface codes with general M Now we initialize a merged code by measuring merging generators fGi gi¼1;2;3 lattice structures. Phys. Rev. A 86, 020303(R) (2012). as depicted in Fig. 4b. The merged code is left with 5 stabilizer qubits, 10. Wang, D. S., Fowler, A. G. & Hollenberg, L. C. L. Surface code with error rates over 1%. Phys. Rev. A 83, 020302(R) (2011). M A; B; A A B; A B B; A B ; S ¼ S1 S4 G2 G3 S1 S4 G2 G3 ZL ZL ð7Þ 11. Bombín, H. Gauge color codes: optimal transversal gates and gauge fixing in topological stabilizer codes. New J. Phys. 17, 083002 (2015). where we only kept stabilizers in SA ´ SB that commute with the merging

NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications 7 ARTICLE NATURE COMMUNICATIONS | DOI: 10.1038/s41467-017-01418-2

12. Bombín, H. Dimensional jump in quantum error correction. New J. Phys. 18, 40. Nigg, D. et al. Quantum computations on a topologically encoded qubit. Science 043038 (2016). 345, 302 (2014). 13. Horsman, C., Fowler, A. G., Devitt, S. & Van Meter, R. Surface code quantum 41. Bowler, R. et al. Coherent diabatic ion transport and separation in a multizone computing by lattice surgery. New J. Phys. 14, 123011 (2012). trap array. Phys. Rev. Lett. 109, 080502 (2012). 14. Landahl A. J. & Ryan-Anderson, C. Quantum computing by color-code lattice 42. Barends, R. et al. Superconducting quantum circuits at the surface code surgery. Preprint at https://arxiv.org/abs/1407.5103 (2014). threshold for fault tolerance. Nature 508, 500 (2014). 15. Poulin, D. Stabilizer formalism for operator quantum error correction. Phys. 43. Yao, N. Y. et al. Scalable architecture for a room temperature solid-state Rev. Lett. 95, 230504 (2005). quantum information processor. Nat. Commun. 3, 800 (2012). 16. Raussendorf, R. & Briegel, H. J. A one-way quantum computer. Phys. Rev. Lett. 44. Delfosse, N., Iyer, P. & Poulin, D. A linear-time benchmarking tool for 86, 5188 (2001). generalized surface codes. Preprint at https://arxiv.org/abs/1611.04256 (2016). 17. Zanardi, P., Lidar, D. & Lloyd, S. Quantum tensor product structures are 45. Orsucci, D., Tiersch, M. & Briegel, H. J. Estimation of coherent error sources induced. Phys. Rev. Lett. 92, 060402 (2004). from stabilizer measurements. Phys. Rev. A 93, 042303 (2016). 18. Bombín, H. Structure of 2D topological stabilizer codes. Commun. Math. Phys. 46. Bombín, H. & Martín-Delgado, M. A. Exact topological quantum order in 327, 387 (2014). D = 3 and beyond: Branyons and brane-net condensates. Phys. Rev. B 75, 19. Bombín, H. Topological subsystem codes. Phys. Rev. A 81, 032301 (2010). 075103 (2007). 20. Bombín, H., Duclos-Cianci, G. & Poulin, D. Universal topological phase of two- 47. Bombín, H., Chhajlany, R. W., Horodecki, M. & Martín-Delgado, M. A. Self- dimensional stabilizer codes. New J. Phys. 14, 073048 (2012). correcting quantum computers. New J. Phys. 15, 055023 (2013). 21. Bravyi, S., Duclos-Cianci, G., Poulin, D. & Suchara, M. Subsystem surface codes with three-qubit check operators. Quant. Inf. Comput. 13, 0963 (2013). Acknowledgements 22. Bacon, D. Operator quantum error-correcting subsystems for self-correcting quantum memories. Phys. Rev. A 73, 012340 (2006). We are grateful to Rainer Blatt, Nicolas Delfosse, Vedran Dunjko, Alexander Erhard, 23. Brooks, P. & Preskill, J. Fault-tolerant quantum computation with asymmetric Esteban A. Martinez, and Philipp Schindler for valuable discussions and comments. We Bacon-Shor codes. Phys. Rev. A 87, 032310 (2013). acknowledge support from the Austrian Science Fund (FWF) through the DK-ALM: 24. Yoder, T. J. Universal fault-tolerant quantum computation with Bacon-Shor W1259-N27, the SFB FoQuS: F4012, the START project Y879-N27, and the Templeton codes. Preprint at https://arxiv.org/abs/1705.01686 (2017). World Charity Foundation Grant No. TWCF0078/AB46. 25. Bombín, H. & Martín-Delgado, M. A. Quantum measurements and gates by code deformation. J. Phys. A: Math. Theor. 42, 095302 (2009). Author contributions 26. Kubica, A., Yoshida, B. & Pastawski, F. Unfolding the color code. New J. Phys. H.P.N. has devised the code switching protocol, proven Theorem 1 and composed the 17, 083026 (2015). manuscript. N.F. has contributed to the conceptual development of the project and 27. Anderson, J. T., Duclos-Cianci, G. & Poulin, D. Fault-tolerant conversion helped writing the manuscript. H.J.B. has supervised the project. All authors have dis- between the steane and reed-muller quantum codes. Phys. Rev. Lett. 113, cussed the results. 080501 (2014). 28. Hwang, Y., Choi, B.-S., Ko, Y.-C. & Heo, J. Fault-tolerant conversion between stabilizer codes by Clifford operations. Preprint at https://arxiv.org/abs/ Additional information 1511.02596 (2015). Supplementary Information accompanies this paper at doi:10.1038/s41467-017-01418-2. 29. Nagayama, S. Distributed Quantum Computing Utilizing Multiple Codes on fi Imperfect Hardware (Graduate School of Media and Governance, Keio Competing interests: The authors declare no competing nancial interests. University, Fujisawa, 2017). 30. Bravyi, S. & Kitaev, A. Universal quantum computation with ideal Clifford Reprints and permission information is available online at http://npg.nature.com/ gates and noisy ancillas. Phys. Rev. A 71, 022316 (2005). reprintsandpermissions/ 31. Eastin, B. & Knill, E. Restrictions on transversal encoded quantum gate sets. Phys. Rev. Lett. 102, 110502 (2009). Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in fi 32. Bravyi, S. & König, R. Classification of topologically protected gates for local published maps and institutional af liations. stabilizer codes. Phys. Rev. Lett. 110, 170503 (2013). 33. Pastawski, F. & Yoshida, B. Fault-tolerant logical gates in quantum error- correcting codes. Phys. Rev. A 91, 012305 (2015). 34. Paetznick, A. & Reichardt, B. W. Universal fault-tolerant quantum computation Open Access This article is licensed under a Creative Commons with only transversal gates and error correction. Phys. Rev. Lett. 111, 090505 Attribution 4.0 International License, which permits use, sharing, (2013). adaptation, distribution and reproduction in any medium or format, as long as you give 35. Jochym-Oonnor, T. & Bartlett, S. D. Stacked codes: universal fault-tolerant appropriate credit to the original author(s) and the source, provide a link to the Creative quantum computation in a two-dimensional layout. Phys. Rev. A 93, 022323 Commons license, and indicate if changes were made. The images or other third party (2016). material in this article are included in the article’s Creative Commons license, unless 36. Bravyi, S. & Cross, A. Doubled color codes. Preprint at https://arxiv.org/abs/ indicated otherwise in a credit line to the material. If material is not included in the 1509.03239 (2015). article’s Creative Commons license and your intended use is not permitted by statutory 37. Jones, C., Brooks, P. & Harrington, J. Gauge color codes in two dimensions. regulation or exceeds the permitted use, you will need to obtain permission directly from Phys. Rev. A 93, 052332 (2016). the copyright holder. To view a copy of this license, visit http://creativecommons.org/ 38. Brown, B. J., Nickerson, N. H. & Browne, D. E. Fault-tolerant error correction licenses/by/4.0/. with the gauge color code. Nat. Commun. 7, 12302 (2016). 39. Bombín, H. Single-shot fault-tolerant quantum error correction. Phys. Rev. X 5, 031043 (2015). © The Author(s) 2017

8 NATURE COMMUNICATIONS | 8: 1321 | DOI: 10.1038/s41467-017-01418-2 | www.nature.com/naturecommunications