Hendrik Poulsen Nautrup1, Nicolai Friis2,3, Hans J Briegel2. 1. Institute for Theoretical Physics, University of Innsbruck, Technikerstr. 21a, 6020, Innsbruck, Austria. hendrik.poulsen-nautrup@uibk.ac.at. 2. Institute for Theoretical Physics, University of Innsbruck, Technikerstr. 21a, 6020, Innsbruck, Austria. 3. Institute for Quantum Optics and Quantum Information, Austrian Academy of Sciences, Boltzmanngasse 3, 1090, Vienna, Austria.
Abstract
Topological error correction codes are promising candidates to protect quantum computations from the deteriorating effects of noise. While some codes provide high noise thresholds suitable for robust quantum memories, others allow straightforward gate implementation 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 quantum information between arbitrary topological subsystem codes in two dimensions and beyond. In particular, it can be employed to create a simple interface, a quantum bus, between noise resilient surface code memories and flexible color code processors.
Topological error correction codes are promising candidates to protect quantum computations from the deteriorating effects of noise. While some codes provide high noise thresholds suitable for robust quantum memories, others allow straightforward gate implementation 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 quantum information between arbitrary topological subsystem codes in two dimensions and beyond. In particular, it can be employed to create a simple interface, a quantum bus, between noise resilient surface code memories and flexible color code processors.
Noise and decoherence can be considered as the major obstacles for large-scale quantum information processing. These problems can be overcome by fault-tolerant quantum computation[1,2], which holds the promise of protecting a quantum computer from decoherence for arbitrarily long times, provided the noise is below a certain threshold. Quantum error correction codes are indispensable for any fault-tolerant quantum computation scheme[3]. Among these, stabilizer codes[4], building on classical coding theory, admit a particularly compact description. In particular, the subclass of topological stabilizer codes (TSCs)[5] is promising since TSCs are scalable and permit a local description on regular D-dimensional lattices.Two of the most prominent examples of TSCs in two dimensions are surface codes[6,7] and color codes[8]. While surface codes support adaption to biased noise[9] and have better error thresholds than comparable color codes[10], they do not support a transversal phase gate. However, transversality is essential for any encoded quantum logic gate since it guarantees a straightforward implementation within a quantum error correction code. Gauge color codes, for example, were recently shown to support the transversal implementation of a universal set of gates in a three-dimensional (3D) layout[11]. It is hence desirable to store quantum information in surface code quantum memories while performing computation on color codes in two (and three) dimensions[12].Here we present a protocol that makes such hybrid computational architectures viable. We develop a simple, fault-tolerant conversion scheme between two-dimensional (2D) surface and color codes of arbitrary size. Our flexible algorithm for code switching is based on a formalization of lattice surgery[13,14] in terms of operator quantum error correction[15] and measurement-based quantum computation[16]. This introduces the notion of subsystem lattice surgery (SLS), a procedure that can be understood as initializing and gauge fixing a single subsystem code. The required operations act locally on the boundaries, preserve the 2D structure, and are generators of a topological code. As all generators of the resulting code have constant size, errors on any of their components only affect a constant number of qubits, making the protocol inherently fault-tolerant. As we explicitly show, this generalizes the methodology of lattice surgery to any combination of 2D topological subsystem stabilizer codes, with color-to-surface code switching as an example of particular interest. While we restrict ourselves to 2D topological codes for the better part of this paper, we show that the essential ingredients of SLS carry over to higher-dimensional codes. In fact, the procedure works even for non-topological codes at the expense of locality. Therefore, our results represent a significant step toward a fault-tolerant interface between robust quantum memories and versatile quantum processors, independently of which topological codes will ultimately prove to be most effective. The method proposed here hence has the prospect of connecting different components of a future quantum computer in an elegant, practical, and simple fashion.
Results
Stabilizer formalism
We consider a system comprised of n qubits with Hilbert space . The group of Pauli operators on is generated under multiplication by n independent Pauli operators and the imaginary unit i. We write where X
, Z
are single-qubit Pauli operators acting on qubit j. An element has weight w(P) if it acts nontrivially on w qubits. We define the stabilizer group for s ≤ n as an Abelian subgroup of such that the generators S
are independent operators ∀i = 1, ..., s and . defines a 2-dimensional codespace of codewords through the condition , encoding k = n − s qubits. We denote the normalizer of by , which here is the subgroup of that commutes with all elements of . That is, elements of map the codespace to itself. We write for the (quotient) group of logical operators which induces a tensor product structure on , i.e., . This construction implies that different logical Pauli operators are distinct, non-trivial classes of operators with an equivalence relation given by multiplication of stabilizers.The distance of an error correction code is the smallest weight of an error such that E is undetectable. The code can correct any set of errors iff
. A stabilizer code defined through has distance d iff contains no elements of weight less than d. Equivalently, any non-trivial element of is supported on at least d qubits. By the above error-correction condition, an error with weight at most (d−1)/2 can be corrected while an error E with weight d/2 ≤ w(E) < d can only be detected. From a slightly different perspective, codewords are degenerate ground states of the Hamiltonian . Adopting this viewpoint, correctable errors are local excitations in the eigenspace of H since they anticommute with at least one generator , while logical operators map the degenerate ground space of H to itself.
Subsystem stabilizer formalism
A subsystem structure can be induced on stabilizer codes by considering non-Abelian gauge symmetries[15]. The group of gauge transformations is defined as where is a stabilizer group and is the group of operators in that are not in a non-trivial class of . This imposes a subsystem structure on the codespace where all operators in act trivially on the logical subspace
[17]. While logical operators in define logical qubits in , operators in define so-called gauge qubits in . That is, operations in and both come in pairs of (encoded) Pauli X and Z operators for each logical and gauge qubit, respectively. We recover the stabilizer formalism if is Abelian, i.e., . As before, a set of errors is correctable iff
. Errors can again be considered as local excitations in the eigenspace of a Hamiltonian where g is the number of generators .
Topological stabilizer codes
Stabilizer codes are called topological if generators have local support on a D-dimensional lattice. Here we focus on 2D rectangular lattices Λ = [1, L] × [, L′] with linear dimensions L and L′ in the horizontal and vertical direction, respectively, where qubits are located on vertices (not necessarily all are occupied) but our discussion can be easily extended to arbitrary regular lattices. We call a generator local[5] if it has support within a square containing at most r
2 vertices for some constant r, called interaction range or diameter. Moreover, we require of a TSC that its distance d can be made arbitrarily large by increasing the lattice size. In other words, the generators S
are not only local but also translationally invariant at a suitable scale[18]. This definition of TSCs can be extended straightforwardly to topological subsystem stabilizer codes (TSSCs)[19] where we impose locality on the generators of instead of . Then, generators of are not necessarily local.
Logical string operators
An intriguing feature of 2D topological codes is that logical operators can be interpreted as moving point-like excitations around the lattice, i.e. logical operators form strings across the lattice. Specifically, for any 2D TSC or TSSC on a lattice with open boundaries there exists a quasi-1D string of tensor products of Pauli operators generating a logical Pauli operator whose support can be covered by a rectangle of size r × L′[5], i.e., a vertical strip of width at most r. If obeys the locality condition, logical operators can be implemented row-by-row by applying Pauli operations along paths connecting two boundaries such that excitations emerge only at its endpoints. If is not local, excitations might also emerge elsewhere since logical operators can anticommute with generators that act nontrivially on gauge qubits. Due to the translational invariance of generators with respect to the underlying lattice, one can always increase the code distance or choose the lattice such that there exists a logical Pauli operator whose support is covered by a vertical strip of maximal width r along the boundary (or at most a constant number of lattice sites away from it).Since it is a general feature of topological codes to support logical string operators[5], we can generalize the method of lattice surgery[13,14] to such codes. To this end, we consider any two TSCs or TSSCs and on two 2D lattices, e.g., ΛA = [1, L
A]2 and ΛB = [1, L
B]2, with open boundaries that have distances d
A and d
B, respectively. We place the lattices such that their vertical boundaries are aligned. Let and be two logical operators defined along the aligned boundaries with maximal width r
A and r
B, respectively, where r
is the interaction range of code I = A, B. The logical operators act nontrivially on a set of qubits, say Q
A and Q
B, respectively. Let N
= (for I = A, B) and N = max{N
A, N
B}. W.l.o.g. we assume N
A = N. We order the sets Q
according to walks along paths[5] on Λ running, e.g., from top to bottom such that we can implement in a step-by-step fashion as described above. We write Q
= {1, 2, ..., N
} for such an ordering. For ease of notation, we denote qubits in the support of by i = 1, ..., N
since the association of qubits to the sets Q
is clear from the context. Consequently, the logical operators take the formfor single-qubit Pauli operators acting on qubits i with i = 1, ..., N
.
Merging protocol and code splitting
Given the two codes and with respective logical Pauli operators and along boundaries, the goal is to achieve a mapping that projects onto an eigenstate of (i.e., a Bell state). Therefore, we now define a fault-tolerant protocol that merges the two codes into one, similar to the method of lattice surgery, which has been developed for surface codes[13] and extended to color codes[14]. As we will see, the merged code can then be split to realize the mapping described above. The merging procedure has the following four steps.(i) Including ancillas. We introduce a set Q
C of N − 1 ancillas initialized in the +1 eigenstates of their respective Pauli X operators. The ancillas are placed on newly added vertices along a column between boundaries (Fig. 1a) and we order the set Q
C accordingly from top to bottom, i.e., Q
C = {1, 2, ..., N − 1}. More formally, including ancillas in -states is equivalent to adding N − 1 single-qubit X stabilizers to . Note that this step is not strictly necessary but it has been included here to highlight the similarity to lattice surgery. Nonetheless, this step is useful if one operates solely on TSCs (rather than TSSCs), since this can allow reducing the interaction range of the resulting merged code (see Methods section for details).
Fig. 1
Subsystem lattice surgery between two topological codes. a Depiction of two topological codes defined on lattices ΛA and ΛB (grid not shown), respectively. Logical Pauli operators of the respective codes I = A, B are represented by solid red lines connecting qubits (blue dots) within ΛA and ΛB, respectively. These operators have support on a vertical strip (gray areas) of width r
for I = A,B. Qubits in the support of are associated with a set Q
. Ancillas added in step (i) of the merging protocol are depicted as red dots and are associated with a set Q
C. Merging operations , which are defined in Eq. (2), are indicated (in part) by dashed green lines (with only the ith component being covered). The product of all merging operations acts as such that a collective measurement projects onto a joint eigenstate of the two logical operators. Here, the diameter of an operator can grow with the lattice sizes since r
A > r
B. b Adding redundant vertices (gray dots) to the lattices increases the interaction range of the codes such that Q
A, Q
B, and Q
C contain the same number of qubits within each horizontal strip of thickness r between adjacent blue, dashed lines (e.g., the yellow area). Then, the diameter of merging operators can be kept constant, i.e., independent of the system size
Subsystem lattice surgery between two topological codes. a Depiction of two topological codes defined on lattices ΛA and ΛB (grid not shown), respectively. Logical Pauli operators of the respective codes I = A, B are represented by solid red lines connecting qubits (blue dots) within ΛA and ΛB, respectively. These operators have support on a vertical strip (gray areas) of width r
for I = A,B. Qubits in the support of are associated with a set Q
. Ancillas added in step (i) of the merging protocol are depicted as red dots and are associated with a set Q
C. Merging operations , which are defined in Eq. (2), are indicated (in part) by dashed green lines (with only the ith component being covered). The product of all merging operations acts as such that a collective measurement projects onto a joint eigenstate of the two logical operators. Here, the diameter of an operator can grow with the lattice sizes since r
A > r
B. b Adding redundant vertices (gray dots) to the lattices increases the interaction range of the codes such that Q
A, Q
B, and Q
C contain the same number of qubits within each horizontal strip of thickness r between adjacent blue, dashed lines (e.g., the yellow area). Then, the diameter of merging operators can be kept constant, i.e., independent of the system size(ii) Preparing lattices. Redundant vertices are added to the lattices ΛA and ΛB without adding corresponding new qubits. This corresponds to a relabeling that increases the interaction range on both lattices and the distance between ancillas by at most a constant r
2, where r = max{r
A, r
B}. This is done in such a way that horizontal strips of width (height) r contain the same number of qubits in Q
A, Q
B, and Q
C (Fig. 1b). Beyond the strip containing the last element of Q
B we only require the same number of qubits in Q
A and Q
C, except for the last strip, where Q
C contains one qubit less than Q
A. The lattices are then connected along their vertical boundary such that the resulting merged lattice ΛM has linear dimension L
A + L
B + 1 along the horizontal direction. This step guarantees that the merged code remains topological according to the definition above. If a different definition of locality is adopted for topological codes, step (ii) can be replaced by a stretching of the lattices to ensure that the merged code is topological in the same sense as well.(iii) Merging codes. After combining the underlying lattices, the codes are merged. To this end, one measures N merging operators, which are defined on the new lattice ΛM aswhere acts on ancilla i with Z
0 ≡ and Z
≡ . Since N
A ≥ N
B, we identify for i > N
B.(iv) Correcting errors. In order to retain full fault tolerance, d
min = min{d
A, d
B} rounds of error correction are required on the merged code. For this purpose, the structure of the merged code can be deduced from the SLSformalism that is introduced and analyzed in Methods section.We now formulate the following theorem.Theorem 1. For any two TSCs (or TSSCs) defined on regular 2D lattices with open boundaries, the procedure described in steps (i)–(iv) fault-tolerantly projects onto an eigenstate of . Moreover, all operations in steps (iii) and (iv) correspond to generators of a TSSC defined on the merged lattice with potentially increased interaction range and distance no less than the minimum distance of the merged codes.For the proof of Theorem 1, we refer to Methods section, where the required SLSformalism is described in full detail. In this approach, the merged code is effectively treated as a subsystem code and the original codes and are recovered by gauge fixing. Note that in the merged code, some stabilizers at the boundary are merged while others can generate new gauge qubits. More details on the merged code structure in the most general case and in the case of a specific TSSC can be found in the Methods section. After the merging procedure described in steps (i)–(iv), the two individual codes can be recovered by measuring all ancillas in the X-basis. In this case the merged code is split and the two logical subspaces are left in a joint eigenstate of their respective Pauli operators. Here it is important to note that error correction has to be performed on the separate codes in order to retain full fault tolerance[13]. Quantum information can then be teleported from one logical subspace to the other by measurement. This fault-tolerant way of transferring quantum states from one arbitrary TSC (or TSSC) to another provides a simple method that allows exploiting the advantages of different error correction codes. In particular, it can be used to realize an interface between a quantum memory (e.g., based on a surface code) and a quantum processor (using, for example, a color code). We will therefore now demonstrate our protocol for this crucial example of two TSCs.
Color-to-surface code switching
The archetypical examples for TSCs are surface codes (SC) and color codes (CC). Surface codes[6] are defined on 2-face-colorable regular lattices with qubits located on vertices. The two colors are identified with X- or Z-type generators , respectively, acting as , where 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 with the same color. The number of logical qubits can be obtained by a simple counting argument. It is given by the difference between the number of physical qubits and the number of independent stabilizers. For the SC, the former is equal to the number of vertices v, while the latter equals the number of faces f. Since v − f = 1, we find that the SC encodes a single logical qubit. Logical operators for SCs are strings connecting boundaries of the same color that are separated by a boundary of a different color. Note that, for any choice of SC, one such logical operator is guaranteed to be aligned with the chosen (e.g., the vertical) boundary[5], but one may not be able to freely choose whether this logical operator is of Z- or X-type. 2D color codes[8] are defined on 3-face-colorable regular lattices with qubits located on vertices. The generators of the corresponding stabilizer group are pairs of operators and , i.e., two independent stabilizers per plaquette. The lattice is constructed such that we can use three colors to distinguish three types of boundaries and plaquettes. That is, any two adjacent plaquettes have different colors from each other and from their adjacent boundary (Fig. 2). In the CC, the number of physical qubits is equal to the number of vertices, but there are two independent stabilizers for each face. A quick count then reveals that the CC encodes one (v − 2f = 1) logical qubit. Logical operators for CCs are string operators along the lattice connecting three boundaries of different colors. This implies that there exists a string along the boundary of one type that effectively connects all three boundaries.
Fig. 2
Lattice surgery between a surface and a color code. a Examples of a surface code (SC) and a color code (CC) with distance 3 defined on lattices with open boundaries. Different types of boundaries are color coded. Qubits are located on vertices depicted in blue. While plaquettes in the surface code correspond to X-type (yellow) and Z-type (orange) stabilizers, respectively, each plaquette in the color code corresponds to both X- and Z-type stabilizers. Representative logical Pauli operators X
L and Z
L are depicted by dashed lines and are tensor products of single-qubit X and Z operators, respectively. b Merging stabilizers are (orange) plaquette operators acting as Z on qubits along the boundary and ancillas (all shown in fuchsia). Measuring all merging stabilizers projects onto a joint eigenstate of the two logical operators and . While Z-type stabilizers remain unaffected, the procedure merges X-type stabilizers and logical X operators, respectively, as displayed. In particular, the resulting merged code, labeled by M, encodes only one remaining logical qubit defined by and . Note that the geometry of the underlying codes can be chosen to fit the geometry of a specific computational architecture. Note further that there are many different layouts realizing the same error correction code and this figure merely shows a common variant
Lattice surgery between a surface and a color code. a Examples of a surface code (SC) and a color code (CC) with distance 3 defined on lattices with open boundaries. Different types of boundaries are color coded. Qubits are located on vertices depicted in blue. While plaquettes in the surface code correspond to X-type (yellow) and Z-type (orange) stabilizers, respectively, each plaquette in the color code corresponds to both X- and Z-type stabilizers. Representative logical Pauli operators X
L and Z
L are depicted by dashed lines and are tensor products of single-qubit X and Z operators, respectively. b Merging stabilizers are (orange) plaquette operators acting as Z on qubits along the boundary and ancillas (all shown in fuchsia). Measuring all merging stabilizers projects onto a joint eigenstate of the two logical operators and . While Z-type stabilizers remain unaffected, the procedure merges X-type stabilizers and logical X operators, respectively, as displayed. In particular, the resulting merged code, labeled by M, encodes only one remaining logical qubit defined by and . Note that the geometry of the underlying codes can be chosen to fit the geometry of a specific computational architecture. Note further that there are many different layouts realizing the same error correction code and this figure merely shows a common variantAs an example for the application of our protocol let us consider the situation shown in Fig. 2a, where the outcome of a quantum computation, encoded in an arbitrary logical state of a color code, is transferred to a quantum memory based on a surface code initialized in the state . A circuit representation of this task is shown in Fig. 3. Since both initial codes in Fig. 2a have distance 3, we include two ancillas in the state , as instructed in step (i). Step (ii) of the protocol can be omitted since the lattices in this example already have the desired structure. As laid out in step (iii) and illustrated in Fig. 2b, one then measures joint Z stabilizers across the boundary, projecting the two surfaces onto a single, merged surface (M) corresponding to an eigenstate of . That is, the merging procedure projects onto a merged code that contains as a stabilizer. The reduced 2D logical subspace can be represented by and a merged X
L operator along both surfaces, e.g., . Since both color and surface codes are TSCs, the merged code can be understood as a TSC (as opposed to a TSSC) and merging operators coincide with merging stabilizers. Then, as instructed in Fig. 2b, X-type stabilizers have to be extended onto ancillas while Z stabilizers remain unaffected. For details on the distinction between TSSCs and TSCs, we refer to the SLSformalism introduced in the Methods. Having obtained this merged code of distance 3, three consecutive rounds of error correction ensure fault tolerance as suggested in step (iv). Note that the merging procedure increases the bias toward X-type errors since the minimum weight of logical X operators is increased. However, note that increasing the weight (and interaction range) of X stabilizers on the boundary can cause a temporarily worse error correction performance w.r.t. Z errors for the merged code than for the individual codes.
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. M
and M
are projective measurements that project onto an eigenstate of Z
L ⊗ Z
L and X
L ⊗
L respectively. M
is implemented through the merging protocol and code splitting described in the main text. The double lines labeled m
1 and m
2 represent classical conditioning of the X
L and Z
L gates on the measurement outcomes m
1 and m
2, respectively
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. M
and M
are projective measurements that project onto an eigenstate of Z
L ⊗ Z
L and X
L ⊗
L respectively. M
is implemented through the merging protocol and code splitting described in the main text. The double lines labeled m
1 and m
2 represent classical conditioning of the X
L and Z
L gates on the measurement outcomes m
1 and m
2, respectivelyIrrespective of this we can then proceed by splitting the codes. To this end, we simply measure ancillas in the X-basis, while refraining from further measurement of the merging stabilizers. This procedure projects onto the separate surfaces while entangling the logical subspaces. After another three rounds of error correction to preserve fault tolerance, measuring teleports the information according to the circuit displayed in Fig. 3.
Discussion
We have introduced the method of subsystem lattice surgery (SLS) as a generalization of lattice surgery[13,14] to any pair of 2D topological codes, exploiting their similarities[20]. The applicability of our algorithm to all topological codes such that all topological features are preserved arises from their property to support logical string operators on the boundary[5]. Therefore, the relevance of our algorithm remains unchanged even if other topological codes, such as the subsystem surface code[21] (see also the Methods section) or Bacon-Shor code[22-24], are used as quantum memories or processors. Indeed, our method can even be generalized beyond 2D topological codes at the expense of the 2D layout or topological features (see Methods section for details).In contrast to the method of code deformation[18,25,26], where a single underlying lattice is smoothly deformed everywhere through multiple rounds of local Clifford transformations, we combine two initially separate lattices through operations within constant distance of their boundaries. To the best of our knowledge, other established methods for code conversion[27-29] have either been applied solely to specific codes, or have not been generalized to subsystem codes.To highlight the usefulness of incorporating SLS into future quantum computers, let us briefly assess the current contenders for fault-tolerant quantum computation. At present, one of the most promising techniques is SC quantum computation supplemented by magic state injection[30] in order to promote it to a universal quantum computer. However, the overhead on magic state distillation is large[6,7] and it is expected that more effort will be directed towards identifying more resource-efficient techniques. At the same time, other approaches to universal fault-tolerant quantum computation are significantly constrained by no-go theorems that prohibit a universal set of transversal gates in a single stabilizer code[31] and transversal non-Clifford gates in 2D topological codes[32,33]. The former no-go theorem can be circumvented by gauge fixing[11,34] or (subsystem) lattice surgery, and is hence no issue for our approach. The latter no-go theorem can be avoided in a 3D architecture or non-topological codes[35-37]. One potential replacement for magic state distillation is hence the 3D gauge color code[11,38] which successfully sidesteps both no-go theorems. Even though the resource requirement is similar to that of quantum computation with the surface code[38], 3D topological codes support other useful features such as single-shot error correction[39]. As we show in the Methods section, SLS can also be employed to switch between codes of different dimensions, as well as between topological and non-topological codes. This facilitates the circumvention of both no-go theorems in an elegant fashion. At this point it should also be pointed out that many non-topological codes supporting transversal non-Clifford gates[35-37] have lower resource requirements than comparable 3D topological codes or magic state distillation. However, while all 2D (and some 3D) TSSCs (including the merged code that appears during SLS) with local stabilizers feature error thresholds[19,38], the existence of error thresholds has not been proven for any of the mentioned non-topological codes. That is, in the case of non-topological codes it is not guaranteed that the storage time can be made arbitrarily large by enlarging the code distance. Codes have to be concatenated instead[4].In any of these cases, quantum computers can only be expected to operate as well as their weakest link. Here, this applies to the error correction code used. The clear advantage of SLS in this context is that the weakest link (i.e., code) may be employed on-demand only and can otherwise be avoided. For instance, in a distributed architecture a code for the implementation of, e.g., a non-Clifford operation can be called only when required. In this scenario, SLS is particularly beneficial since non-Clifford operations could also unfavorably transform errors present in the system[36], while SLS does not carry such errors to other codes. SLS should thus not be seen as a stand-alone contender with other methods of realizing universal fault-tolerant quantum computation, but rather as a facilitator thereof, allowing to selectively combine and exploit the advantages of other methods. We hence expect lattice surgery to play a crucial role in future quantum computers, be it as an element of a quantum bus or for distributed quantum computing[29].Our findings further motivate experimental efforts to develop architectures that are flexible enough to implement and connect surface and color codes and/or other codes. For instance, ion trap quantum computers[40] may provide a platform soon capable of performing lattice surgery between two distinct codes. In this endeavor, the inherent flexibility attributed to multizone trap arrays[41] may be beneficial. Moreover, topological codes and our approach to code switching are obvious choices for fault-tolerant quantum computation with architectures requiring nearest-neighbor interactions in fixed setups, such as superconducting qubits[42] or nitrogen-vacancy diamond arrays[43]. However, given the local structure of topological codes and the simplicity of our algorithm, the requirements for any architecture are comparatively low.Despite the inherent fault tolerance of SLS, the codes on which it is performed are nonetheless subject to errors. Further investigations of error thresholds[2,19] for (non-)topological codes and bench-marking[44] are therefore required, in particular with regard to (subsystem) lattice surgery. Finally, our code switching method may find application in the design of adaptive error correction schemes[45].
Methods
Subsystem lattice surgery
In the main text, we have introduced a subsystem lattice surgery (SLS) protocol that is applicable to arbitrary 2D TSSCs, and we have shown how it can be used to teleport quantum information between surface and color codes. In this Methods section, we explain how lattice surgery can be understood entirely within the subsystem stabilizer formalism. To this end, we define SLS by the fault-tolerant mapping , where the merging procedure as described in steps (i)–(iv) and formalized in Theorem 1 is an initialization of an intermediate, merged code and the splitting fixes gauge degrees-of-freedom to obtain from .To see this, we again consider two “standard” TSSCs, and . Note that we thereby exclude certain pathological “exotic” codes as will be explained in the proof of Lemma 1. Adopting the previous notation, we assume that the lattices have been chosen such that the logical operators (I = A, B) along their boundaries have support on N
A and N
B qubits, respectively. For ease of presentation we further choose N
A = N
B = N. Now, let with I = A, B be codes characterized by the tuples [[n
, k
, g
, d
]], where n
are the numbers of physical qubits, k
the numbers of logical qubits, g
the numbers of gauge qubits, and d
are the distances, respectively. We choose the generating set for code , where s
= n
− k
− g
is the number of independent stabilizer generators (or the number of stabilizer qubits in accordance with our previous terminology). The lattices are then aligned and prepared as in step (ii) of the algorithm described in the main text, but we omit including ancillas for now. We proceed by defining the merging operatorson the merged lattice ΛM. From these merging operators, we then collect Δg ≤ N − 1 (where the meaning of this notation becomes apparent in the following section) inequivalent ones (w.r.t. ) in the set , and call the group generated by these operators . We refer to elements of as merging generators. This allows us to define the subsystem codeNote that, technically, Eq. (4) specifies a subsystem stabilizer code only if the center of is non-empty, such that a stabilizer subgroup can be defined. That this is indeed the case follows from Lemma 2. As we will show next, the code has the structure of the merged code discussed in Theorem 1. The essential features of this structure can be captured in the following Lemma.Lemma 1. The code defined in Eq. (4) is a TSSC on the merged lattice ΛM with distance no less than d
min = min({d
A, d
B}). In addition, can be gauge fixed to , effectively splitting the code into and .Proof. First, let us show that obeys the locality condition for TSSCs. By definition, generators of the separated codes are also generators of the merged code. Their interaction range is increased by at most a constant along the vertical direction due to the relabeling in step (ii). Thereby, the interaction range of merging generators is also kept constant. The generators of the code are hence all local.Second, we verify that the distance of the merged code is at least d
min. Since is a subgroup of , the normalizer is a subgroup of . Then, note that there exist stabilizers that anticommute with some . If that was not the case, all would either be elements of the code or undetectable errors. The latter option can be ruled out in accordance with the argument in the proof of Lemma 2. The former option,
, would imply that is not a logical operator. In a quantum error correction code, such mutually anticommuting operators act either on the logical subspace or on gauge qubits. However, any stabilizer of the separate codes is also contained in according to the definition of the merged code in Eq. (4). Now recall that if is a subsystem stabilizer code, it can be decomposed as , as explained in the main text. Therefore, the aforementioned anticommuting stabilizers S must act on gauge qubits and we can hence identify S as belonging to . Later, we will further elaborate on the structure of . Since contains elements that are not in the stabilizer of but not vice versa, must be a subgroup of . Consequently, any equivalence class of is contained in an equivalence class of .The quotient group defines so-called bare logical operators that do not act on gauge qubits. Generally, contains all information about the logical operators but not about all undetectable errors. At the same time, undetectable errors are related to bare logical operators, since for any subsystem stabilizer code
[19]. To conclude then that the distance of is d
min, we have to verify that deformations (i.e., multiplications) of any non-trivial, logical operators by operators in yield operators of weight at least d
min. Since any such P is also contained in this is true for deformations by operators in . But we still need to confirm this for operators in . Specifically, we have to consider deformations under . In principle, these merging operators can reduce the weight of operators P below d
min. However, this can only happen under rather exotic circumstances. That is, only for logical operators of the form P = P
A ⊗ P
B, where (I = A, B) and acts as on a region K
⊂ Q
such that for the complementary regions (with being the set of all qubits on lattice Λ and ) the weights of these operators satisfy independently of the system size. Here we make use of the fact that Q
A and Q
B have been labeled equally (cf. main text) and write with a slight abuse of notation (where if I = A and vice versa). In the scenario described above, one could define the logical operator with weight . At the same time, this also constricts since P
must be such that . Since this describes extremely restricted cases that (to the best of our knowledge) do not feature in any practical scenario, we will exclude codes with such properties from our construction.Note that we can also exclude cases where . In such cases at least two logical operators with (I = A, B) exist. However, we are only interested in projecting onto the joint eigenstate of any two logical operators and along the boundary. Therefore, we can always exclude the aforementioned case by choosing and such that there does not exist a logical operator that has support on a subset of Q
. In the case of TSSC with non-local stabilizers, such logical operators may have support on disconnected regions of a lattice[19]. Then, these regions have to be connected using local generators to obtain proper string operators. Then, any non-trivial logical operator of the merged code has support on at least d
min qubits. The distance of the merged code is hence at least d
min.Third, the merged code is scalable since the separate codes are scalable. Thus, we can conclude that is indeed a TSSC. At last, note that fixing to through a measurement of stabilizers anticommuting with at least one merging generator, the separate codes can be recovered while retaining the eigenstate of . This gauge fixing has to be accompanied by error correction to ensure full fault tolerance. Q.E.D.To finally prove Theorem 1, we will now explain the connection between the merged code 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 initialization of the merged code. Specifically, measuring merging generators as in Eq. (3) (or similarly, Eq. (2)) initializes from the prepared codes . The parity of all random measurement outcomes yields the parity of and error correction has to be performed thereafter in order to ensure correctness (see step (iv)). Fault tolerance is guaranteed since merging generators are constant-weight and errors can only propagate to a constant number of physical qubits. Since we have established in Lemma 1 that is indeed a TSSC with distance at least d
min, this concludes the proof of Theorem 1.Altogether, by proving Theorem 1 and Lemma 1, we showed that SLS is fault-tolerant and well-defined through a merging, i.e., a mapping , followed by a splitting, i.e., a mapping .Concluding this Methods section, we return to the discussion of the ancillas added during step (i) of the preparation. As already discussed in the main text, ancillas can be understood as additional stabilizer qubits included into the initial 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 Results section. In that case the merged code can be understood as a TSC with stabilizers merged across the boundary. Here, introducing ancillas means that stabilizers of one surface are instead merged with stabilizers of ancillas, allowing for the possibility of reducing the interaction range of the merged code.
Merged code structure
In this section, we provide a careful analysis of the merged code. In particular, we will discuss the structure of the subgroups and . Here we claim that is a [[n
A + n
B, k
A + k
B − 1, g
A + g
B + Δg, d
M]] code with distance d
M ≥ d
min. That is, the distance d
M merged code has n
A + n
B physical qubits, k
A + k
B − 1 logical qubits, and g
A + g
B + Δg gauge qubits, where Δg is the number of merging generators (see Eq. (3)). To see this, we have to understand the structure of and in comparison with the separate codes .First, note that we can define Δg new gauge qubits via their respective Pauli operators where S
∈ S
A × S
B ∀i such that for i ≠ j. That is, there exist Δg independent stabilizers which are now included as gauge operators together with the same number of merging generators. As we will see, the existence of such stabilizers is guaranteed by the choice of logical operators and as explained in the proof of Lemma 1.Lemma 2. For the operators and chosen above there exists a stabilizer for any merging generator such that and
.Proof. Suppose such a stabilizer does not exist. Then, there exists a that yields the same error syndrome as , i.e., for any codeword . Since , it is a non-trivial logical operator in . Combining this with the fact that , the existence of the logical operator is not compatible with our construction of as discussed in the proof of Lemma 1. That is, there exist no logical operators with (I = A, B) for our choice of . Q.E.D.We have hence defined Δg new gauge qubits by and the same number of independent stabilizers. As another consequence of Lemma 2, we can also define an additional stabilizer equivalent to . That is, the merged code has s
A + s
B − Δg + 1 independent stabilizers and thus, a necessarily non-empty center (but reduced logical subspace).To complete our analysis of the merged code, we have to verify that still contains g
A + g
B gauge qubits besides new ones. Therefore, note that there might exist pairs of gauge operators generating a gauge qubit, for which with ∀j ∈ J where J ⊆ {1, ..., Δg}. While the associated gauge qubit in was defined by , in the merged code it is redefined to be generated by . Here, is associated with one of the Δg new gauge qubits introduced above. W.l.o.g. we have assumed that ∀j = 1, ..., Δg. Otherwise, we would simply have to apply the same argument to with 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 which can be reversed by gauge fixing. Interestingly, applying this formalism to two Bacon-Shor codes[22] on regular square lattices [1, L]2, yields a merged, asymmetric Bacon-Shor code[23] 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 and defined on regular square lattices [1, L]2 with qubits located on vertices. In Fig. 4a, we chose the smallest SSC with distance d = L = 3 defining a unit cell where the central vertex is unoccupied. The codes are generated by triangle and boundary operators, labeled and , respectively, with i = 1, ..., 4 and I = A, B (Fig. 4a). Triangle operators act on qubits adjacent to a triangular plaquette p as for i = 2, 3 and for i = 1, 4. Boundary operators are weight-two Pauli operators acting on every other pair of boundary qubits as either X-type or Z-type operators for i = 1, 4 and i = 2, 3, respectively. The stabilizer group is defined asHenceforth, we write A ∝ B whenever we identify a group A with a generating set B up to phases. A single gauge qubit is defined up to irrelevant phases byLogical operators and are tensor products of single-qubit Pauli X- and Z operators, respectively, connecting two opposite boundaries as shown in Fig. 4a.
Fig. 4
Subsystem lattice surgery between two subsystem surface codes. a Example of two subsystem surface codes with distance 3 labeled by A, B, respectively. Qubits are located on vertices depicted in blue, while the central gray vertices are unoccupied. Plaquette generators and (I = A, B) are color coded with X-type and Z-type operators drawn in yellow and orange, respectively. Representative logical Pauli operators and are depicted by dashed lines and are tensor products of single-qubit X and Z operators, respectively. b The merged code, labeled by M, with additional merging generators colored in fuchsia. Some X-type operators in and are merged across the boundary in accordance with Eqs. (7) and (8). Including merging generators to the codes reduces the dimension of the logical subspace by one
Subsystem lattice surgery between two subsystem surface codes. a Example of two subsystem surface codes with distance 3 labeled by A, B, respectively. Qubits are located on vertices depicted in blue, while the central gray vertices are unoccupied. Plaquette generators and (I = A, B) are color coded with X-type and Z-type operators drawn in yellow and orange, respectively. Representative logical Pauli operators and are depicted by dashed lines and are tensor products of single-qubit X and Z operators, respectively. b The merged code, labeled by M, with additional merging generators colored in fuchsia. Some X-type operators in and are merged across the boundary in accordance with Eqs. (7) and (8). Including merging generators to the codes reduces the dimension of the logical subspace by oneNow we initialize a merged code by measuring merging generators as depicted in Fig. 4b. The merged code is left with 5 stabilizer qubits,where we only kept stabilizers in that commute with the merging generators. Consequently, we can identify 2 additional gauge qubits, i.e., 4 in total,Here we included a semicolon between generators of independent gauge qubits and neglected additional phases. Evidently, this code has the structure predicted in the preceding Methods section and is indeed a TSSC with distance 3.
Beyond 2D topological codes
Finally, let us discuss the applicability of SLS to higher-dimensional topological codes as well as to non-topological codes. As we 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 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 membrane-like logical operators on their 2D boundary[46,47]. Similarly, it can be expected that most topological codes in D dimensions can support logical operators that are associated with (D − 1)-dimensional extended objects on the boundary[46]. With this assumption, it is straightforward to show that SLS can be applied in any dimension. This leaves us with the question of whether SLS can also be used to switch between dimensions. This is indeed the case, since, interestingly, 3D topological codes also support string-like logical operators[33] which can be used to teleport information from a 2D topological code to a higher-dimensional one via SLS. In fact, at the expense of its 2D layout, a 2D code can even be wrapped along 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 such codes there exists no notion of locality or scalability. Therefore, an underlying lattice of physical qubits cannot be defined in a meaningful way. However, when revising the arguments from Lemmas 1 and 2 in the spirit of non-topological codes, it turns out that one does not require any topological features to prove that the distance of the merged code is the minimum distance of the initial codes. Neither is it necessary to require locality or scalability to show that the merged code can be gauge-fixed to the original codes. The merged code as specified in Eq. (4) is always well-defined algebraically even without topological features. That is, at the expense 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 scalability in particular is a feature that is desirable for any code. Therefore, let us note that the merged code is scalable if the separate codes are scalable even if it is not topological otherwise. As an example of codes that are scalable but not topological consider the doubled codes[36] which are also amenable for SLS.
Data availability
Data sharing is not applicable to this article as no data sets were generated or analyzed during the current study.Peer Review File
Authors: R Bowler; J Gaebler; Y Lin; T R Tan; D Hanneke; J D Jost; J P Home; D Leibfried; D J Wineland Journal: Phys Rev Lett Date: 2012-08-20 Impact factor: 9.161
Authors: R Barends; J Kelly; A Megrant; A Veitia; D Sank; E Jeffrey; T C White; J Mutus; A G Fowler; B Campbell; Y Chen; Z Chen; B Chiaro; A Dunsworth; C Neill; P O'Malley; P Roushan; A Vainsencher; J Wenner; A N Korotkov; A N Cleland; John M Martinis Journal: Nature Date: 2014-04-24 Impact factor: 49.962