Adiabatic topological quantum computing

Topological quantum computing promises error-resistant quantum computation without active error correction. However, there is a worry that during the process of executing quantum gates by braiding anyons around each other, extra anyonic excitations will be created that will disorder the encoded quantum information. Here we explore this question in detail by studying adiabatic code deformations on Hamiltonians based on topological codes, notably Kitaev's surface codes and the more recently discovered color codes. We develop protocols that enable universal quantum computing by adiabatic evolution in a way that keeps the energy gap of the system constant with respect to the computation size and introduces only simple local Hamiltonian interactions. This allows one to perform holonomic quantum computing with these topological quantum computing systems. The tools we develop allow one to go beyond numerical simulations and understand these processes analytically.


I. INTRODUCTION
There are many approaches to constructing a quantum computer.In addition to the numerous different physical substrates available, there are a plethora of different underlying computational architectures from which to choose.Two major classes of architectures can be distinguished: those requiring a substantial external active control system to suppress errors [1][2][3], and those whose underlying physical construction eliminates much, if not all, of the need for such a control system [4,5].The first class of architectures strives to minimize the control resources needed to quantum compute fault-tolerantly.The second class of architectures strives to minimize the complexity of systems that enable fault-tolerant quantum computation intrinsically.Here we focus on the latter class of architectures and address the question: "How does one quantum compute on a system protected from decoherence by a static (i.e., time-independent) Hamiltonian?"We present a solution that adiabatically interpolates between static Hamiltonians, each of which protects the quantum information stored in its ground space.Since each of these ground spaces can be described as a quantum error-correcting codespace, we call this pro-cess adiabatic code deformation [6,7].This procedure amounts to a simulation of the measurement-based process of code deformation employed in the first class of architectures [8][9][10][11][12][13][14].We further show that this procedure preserves the energy gap of the system throughout the evolution.
While previous work has made reference to adiabatic evolutions as a method for performing topological quantum computation [15], our work can be seen as making the assumptions of adiabatic evolution explicit for certain models of topological quantum computers.In contrast, for example, to topological quantum computing in fractional quantum Hall systems where even the ground state of the system is subject to debate, our models are exactly solvable and simple.Similar work has been performed for Kitaev's honeycomb model by Lahtinen and Pachos [16], who examined the adiabatic transport of vortices in Kitaev's honeycomb lattice model numerically.Here, we are able to investigate these issues analytically.
Our results marry three different lines of research, which we now describe.The first is the idea originated by Kitaev [4] that quantum information can be protected from decoherence by encoding it into the degenerate ground space of a many-body quantum system.In particular, Kitaev suggested a family of systems such that each system has a ground space equivalent to a quantum error-correcting codespace.Moreover, each of these ground spaces is separated from its first-excited space by an energy gap-a gap that does not shrink with the system size (i.e., the gap is "constant").
In Kitaev's original construction, the quantum errorcorrecting code also possesses a topological property that makes the distance of the code grow with the number of arXiv:1406.2690v1[quant-ph] 10 Jun 2014 qubits in the system.This implies that any local perturbing interaction will only split the energy of a degenerate ground state by an exponentially small amount in the size of the system [17].Information encoded into the ground space should therefore remain well-protected from the detrimental effects of decoherence.Further, if one immerses the system in a bath with a temperature lower than that of the energy gap in the system, then one should expect a suppression of thermal excitations out of the ground space.The decay rate of the quantum information encoded into the ground space is not set by a length scale in the system, but instead the lifetime scales as exp(cβ∆) where β is the inverse temperature, ∆ is the energy gap of the Hamiltonian, and c is a constant [18].Crucially, this implies that the lifetime of the information is exponentially lengthened as a function of the inverse temperature.While one does not obtain, using Kitaev's original idea, a method for protecting quantum information with a lifetime that grows with the size of the system-a hallmark of "self-correcting" quantum memories [8,19]-for a suitably low temperature, the information lifetime will be long enough for all practical purposes.Thus, via the use of a static many-body Hamiltonian, Kitaev proposed that quantum information could be protected without resorting to active quantum error-correcting algorithms.Following Kitaev's introduction of this idea, numerous authors put forward similar approaches.Many of these ideas stayed within the realm of topological protection [15,[20][21][22][23][24], but others explored energetic protection without reference to topological ideas [25][26][27][28].Here we will focus on the topological models, but many of our results apply in the more general setting.
Kitaev noted in his original proposal that the excited states of his Hamiltonian act as particles with exotic statistics.In particular, he showed that the excitations were quasiparticles called anyons [29]-particles that exist in two spatial dimensions that exhibit statistics different from fermions and bosons and which interact by braiding around one another in spacetime-an interaction that only depends on the topology of the anyon worldlines.These excitations not only describe errors in the codespace but can also be thought of as quantum information carriers in their own right.Indeed for some many-body Hamiltonians, it is possible to have nonabelian anyons (anyons whose braidings do not commute) that perform universal quantum computation in the label space of the anyons.This is known as topological quantum computing [4,[30][31][32], the principal model of quantum computing we will consider here.
In a topological quantum computation, one creates anyons from the vacuum, braids them around one another in spacetime, fuses them together, then records their label types.Although the topological nature of the anyonic interaction provides a degree of control robustness, it is not immediately clear why the processes of anyon creation and fusion could not create new unwanted anyons.Such anyons could in turn wander and disrupt the desired braid.The initialization process in particular is quite subtle [33].Moreover, there will likely be a background of thermal anyons and anyons arising from material defects which could also disorder the quantum computation.On top of all of this, even if a spacetime braid is topologically correct, the mere act of moving anyons around at any nonzero speed has the potential to generate new excitations because the adiabatic approximation is not exact.Measurement-based topological quantum computation [34,35] has the potential to overcome this last problem, but the other problems remain.In summary, the great merit of topological quantum computation is that the "only" thing that can corrupt it is uncontrolled anyons-the problem is that there are many ways that uncontrolled anyons can arise.Even something as seemingly innocuous as a lack of complete knowledge of the system's Hamiltonian could do this because it could lead to anyons being trapped or leaking out of the system unbeknownst to the computer operator [15].We do not claim to address every possible adversarial scenario for topological quantum computation here; our focus is on constructing an architecture that limits the chances for uncontrolled anyons to appear.
The second line of research relevant to our proposal is the recent use of code deformations to perform quantum computation on topological quantum error-correcting codes [8-10, 12, 32].In this approach, one works directly with the quantum-error correcting code used in topological quantum computing without introducing a Hamiltonian to provide energetic protection of the quantum information.Instead, one focuses on active error correction, but performed with the topological quantum codes.Consideration of such codes for quantum error correction was first examined in detail by Dennis et al. [8].In this approach, qubits are arranged on a two-dimensional surface with a boundary, resulting in a single encoded qubit for each such surface.In order to build a quantum computer with more than one qubit, such surfaces are stacked on top of each other so that transversal gates can be achieved between the neighboring surfaces.Since the original analysis, modifications [10,36] of this architecture have been introduced that have considerable advantages over the three-dimensional stacking of Dennis et al.In these models, one takes a surface code and "punctures" it by removing the quantum check operators (stabilizer generators) from a region, creating a defect [37].For each defect, one obtains an encoded qubit with a code distance that is the minimum of the perimeter of the defect and the distance from the defect to the nearest appropriate boundary (which may lie on another defect).One can show that, via a sequence of adaptive measurements, one can deform the boundary of the defect, and, by using suitable deformations, braid defects in such a way that logical operations are performed between the logical qubits associated with the defects.
The third line of research relevant to our proposal is the recent discovery of methods to perform holonomic [38] and open-loop holonomic [39] universal quantum compu-tation in a stabilizer code setting [6,7,40].In holonomic quantum computing, adiabatic changes of a Hamiltonian with degenerate energy levels around a loop in parameter space induce unitary gates on each energy eigenspace.The enacted gate depends on geometric properties of the Hamiltonian path and not on the exact timing used to traverse it (to within the limits of the adiabatic approximation), thus offering a method to avoid some timing errors.Universal quantum computation using holonomic methods was originally studied in Ref. [38].Recently, Oreshkov et al. demonstrated a novel manner for achieving universality within the context of fault-tolerant quantum computing [6].In particular, this result showed how to perform gates on information encoded into a quantum stabilizer code.Building along these lines, two of the present authors (DB and STF) have shown how to achieve similar constructions within the context of open-loop holonomic quantum computation [7,41].In this setting, instead of using cyclic evolutions, one can quantum compute using non-cyclic evolutions.A consequence of this is a scheme known as adiabatic gate teleportation where one mimics gate teleportation via a very simple interpolation between two-qubit interactions [7].Another consequence is that it is possible to perform measurement-based quantum computing [42] using only adiabatic deformations of a Hamiltonian [41].Further, and more suggestive for this work, it is possible to perform holonomic quantum computation on symmetry protected spin chains [43].Holonomic quantum computation, whether performed cyclically or non-cyclically, should be distinguished from (universal) adiabatic quantum computation, in which the ground state is always nondegenerate throughout the non-cyclic adiabatic evolution [44][45][46][47][48].
In this work, we combine many of the above insights into a new method for computing on information encoded into the energy levels of a Hamiltonian.We consider a situation where, as in the first line of research, quantum information is encoded into the ground state of a topologically ordered many-body system.Rather than storing information in the label space of anyons themselves, we consider information stored in defects, which act somewhat like anyons, as in the second line of research.We then examine explicit adiabatic interpolations between Hamiltonians that simulate code deformation, as in the third line of research.This is all done while keeping the energy gap in the system constant, a necessary requirement to use these techniques to maintain the topological protection offered by these systems.Further, we demonstrate how to prepare quantum information into fiducial states using adiabatic evolutions.Some of these state-preparation procedures are robust to error, but some (e.g., the preparation of certain "magic states" [49]) are not robust and thus require distillation protocols.Finally, we discuss how one can use code deformations to facilitate measurements of certain logical operators.We discuss all of these procedures first within the context of Kitaev's surface codes with defects, and then we discuss how these results can be extended to the topological color codes [50].
The systems and protocols we use are not strictly faulttolerant.Without active error correction, the lifetime of the codes studied are a constant independent of the system size [18].As mentioned above, here we rely on a coupling to a cold (with respect to the gap) thermal bath, which suppresses the creation of errors exponentially in the size of the gap.We retain robustness to things like control errors by virtue of the holonomic nature of the logical operations we implement, and robustness to correlated fluctuations induced by the environment by keeping defects well-separated during braiding.Once the environment creates an excitation, it is free to wander and corrupt the computation.We prevent the environment from doing this by ensuring that it is cold, and we prevent ourselves from introducing excitations accidentally by carefully designing our procedures.

II. SURFACE CODES WITH DEFECTS
We begin by working with a simple class of surface codes with defects to establish the main ideas behind our procedures.In Section VII we extend these ideas to the topological color codes.We assume that the reader is familiar with the theory of stabilizer codes [51], toric codes [4], and surface codes [37], which are specializations of toric codes to bounded planar surfaces.However, we review these subjects to set our notation.Let L be a two-dimensional square lattice that is l edges (or links) wide and l edges tall, with the leftmost l vertical edges and bottommost l horizontal edges removed.(Other lattices are possible; we make this restriction only to be concrete.)We call the sides of the lattice with the edges removed the rough or X-type boundaries and the other sides the smooth or Z-type boundaries; see Fig. 2. A qubit is associated with each edge of the lattice so that there are 2l 2 qubits in total.For each plaquette (or face), p, of the lattice, define the plaquette operator S p = e∈∂p Z e where ∂p denotes the edges bounding the plaquette and Z e is the Pauli Z operator acting on the qubit at edge e.In other words S p acts as the tensor product of Z operators on the qubits touching the plaquette p and acts trivially everywhere else in the lattice (see Fig. 1).Similarly, for each vertex (or site) in the lattice, define a vertex operator S v = e∈δv X e , where δv denotes the edges incident at vertex v and X e is the Pauli X operator acting on the qubit at edge e.In other words, S v acts as a tensor product of Pauli X operators on all the edges surrounding a vertex and acts trivially on all the other qubits in the lattice, as shown in Fig. 1.
It is important to note that the rough and smooth boundaries still have plaquette and vertex operators defined on them; these operators simply act nontrivially on fewer qubits than the operators in the bulk of the lattice.Since the lattice L has l 2 plaquettes and l 2 vertices, there are also l 2 plaquette operators and l 2 vertex operators.These operators are all independent in the sense that no strict subset can generate the rest, and, moreover, they all commute since they are incident on each other an even number of times.
The collection of all the S p and S v operators comprises the set of stabilizer generators for a quantum surface code, the codespace being defined by the simultaneous +1 eigenspace of all the stabilizer generators.This set generates the stabilizer group for the code, which is simply the set of all the products of generators.The above description actually specifies a single state rather than a codespace since it has 2l 2 checks on 2l 2 qubits.This is a consequence of the particular way in which we chose the boundary of the lattice, which disallows the existence of any additional operators that commute with all of the generators but which are not elements of the stabilizer group.Encoding quantum information in the lattice requires the constructions described next.
Consider a closed simple curve c on L that does not cross itself and that does not touch the boundary of L. Call the interior of this loop, excluding c itself, I c .Consider "removing" all of the qubits in I c .Here by "removing" we do not mean physically removing the qubits, but rather that we consider a new code in which the stabilizer generators exterior to the region I c are consistent with the description above, while the region I c has a different set of stabilizer generators (not necessarily of the plaquette and vertex type).We call this process puncturing (not to be confused with the notion of puncturing associated with classical coding theory [52]), and the resulting region of removed qubits is called a defect.Given X Z FIG.2: A smooth (Z-type) defect.A logical Z operator is defined by a closed loop of Zs on the lattice that surrounds the defect and a logical X operator is defined by a connected path of Xs on the dual lattice from the defect to a smooth (Z-type) boundary.Here we depict the removed region by removing that part of the lattice; this simply indicates that the code of the system factors into a code in the drawn region and a code inside of the defect.
such a defect, we can study the properties of the new code induced on the exterior of I c .Careful counting of the stabilizer generators and qubits in this new code reveals that the puncturing procedure has created a logical qubit [37].The logical operators for the new logical qubit can be chosen as follows: an encoded Z is a closed loop of Z operators on the lattice L that encircles the defect and an encoded X is a connected path of X operators on the dual lattice L * that starts on the smooth (Z-type) boundary of the defect and ends on a smooth (Z-type) boundary of the lattice L other than the loop c (see Fig. 2).The distance of this code is the minimum of the length of curves on L bounding the defect and the length of paths connecting the defect to a smooth (Z-type) boundary of L. We note that the curve c itself is the minimum-weight choice for the encircling logical Z operator.Similarly, instead of starting with a simple closed curve on the lattice, we can consider a simple closed curve on the dual lattice and remove the interior of this curve.To be consistent with the definition given for the former kind of defect, we must define the encoded X to be a closed loop c * of X operators on the dual lattice L * that encircles the defect and the encoded Z to be a connected path of Z operators on the lattice L that starts on the rough (X-type) boundary of the defect and ends on a rough (X-type) boundary of the lattice L other than the loop c * (see Fig. 3).
Puncturing the surface code creates a single encoded X Z FIG.3: A rough (X-type) defect.A logical X operator is defined by a closed loop of Xs on the dual lattice that surrounds the defect and a logical Z operator is defined by a connected path of Zs on the lattice from the defect to a rough (X-type) boundary.
qubit.By puncturing multiple times we can create a code with more than one encoded qubit, one for each additional puncture.The boundary curves of these defects can be on the lattice, in which case we call the defect smooth (Z-type), or on the dual lattice, in which case we call the defect rough (X-type).The distance of such a code is the minimum of the distance between defects, the distance between a defect and the boundary of the lattice, and the circumference of a defect.Surface codes with defects were first explored within the framework of active quantum error correction.Here we consider an alternative situation in which we construct a Hamiltonian with a ground space that is degenerate and identical to the codespace of a quantum error correcting code.The construction of such a Hamiltonian is easy from a theoretical point of view; it is simply the negative sum of the stabilizer generators, G, The constant in front is chosen so that all errors will have an energy penalty of a least ∆ (errors adjacent to a boundary will have this penalty, while errors away from boundaries will have a penalty of 2∆).Since the set of generators is commutative, the eigenspaces of H can be labeled by their eigenvalues with respect to the operators S. Because the eigenvalues of all the S are ±1, the ground state of this Hamiltonian is equivalent to the codespace of the quantum code generated by G: S|ψ = |ψ for all S ∈ G.
Hamiltonians like that in Eq. ( 1), which we call stabilizer Hamiltonians, have interesting properties for protecting quantum information.The first property is that operators that act nontrivially on the codespace (the degenerate ground space) must be nonlocal, having a Pauliweight at least as large as the code's distance.This allows the system to retain its information even when perturbed by a local Hamiltonian [17,53].For toric codes, surface codes, color codes, and, more generally, codes formed from quantum double models [54], this is a partial indication of a topological order in the system.(A more robust indicator would be a nontrivial topological entanglement entropy [55][56][57][58].)While a stabilizer Hamiltonian is robust to local perturbations, if the system is immersed in a thermal bath, the lifetime of information encoded into the ground state does not necessarily scale with the size of the system (or the size of the defect for a surface code with defects).For example, for the toric code, the lifetime of this information is proportional to exp(2β∆) [18], where β = (k B T ) −1 is the inverse temperature of the bath.It is widely believed that all stabilizer Hamiltonians with local terms embedded in two spatial dimensions have a similar lifetime [59].The more challenging issue is how to compute with them without increasing the rate at which information is destroyed.As mentioned in Sec.I, if a stabilizer Hamiltonian describes a topologically ordered system possessing anyons with a sufficiently rich nonabelian structure, then quantum computation can be carried out by creating, braiding, and fusing the anyons.However, it is not entirely clear that one can controllably create single excitations without also creating other uncontrolled excitations that could then disorder the system, nor how one can move the anyons without causing other anyons to be produced.This has led to the search for self-correcting quantum systems where the excitations are not point-like particles like anyons but structures that have boundaries with dimension [8,19,59].The energetic cost of an excitation in such a system is proportional to the size of its boundary and thus would be robust to errors during creation and movement processes-such a system would energetically favor shrinking the boundaries of the errors to zero, causing them to vanish.In particular, it has been argued that such systems would have a lifetime proportional to their size, indicating that the system and the environment to which it is coupled participate in a form of "self-correction" in which the environment that creates the errors can also fix the errors; at a low enough temperature, the rate of the latter process dominates the rate of the former.In this paper, we do not directly address the question of self-correction; instead we attempt to better understand how computation can be done adiabatically within existing models.

III. ADIABATIC CODE DEFORMATIONS
Before showing how to perform the adiabatic deformations and creation of fiducial states, we briefly review a scheme for performing adiabatic gate teleportation [7] (AGT), as this gives an idea of how the protocols we introduce below operate.AGT is a procedure for transferring information in one qubit to information in another qubit (with a possible gate applied to this information) via the use of an adiabatic evolution and an ancillary qubit.The following example is on a system composed of three qubits in which the first and third qubit are swapped (without a gate applied during the swapping).Initially the system evolves under a Hamiltonian given by where P i represents the operator P acting on the ith qubit and where we soon omit the identity operators I.
A final Hamiltonian is defined as The AGT protocol begins with the information encoded in the first qubit and H i turned on.Then, H i is adiabatically turned off while simultaneously turning on H f .In other words, the evolution is described by where f (0) = 1, f (T ) = 0, g(0) = 0 and g(T ) = 1 and T is the time taken to perform the evolution.If f (t) and g(t) are chosen to be slowly varying and the time T is long enough such that the evolution is adiabatic (meaning here that the probability of exciting the system out of its ground space is made small), then the above evolution will take information in the first qubit and send it to information in the third qubit.For example, one may choose f (t) = 1 − g(t) and g(t) = t T so that the evolution is made adiabatic for sufficiently large T .A constant error can be achieved for a fixed constant T .
To see that a constant energy gap is maintained during the above evolution and that the information is transported from the first to third qubit, it is convenient to use the formalism of stabilizer codes to describe this evolution.Indeed, it is actually useful to define three codes.The first code, call it S 1 , is defined by the stabilizer generators X 2 X 3 and Z 2 Z 3 and the logical Pauli oper- Suppose information is encoded into the stabilizer code S 1 so that it is in the +1 eigenstate of both X 2 X 3 and Z 2 Z 3 .Notice then that because X 1 = X(X 2 X 3 ) and Z 1 = Z(Z 2 Z 3 ), information encoded into this code can be accessed by making a measurement on the first qubit.Similarly, information encoded into the second code, S 2 , is localized in the third qubit.The adiabatic evolution in Eq. ( 4) can now be seen as adiabatically dragging a Hamiltonian that is a sum over stabilizer generators in S 1 to a sum over stabilizer generators in S 2 such that the information in the encoded qubit described by X and Z is not touched.
To analyze how the dragging between S 1 and S 2 occurs, it is useful to introduce a new code, S 3 .This code has no non-identity stabilizer operators, but has three encoded qubits.These are defined by Notice that Z 1 and X 2 are the stabilizer generators of S 1 and X 1 and Z 2 are the stabilizer generators for S 2 .
From this perspective, then, the adiabatic evolution is from the initial Hamiltonian −∆(Z 1 + X 2 ) to the final Hamiltonian −∆(X 1 + Z 2 ).These are then simple interpolations between single operators on encoded qubits, and will have a constant energy gap.Indeed, both S 1 and S 2 can be turned into S 3 by promoting stabilizer generators in these codes to logical Pauli operators.When it is possible to perform such a change between codes via an adiabatic evolution, we say that we can adiabatically deform one code into the other.This technique is at the heart of the constructions in this paper.
To see that the information encoded in the first qubit ends up at the third qubit, first note that, during the above evolution, the third encoded qubit is not involved.This implies that information encoded into this qubit will not be affected by the evolution.Next note that X Recall that we are dragging between the +1 eigenstate of X 2 and Z 1 to the +1 eigenstate of Z 2 and X 1 .Thus, since information encoded into the third qubit is not changed during the above evolution, we see that the protocol transports the information in the first qubit to the third qubit.
More generally, the AGT protocol can be extended to enable universal quantum computation [7].We omit the details of this construction except for noting that even when generalized, the energy gap used to guarantee adiabatic evolution is a constant with respect to the number of qubits in the system.We will often refer to this by saying that the energy gap of an adiabatic evolution is constant when considered by itself-we use this language merely to imply that stringing together similar parallel evolutions will not shrink the gap as a function of the number of qubits involved in the evolution.

IV. ADIABATIC CODE DEFORMATIONS OF THE SURFACE CODE
With the punctured surface code defined, we now present a series of adiabatic code deformations that allow for a nearly universal set of operations.First, we show how to prepare a surface code without any defects.Next, we show how to prepare smooth defects in the +1 eigenstate of Z and rough defects in the +1 eigenstate of X.We then show how to prepare smooth defects in ±1 eigenstates of X and rough defects in ±1 eigenstates of Z. (These procedures prepare the defects in eigenstates of the string-like logical operators that tether the defects to a boundary.)Following this, we introduce a procedure to allow code regions containing defects to be separated from and attached to the rest of the code.We next show how defects can be deformed, allowing them to be moved around the lattice.This additionally allows for the CN OT to be enacted between a smooth and a rough defect.Finally, we show how arbitrary ancilla states can be injected into defects and utilized in a computation.
The procedures above can be performed in an entirely adiabatic fashion and thus benefit from the protection of a Hamiltonian gap.Additionally, procedures like defect braiding also benefit from the topological nature of the surface code Hamiltonian, with logical errors requiring high-weight, correlated physical errors corresponding to nontrivial cycles on the lattice or dual lattice.We mention this now to highlight the difference between the entirely adiabatic operations presented in this section and operations we present in Sec.V-such as measurement or heralded gate application-that do not inherit any protection from the gap or the topology.

A. Creation of a surface code without defects
We begin by assuming that we have a large array of qubits, shown in Fig. 4, stabilized by a Hamiltonian H i given by where the sum runs over all the qubits.The ground state of this Hamiltonian is unique and has all the qubits in the state |0 .To prepare the surface, standard active error correction techniques call for the stabilizer generators to be measured.Here, we simulate these measurements in the vein of the "forced measurements" introduced in Ref. [14] by slowly turning off H i and turning on the Hamiltonian introduced in Eq. ( 1) for the specific instance of a "small" surface code.Turning on a Hamiltonian with a "large" surface code as the ground state would cause the system gap to shrink proportionately with the size of the code, so to be concrete we choose to evolve initially to a Hamiltonian with a small surface code ground state.(We will subsequently show how its size can be sequentially increased.)In other words, we adiabatically follow the Hamiltonian where Q is the set of qubits participating in the surface code terms.In this case, G has 8 elements, the four plaquette operators and the four vertex operators shown in Fig. 5. Provided T is large, the system will remain in the ground state.As we showed before, the ground state of the Hamiltonian in Eq. ( 1) is the codespace if a surface code.We choose it to be nondegenerate by our choice of boundaries, although this is not a necessity.After the evolution, the array of qubits looks like Fig. 5.
Having created a small surface code that encodes no qubits, we can increase its size by modifying the boundaries adiabatically.For example, we can grow out part of the smooth boundary by performing an evolution of the form where the numbering corresponds to Fig. 6.This also requires the modification of vertex checks on the smooth boundary being extended, which can be performed at the same time.Additionally, a similar procedure will allow FIG.5: A large array of qubits, an 8-qubit region of which is now encoded in the surface code (shown in black).The boundaries of the code are chosen to be trivial so that the codespace is nondegenerate.
the extension of rough boundaries.By piecing these additional evolutions together, a larger surface code region can be constructed while maintaining a Hamiltonian gap that is lower bounded by a constant proportional to ∆.
For the remainder of this section, we will specialize our figures so that they do not include the black dots that represent qubits, instead keeping only the underlying square lattice structure of the code.However, the full plane of qubits is still assumed to exist.
Here we describe how to create a two-plaquette smooth defect in an unpunctured surface code.(The creation of a rough defect will proceed in an exactly analogous way with the roles of Z and X interchanged.)We create defects using two neighboring plaquettes for pedagogical clarity, although creating single defects is also possible.With two-plaquette defects, it is obvious that the creation process inherits protection from a Hamiltonian gap and the topological nature of logical operators; for singleplaquette defects, the Hamiltonian gap protection is not present.
To begin the creation procedure, the Hamiltonian is initially given by Eq. ( 1), the negative sum of all the plaquette and vertex stabilizer generators for the code.The defect will consist of two adjacent plaquettes, bounded by a curve c that encloses these plaquettes.If the stabilizer generators associated to these two plaquettes are S p1 and S p2 , we can promote them to Z operators for two encoded qubits-Z p1 and Z p2 respectively-of a new code where the stabilizer generators S p1 and S p2 have been removed.If we do this, then X for each qubit can be chosen as a string of Pauli X operators beginning on the appropriate plaquette, traversing the dual lattice, and ending on a smooth boundary (see Figure 7).In fact, we can always choose these operators so that they overlap on all but the qubit separating the two plaquettes.We call these two encoded logical X operators X p1 and X p2 .The operator X p1 X p2 is then the single Pauli X operator acting on the qubit between the plaquettes.
Suppose that we now perform the following adiabatic evolution: while turning off the two plaquette operators, S p1 and S p2 in the Hamiltonian, we simultaneously turn on the Pauli X operator between these two plaquettes.In terms of the encoded logical operators we have defined above, this is equivalent to starting with the Hamiltonian and ending with the Hamiltonian All the other terms in the Hamiltonian commute with the relevant operators and therefore do not contribute to any spectral shifts that might cause crossings.
FIG. 7: Operators involved in creating the defect that includes p1 and p2.Note that the X operations span to a nearby smooth boundary.
In order to understand what happens in interpolating between H i and H f , it is convenient to note that Z p1 Z p2 (which is a closed loop of Pauli Z operators surrounding the smooth defect we are creating) commutes with these Hamiltonians.Also note that initially the system is in the +1 eigenstate of both Z p1 and Z p2 , and hence also in the +1 eigenstate of Z p1 Z p2 .Because Z p1 Z p2 commutes with both H i and H f , we may work in a basis in which Z p1 Z p2 and the full Hamiltonian are simultaneously diagonal.This commutativity ensures that the eigenvalue of Z p1 Z p2 is conserved throughout the evolution.If we perform this evolution via a simple adiabatic dragging between these Hamiltonians (as described in Section III) then the energy gap in the system during this evolution remains constant.At the end of the evolution, the system is in the +1 eigenstate of both Z p1 Z p2 and X p1 X p2 , which is simply a single Pauli X on the qubit between the plaquettes.
The above can be interpreted in terms of codes.By turning off two stabilizer generators and turning on only a single Pauli X, we have introduced an encoded qubit by decreasing the number generators.The product of the two missing plaquette checks is Z, and either X p1 or X p2 can be chosen as X.Additionally, because the operator Z commuted with the Hamiltonian throughout the adiabatic evolution, the encoded qubit is prepared in the +1 eigenstate of Z.
After this adiabatic evolution, the Hamiltonian does not quite factor into two separate codes on the interior and exterior of the defect.The vertex operators adjacent to the defect region still check the single qubit on the interior.As a generating set, the four-body checks adjacent to the defect and the single-body "check" on the interior qubit can equally well be thought of as a generating set with two three-body operators that do not act on the interior qubit, and the single-body operator that does.However, in the Hamiltonian framework we must explicitly remove support of these four-body checks on the interior qubits.We do this either by including the modification of the adjacent vertex checks in the evolution discussed above, or by using another evolution afterward that performs the modification.We will assume that the former modification is used.
We note at this point that, while the defect we have created is small and thus susceptible to relatively lowweight loops of Z errors, these errors actually have no effect.Since Z acts trivially on the state we have prepared-namely, |0 -the fact that the defect has a small perimeter is not detrimental.Once we start performing gates that change the state, we will have to make sure that the perimeter is large, and that the defect is far from the boundaries and other defects.
As mentioned above, the same arguments can be made for preparing rough defects in the +1 eigenstate of X.In that case, two adjoining vertex checks are turned off while a single-body Z on the qubit in the middle is turned on.Two adjacent four-body Z checks have to be modified in this case, but the arguments are exactly the same as above.
It might be useful to address a question that may have entered the reader's head.The procedures above adiabatically interpolate between a Hamiltonian with a nondegenerate ground space to a Hamiltonian with a degenerate ground space.Isn't there a level crossing between the ground space and an excited space that can cause transitions away from the state we want to prepare?Protection from this coupling is provided by the topological nature of the logical operators.The only operator that can couple |0 and |1 for a smooth defect is the string-like operator X that connects the defect to a boundary.This amounts to another way of saying that the eigenvalue of the operator Z is a conserved quantity throughout the evolution, and so such a crossing is not meaningful.Now that we have introduced a method for creating smooth defects in the +1 eigenstate of Z and rough defects in the +1 eigenstate of X, we will show how these defects can be grown and moved around the lattice.This will allow us to introduce other procedures, such as the isolation of a defect from the bulk of the code and an adiabatic code deformation that performs a CN OT gate.

C. Adiabatic deformation of defects
We now show how to deform a defect.This involves modifying the Hamiltonian by adding or removing stabilizer generators, the combination of which allows defects to be moved.
Consider a smooth defect that we wish to grow by turning off a single adjacent plaquette check in the bulk of the system.The number of edges bordering the interior of the defect is either 1, 2, 3, or 4, as shown in Fig. 8.The procedure in each case is basically the same, with the clean-up or potential removal of the adjacent vertex checks being the only difference.The growth is achieved by turning off the plaquette check in the Hamiltonian and turning on a single-qubit − ∆ 2 X Hamiltonian for each qubit in the interior after the evolution.We also modify any adjacent vertex checks at the same time to make the code factor properly into an interior and an exterior.We will briefly analyze the different interior edge cases.
For a single interior edge, as shown in Fig. 9, there is not much different with respect to the case of defect creation.As the plaquette check to grow into is turned off, a single-body X on the qubit adjacent to the defect and the plaquette is turned on.To fully sever the interior and exterior regions, the only thing left to do is modify the two adjacent vertex checks from three-body operators to two-body operators.
The cases of 2, 3, and 4 interior edges are different in that some vertex checks are not only modified but are turned off completely.For the case of 2 interior edges, as shown in Fig. 10, the appropriate evolution turns off the plaquette check while turning on two single-body X Hamiltonians on the interior edges.Note that the twobody vertex check that operated on both the interior qubits is now redundant in terms of stabilizer generators: it is simply the product of the two single-body X terms that were turned on.As such, it can simply be turned off without having to worry about the codespace being affected; it merely provides an additional energy penalty for errors on the two interior qubits.The result is that we have removed two stabilizer generators-the plaquette check and the two-body vertex check-and added two stabilizer generators-the two single-body X operators.Thus, we have not added any additional logical qubits, we have merely grown the perimeter of an existing one.As a final note, the two adjacent four-body vertex checks also must be modified to three-body checks, and again, this can happen simultaneously with the other adiabatic evolutions.The case of 3 and 4 interior qubits, shown in Fig. 11 and Fig. 12 respectively, is almost identical.For the case of 3, the plaquette check is turned off while three single-body X Hamiltonians are turned on.In this case, two weight-two vertex checks are now redundant, and as before they can simply be turned off without worrying about level crossings.The counting works in a similar way, in that we have removed three stabilizer generators and added three, preserving the number of logical qubits.The two adjacent weight-four vertex checks also get modified to weight-three operators.Finally, in the case of 4 interior qubits, the same adiabatic deformation is performed: the plaquette check is turned off and four single-body X Hamiltonians are turned on.Only three of the two-body vertex checks are independent, and so only those three appeared in the original Hamiltonian.They are the three checks made redundant by the single-body X Hamiltonians in this case.Unlike the other cases, in this case there are no other vertex checks that need to be modified.
The procedure for shrinking defects is simply the inverse of the procedures introduced above.By combining the "grow" and "shrink" operations, we can move defects.As demonstrated in Ref. [60], an encoded CN OT gate can be performed by moving a smooth defect in a full loop around a rough defect.The smooth is the control and the rough defect is the target, and the direction of movement-clockwise or counterclockwiseis unimportant.

D. Detaching and attaching surface code regions with defects
For some subsequent procedures we will consider, it is helpful to have an operation that isolates a defect from the surface code or reintroduces a defect to the surface code that was previously isolated.By using defect creation and growth operations described in Secs.IV B and IV C, we can grow a defect "moat" around a defect of interest so that the "castle" surrounding the defect has just a single "drawbridge" connecting it to the rest of the surface, as depicted in Fig. 13.The only additional operation we must consider to complete the isolation procedure is how to "lift the drawbridge" by modifying the remaining check operators adjacent to it.As before, we will 11: Growth of a smooth defect with three qubits on the interior.The process is essentially the same as the one depicted in Fig. 10.
12: Growth of a smooth defect with four qubits on the interior.The procedure is the same as the others, but there are no resulting X check modifications.
only consider the case of manipulating smooth defectsthe case for rough defects is similar.
To isolate smooth defect, we must use smooth boundaries on the "castle" to ensure that X for the defect will have a place to terminate once the "drawbridge" is lifted.For concreteness, we assume that this smooth boundary 13: The setup for pinching off a smooth defect from a smooth wall.
corresponds to the large boundary of the surface, but the same procedure could be performed using a defect to create the isolated region.
To remove the "drawbridge," we simply turn off the single plaquette check that connects the two regions while turning on a single-body X on each of the two qubits that need to be removed.(These qubits are labeled 1 and 2 in Fig. 13.)The operator X 1 X 2 , which was an element of the stabilizer group before the evolution, is now redundant, just as in the case of the interior checks that appear during defect growth in Sec.IV C, and it is also removed.Thus, we remove two checks-the check associated with the "drawbridge" and the two-body check X 1 X 2 -and replace them with two single-body X checks in the Hamiltonian.As before, the vertex checks adjacent to the "drawbridge" must be modified, and in this case they become three-body operators.(As a closing aside, if we had tried to detach a smooth defect through a rough boundary, the operator X 1 X 2 would no longer have been an element of the stabilizer group.) Reversing the detachment procedure allows regions with defects to be attached to to the surface, introducing (or reintroducing) isolated defects back into the code.This attachment procedure is an important step in our protocols for making measurements of X and Z and injecting ancilla states into the system, as discussed in Sec.V A and Sec.IV F. It is also possible to isolate and reintroduce a rough defect through a rough boundary in an analogous fashion.
E. Creation of a X (Z) defect in a ±1 eigenstate of Z (X) Another capability that will be useful for later procedures is the ability to prepare rough defects in an eigenstate of Z and smooth defects in an eigenstate of X.The preparation of these defects in performed in a region that is disconnected from the main surface.It is then attached to the surface using the procedure described in Sec.IV D to introduce it to the bulk surface.
To prepare a rough qubit in the +1 eigenstate of Z, we utilize a procedure very similar to the original creation of the surface, described in Sec.IV A. Recall that the stabilizer Hamiltonian on a region disconnected from the surface is simply a sum of single-body −Z operators on each qubit.Once the location and size of the disconnected region is chosen, we prepare it in a surface with solely rough boundaries.Rather than following this up with the creation of a rough defect, we simply prepare the surface by leaving a region of adjacent X checks turned off and the single-body Z terms on the interior of the region unchanged.Since the system began in an eigenstate of any product of Z operators, and since Z for the rough qubit commutes with all of the check operators we turn on, the system remains in the +1 eigenstate of Z after the evolution.
We also could have prepared the rough defect in the −1 eigenstate of Z by first performing an adiabatic evolution on each qubit of the form −Z → X → Z.This has the effect of dragging each of the qubits into the −1 eigenstate of the local Z operators, and now, given a region of appropriate size, Z will have an eigenvalue of −1 both before and after the defect creation process.(The size constraints amount to ensuring that the weight of the logical operator is odd.) Smooth defects can be prepared in ±1 eigenstates of X in much the same way, requiring only simple modifications.To prepare a smooth defect in the +1 eigenstate of X, each qubit first undergoes the evolution induced by the adiabatic sequence −Z → −X.Likewise, to prepare a smooth defect in the −1 eigenstate of X, each qubit first undergoes the adiabatic evolution −Z → X.Now X will have the correct value before and after the evolution that creates the defect, subject to the same size constraints mentioned above.

F. State injection into defects
Creating defects in known ancilla states is another important building block for our model.In typical architectures based on the surface code, completing a universal set of encoded quantum gates requires the ability to "distill" high fidelity states-called "magic states"using protocols like the one discovered by Bravyi and Kitaev [49].In this section, we describe how to implement these preparations in an adiabatic simulation of the process of state injection.
In measurement-based injection of a magic state [36], one first exposes a qubit by preparing a single (unencoded) qubit in the state |ψ .Then, the state is quickly encoded in a surface code defect, and the procedure is finished by growing the defect to a sufficiently large size so that it is well protected from noise.This process need not be perfect, but any error introduced by the injection procedure must keep the total error in the encoded state |ψ below the threshold of the distillation protocol.
We describe our adiabatic simulation of this process for an injection into a smooth defect, but the rough-defect case is similar.We begin by preparing an all-smoothboundary surface near the edge of the bulk surface using the method described in Sec.IV A. We then create a rough defect in a +1 eigenstate of X in this region using the procedure described in Sec.IV B. The situation is depicted in Fig. 14.Because this region has only smooth boundaries, there is nowhere for a string of X operators from the defect to connect.Indeed, if we ignore the one qubit on the interior of the defect, then what we would normally call X, a string of X operators enclosing the defect, is already an element of the stabilizer group.It can be formed by taking the product of all the vertex checks.(As an aside, we note that this is a consequence of the topology of the sphere, for which all loops remain homotopic when a single point is removed.)As discussed in Sec.IV B, this leaves the single qubit on the interior of the defect in the +1 eigenstate of Z.
We then transform this interior qubit to the desired state by an adiabatic evolution.For example, if we want to prepare the state T |+ , we evolve using the Hamiltonian H(s) = (1 − s)(−Z) + sU ZU † , where in this case U = T H.If we think of this as a logical qubit, then X is a single X on the qubit and Z is a single Z on the qubit.
Recall that the face checks originally incident on the interior qubit have been modified and are no longer incident.The situation is now described by Fig. 15.Next, we adiabatically turn on the two vertex checks that were originally turned off to create the defect.We simultaneously (and adiabatically) also turn off the three-body plaquette checks, as they would otherwise anti-commute with the final Hamiltonian.This evolution transforms the logical operators, since the initial single-body Z does not commute with the final X checks.The transformation Z undergoes is determined by the Pauli algebra and the demands of a stabilizer code.Since Z must still commute with the code after the vertex checks are turned back on (note that the formerly interior qubit has now been reintroduced to the code because the vertex checks are incident on it once again), and since it also must not be in the stabilizer group itself, a suitable choice of the new Z is the product of the old Z and one of the threebody plaquette checks that also did not commute with the vertex checks.What remains is what appears to be a normal two-plaquette defect as shown in Fig. 16, but the crucial difference is that there is now no sense of an isolated interior, since the neighboring vertex checks are still incident on the qubit inside.In fact, because X has never been disturbed by any of the evolutions we performed, it is still a single-body operator localized to the qubit inside the defect.This leaves the encoded qubit prone to decohering environmental interactions, and so we make it larger by "splitting" the defect apart into a pair of defects, as depicted in Fig. 17.As we move the parts away from each other, we also grow their perimeters using the methods described above to protect against Z errors.
This double-defect qubit could be used as-is, but to make it more like the defects we have worked with so far,  we simply take one of the halves and merge it with the global smooth boundary of our preparation region, as depicted in Fig. 18.Finally, we attach the surface containing this defect to the main surface using the procedure described in Sec.IV D. This defect can be shuttled in and the boundary can be modified to the original shape.
Encoded distillation circuits, such as the ones depicted in Figs.19 and 20 (where the S and T gates are implemented by teleportation circuits such as the one depicted in Fig. 23), utilize operations we have already described: preparation of defects in |0 , |+ , T |+ , and S|+ states and implementation of CN OT gates by code deformation.The only encoded operations these circuits use that we have not described are measurements of encoded Pauli X and Z operators, which we describe in Sec.V A.

V. NON-ADIABATIC PROCEDURES FOR SURFACE CODE DEFECTS
The procedures presented in Sec.IV use only adiabatic evolutions of stabilizer Hamiltonians.However, these operations do not allow for universal quantum computation.
The key missing ingredient is the capability to perform logical measurements-namely, the ability to measure X and Z for smooth and rough defects.These measurements are the only non-adiabatic ingredients appearing in our model.In this section we describe how to perform them as well as use them in additional procedures, such as heralded application of X and Z gates.Although the measurements are not protected by adiabaticity or a Hamiltonian gap, their topological nature provides robustness to local errors.

A. Measurements of X and Z for defects
In measurement-based surface-code models, defect logical operators are measured in-situ by simply measuring a region of individual qubits in the surface.The parities of of the measurements are then used to infer the eigenvalue of X or Z with probability 1 − O(p d ), where d is the distance of the code and p is the probability that an individual qubit measurement is faulty.
FIG. 2: Distillation circuit for T † |+i states, adapted from Ref. [26].After the Bell state preparation, the gates perform the coherent encoding circuit for the 15-qubit shortened quantum Reed-Muller code.(See Appendix A for details.)The T gates are performed by gate teleportation, using the circuit from Fig. 1.This distillation circuit also distills T |+i states on T † |+i inputs.
Fig. 1 instead at a lower gate cost.To do this, the final corrective step in Fig. 1 must depend on both the M Z measurement there and the measurement indicating whether the Z operator needs to be applied.The set of possible corrections is then I, Z, S, and SZ = S † .The number of gates in the teleportation circuit is then 3.75 on average instead of 3.5.The worst-case gate count is still 4, however.
Let us now count the number of gates used by the Raussendorf et al. protocol.
To achieve ✏ out  ✏ T , one iterates this distillation process `times, where In addition to this, each of these rounds must themselves be repeated t times because the X checks may fail to give a trivial syndrome.Because low-error states decode with higher probability, the expected number of repetitions is small when ✏ is small.Specifically, the ex- single-qubit measurements in the surface will necessarily anti-commute with the code Hamiltonian, leading to excitations out of the ground space.If it is the end of the computation, and we want to know the state of all the defect qubits, we can just turn the Hamiltonian off and measure everything.However, the use of magic states via gate teleportation (described later) requires conditioning future actions on the classical outcome of logical qubit measurements.In this section we present an ancilla-coupled method to perform these logical measurements.
To measure X or Z for a defect in a "non-destructive" way (meaning that the post-measured state stays in the codespace), we use the method of ancilla-coupled measurement introduced by Steane in Ref. [61].Fig. 21 depicts this process for measuring Z for a smooth defect qubit in the state |ψ .First, we prepare a rough defect in the +1 eigenstate of Z as described in Sec.IV E. Next, we perform a sequence of adiabatic deformations, described in Sec.IV C, to enact a CN OT gate between the smooth and rough defects.Then, the rough-defect ancilla is detached from the code using the method demonstrated in Sec.IV D. Finally, we turn off the Hamiltonian and destructively measure the isolated region in the Z basis.
A similar procedure performs a measurement of X for a smooth qubit (simply measure the isolated region in the X basis), and a similar circuit can be used to measure logical operators for a rough defect.

B. Heralded application of X and Z to defects
With the ability to perform ancilla-coupled measurements, introduced in Sec.V A, and the Hamiltonian evolutions described in Sec.IV, we can apply X and Z to defects using the circuit shown in Fig. 22, where the measurements are assumed to be of the type described in the previous section.These operations are not necessary to establish universality; the set of encoded operations we have presented thus far are a universal set by themselves.In fact, there is never a need to apply logical Pauli operators at all using our encoded gate basis because logical Pauli operators can be propagated through encoded circuits efficiently by the Gottesman-Knill theorem [62]-the only non-Clifford gate in our gate basis is the preparation T |+ , and Pauli operators never need to be propagated through preparations.The propagated "Pauli frame" can then be used to reinterpret measurement results as needed, without active application of logical Pauli operators.Nevertheless, we present methods for applying logical Pauli operators in case there is a situation where propagating the Pauli frame is undesirable.
FIG. 22: Circuit used to apply one of the Pauli operators to a smooth defect qubit.The outcome of the X measurement is b ∈ {0, 1} and the outcome of the Z measurement is a ∈ {0, 1}.The outcomes of the measurement all occur with equal probability and the final state depends on these outcomes as shown.If an undesired operator is applied, the ancilla qubit is reinitialized and the circuit is implemented again.However, now the appropriate operator is the one that undoes the operator applied in the first iteration and applies the desired operator.(This, of course, will just be a different one of the four operators X a Z b .) All of the pieces in this circuit have been described previously.The preparation of a rough defect in the +1 eigenstate of Z is described in Sec.IV E, performing a CN OT between a smooth defect and a rough defect is described in Sec.IV C, and making measurements of X and Z for smooth and rough defects was just described in Sec.V A.

VI. THE COMPLETED MODEL
To summarize our surface code model, we list the procedures we have defined in Sec.IV and Sec.V: Magic-state gate teleportation of the T gate is performed using the circuit in Fig. 23, and the Hadamard gate can be performed with an ancilla state using the circuit in Fig. 24.
In both cases, the only operations required involve the procedures defined in the list above.Other procedures, such as performing a CN OT between two smooth qubits, have been studied previously [36] and also only require operations from the list above.Thus, in encoded form, we can prepare Pauli X and Z eigenstates, perform a universal gate set, and measure any qubit in either the X or Z basis.Taken together, these procedures allow for universal quantum computation.

VII. EXTENSION TO 2D COLOR CODES
We briefly discuss how one can adapt our surface code procedures to the two-dimensional color codes, in particular to the 4.8.8 2D color code.This extends our construction to all nontrivial homological stabilizer codes, because by Anderson's classification theorem [63], all homological stabilizer codes with nonlocal logical operators are either surface codes or color codes.
Color codes in two dimensions are defined on a twodimensional lattice that is trivalent (each vertex is of degree three) and face-three-colorable (we can color the plaquettes by three colors such that no two adjacent plaquettes are the same color).In such a graph, the edges can also be colored to be the color that is different from the colors of the two faces incident upon it.Fig. 25 is FIG.25: A lattice with colored plaquettes on which one can define the color codes.
an example of such a lattice.Unlike our presentation of the surface code in which graph edges were associated with qubits, color codes are naturally presented so that graph vertices are associated with qubits.Let V (p) denote the vertices that are on the boundary of a plaquette, and define a stabilizer group structure of the color codes as follows.To every plaquette p, associate two stabilizer generators, the tensor product of Pauli X on the adjacent qubits, given by as well as the tensor product of Pauli Z on the adjacent qubits, given by The representative code in Fig. 25 has four-body (red) and eight-body (blue and green) stabilizer generators.
(These are the weights away from the boundaries of the code, where four-body blue and green faces also exist.)Boundaries in the color code also have a slightly richer structure.They are no longer smooth and rough, but rather, they have a color associated to them.This color is determined by the boundary's missing color.For example, in Fig 25, the bottom boundary is red, since there are no red plaquettes adjacent to the bottom edge.A careful accounting of qubits and checks in Fig. 25 indicates that there is a single logical qubit associated with the surface.
For our purposes, we will treat it as a "gauge" degree of freedom using the subsystem stabilizer code formalism [19].The operators X and Z associated with this qubit can be chosen as strings of Pauli X and Z operators, respectively, along the bottom boundary.Just as with the surface codes, we can create defects in the color code to store more logical qubits.In addition to having a type (X or Z), the defects now also have a color.To create the analog of a smooth defect, we remove a Z-type stabilizer generator, and to create the analog of a rough defect, we remove an X-type generator.For a Z-type defect, one choice for Z is the removed generator (equivalent to a string of a different color around the defect that only passes through edges and faces of that color), and one choice for X is a string of Xs connecting to a boundary whose color is the same as that of the removed plaquette (such that the string only passes through edges and faces of the same color as the removed plaquette).
As is true for any stabilizer code, we can define the Hamiltonian in Eq. ( 1), and it has a ground space equivalent to the codespace of the code.In the case of the color codes it can be written as The color-code Hamiltonian, like the surface-code Hamiltonian, does not lead to a self-correcting quantum memory, but we can use adiabatic interpolations between static Hamiltonians of the type in Eq. ( 13).
As in Sec.IV A, we can perform an adiabatic interpolation to initially create the color code without any defects.We imagine the same setting-a large number of qubits in the ground state of local Hamiltonians H = −Z-and prepare the code by using an interpolation of the form (Since Z for the newly created code commutes with this Hamiltonian at all times, and since it initially has eigenvalue +1, the qubit associated with the surface is prepared in the +1 eigenstate of Z.This is the gauge degree of freedom mentioned above.)As we did for the surface code, we choose to create a small color code first and then grow it to avoid a shrinking gap.The small color code is grown in a manner similar to Sec.IV A. For example, to create a green Z-type defect in the +1 eigenstate of Z, described for the surface code in Sec.IV B, two Ztype green plaquettes separated by one red plaquette are turned off while simultaneously turning on −XX on two pairs of qubits in between, as shown in Fig. 26.Note that during the defect's creation a neighboring blue plaquette gets modified to a six-body operator and a neighboring red plaquette gets modified to a two-body operator.The surface code procedures for growing and moving defects, presented in Sec.IV C, can also be adapted to the color codes.We will not present the the cases for different numbers of interior qubits separately here.Rather, we examine the simplest case when there are only two neighboring qubits.The other cases, as in the surface code, simply require more modifications of adjoining checks.To grow a Z-type green defect like the one in Fig. 26, first pick another green face.It will be separated from the defect region by a red plaquette.Along one of the two lines connecting the defect region to the green check, turn on −XX while turning off the green plaquette.This will incur a modification a neighboring blue plaquette as well as the red plaquette itself.Next, we show that the color code also supports detachment and attachment procedures, described in Sec.IV D for the surface code.Imagine a two-plaquette red defect, depicted in Fig. 27, that we would like to isolate from the bulk code.To complete the detach-FIG.27: A Z-type red defect isolation procedure.The "drawbridge" in this case is the red plaquette adjacent to the yellow dots in the figure.The Z-type check on the red face is turned off while the two −XX operators are turned on.The four-body X operator that is the product of the two −XX Hamiltonians is in the stabilizer group before the evolution, and it is trivially in the stabilizer group of the code after the evolution.The blue and green plaquettes adjacent to the yellow dots are modified to be a four-body operators.(Also note that the X-type check on the red plaquette must also turned off to fully isolate the region, and two −ZZ Hamiltonians are turned on.)ment procedure for a Z-type red defect, two −XX Hamiltonians-on the qubits indicated by yellow dotsare turned on while turning off the Z-type red plaquette operator adjacent to the dots.In the process, the adjacent blue and green plaquettes get modified to four-body operators.Since the four-body X operator that is the product of the two −XX Hamiltonians is in the stabilizer group at the beginning and at the end of the evolution, we have successfully severed the two code regions.
As discussed in Sec.IV E, it is important that we are able to prepare Z-type defects in eigenstates of X and vice versa.For color codes, the procedure is essentially identical to the one for surface codes, and proceeds by preparing single qubits in particular states (±1 eigenstates of X for Z-type defects and ±1 eigenstates of Z for X-type defects).Just as before, a defect location is anticipated and the preparation of the surface proceeds normally everywhere except for the defect.
Ancilla state injection for the color codes is slightly different than the procedures for the surface code introduced in Sec.IV F. After isolating a region with green boundaries, or creating such a region adjacent to a green boundary, we use the procedures described above to introduce an X-type and a Z-type defect at the same location, as pictured in Fig. 28.Notice that interior FIG.28: The creation of a defect region with both the X-type and Z-type green checks turned off.There are four interior qubits prepared in two Bell pairs by this procedure.red checks have also been modified during this procedure, putting the four interior qubits into two Bell pairs.Additionally, the neighboring blue plaquettes have been modified to six-body operators.An evolution is then performed that only touches these four interior qubits, turning on the Hamiltonians pictured in Fig. 29 while turning off the two −XX − ZZ Hamiltonians.Next, just as we did for the surface code, we adiabatically drag a qubit to the desired state, as pictured in Fig. 30.The "logical qubit" is localized to the upper-right qubit, with single-body X and Z operators.The next step is to "grow" these logical operators in a particular way.This is achieved by performing another adiabatic evolution on the four qubits to the Hamiltonian represented in Fig. 31, which is just the reintroduction of the red face checks that we turned off at the beginning.This evolution modifies X and Z from single-body operators to the operators shown in Fig. 32.Finally, the X-type checks on the green faces currently housing the defect are turned on while the adjacent Z-type blue faces are turned off, leading to the situation depicted in Fig. 33.As in the case of the surface code, one of these faces is moved away and absorbed into FIG.31: The single-body terms in Fig. 30 are turned off while turning on the X-type and Z-type checks on the red plaquette.
FIG. 32: X and Z after the reintroduction of the red plaquette in Fig. 31.
the green boundary of the region.Then the region is attached and the green defect encoding the state is moved into the bulk computational region.
None of the other procedures introduced in Sec.IV and Sec.V are appreciably different for the color codes.Measurements are still performed in an ancilla-coupled manner, and X and Z can still be applied in a heralded fashion.Logical CN OT gates are still performed by braiding, with the control being a Z-type defect and the target being an X-type defect.Ref. [64] discusses how to perform a CN OT between defects of the same type (or color).Thus, all the ingredients are precisely the same, and encoded universal quantum computation can be performed with two ingredients: adiabatic interpolations between static Hamiltonians and ancilla-coupled measurements.

VIII. CONCLUSION
We have presented a model of quantum computation that utilizes adiabatic interpolations between static Hamiltonians which encode quantum information in their degenerate ground spaces.By utilizing the process of adiabatic code deformation, we create and grow small code regions, introduce and braid defects, and inject arbitrary states into defects.These procedures never cause the Hamiltonian gap to shrink below a constant proportional to ∆, and they can all be performed with the protection of a gap and topology.However, to perform logical measurements we use an ancilla-coupled scheme, braiding and isolating an ancilla defect and then turning pieces of the Hamiltonian off and destructively measuring a code region.Taken together, these procedures allow for universal quantum computation.
Our model lives at the intersection of three other models of quantum computation.It provides explicit examples of adiabatic evolutions in the setting of a topological code, and we make an effort to supply procedures that do not increase the rate at which errors (anyons) are intro-FIG.33: The arrangement of the defect after reintroducing the X-type green plaquettes.X is a string of Pauli X operators connecting two blue faces and Z is a loop of Pauli Z operators around a blue face.duced to the system.Since we store information in the ground space of a changing Hamiltonian, our model also borrows intuition and robustness from holonomic quantum computing.Indeed, the braiding operations we perform rely precisely on the non-trivial structure of ground space holonomies.Lastly, our adiabatic interpolations are like miniature adiabatic quantum computations, and their implementations are made less noisy by traversing an adiabatic path more slowly.
Unfortunately, the model we present is not faulttolerant.While the lifetime of the ground space, and thus the encoded quantum information, is exponential in ∆/T in the presence of coupling to a thermal bath, no protection is gained by increasing the size of the code.It would be interesting to study a model that can actively remove entropy from the system, utilizing active error correction in a way that is compatible with the Hamiltonian nature of the model, but we do not address these problems in this work.
We hope that the model we have analyzed here can be useful for a further understanding of the properties of quantum computation based on stabilizer Hamiltonians.In particular, it would be interesting to extend this work to models such as Kitaev's quantum double model [4] or the Turaev-Viro codes [32], where universality can be achieved without the creation and distillation of magic states.
Another line of inquiry worth investigating is the degree to which the control requirements on our construction can be relaxed.In particular one can imagine moving a defect not by turning off and on a few terms in a Hamiltonian to perform a deformation, but instead by turning large numbers of these terms off and on at the same time.This would have the advantage of not requiring precise few-term control of a Hamiltonian, but a spatially more course-grained ability to change the Hamiltonian.In [65] such an approach was investigated for adiabatic implementations of measurement-based quantum computing, where it was argued that this results in a non-constant, but inverse-polynomial energy gap.Such a gap would require a slower evolution to maintain the adiabatic condition, and one might worry that it would also destroy the robustness of the mode.However [65] argued that this polynomial gap did not destroy the error protection properties in a worse manner than the constant gap model.Can the topological adiabatic evolutions we describe here be done similarly, with the ability to only change the Hamiltonian over a spatial course graining?
Addendum: In the course of writing this manuscript, Zheng and Brun in Ref. [66] published an article on a similar topic; it is worth comparing and contrasting our work to theirs.
Both works bring together concepts from holonomic, adiabatic, and circuit-model quantum computing to effect universal quantum computation.Both works also utilize adiabatic interpolations between degenerate Hamiltonians in a way that maintains a constant energy gap.
Our work differs in that we expand in detail about how adding the extra ingredient of topological codes into the mix offers additional modes of error suppression and local quantum processing.We develop explicit methods for how adiabatic, holonomic, and circuit-model ideas can be brought to bear on topological codes, leading to a comprehensive model of "adiabatic topological quantum computing."The work by Zheng and Brun concludes with the sentences "We hope to apply our method to faulttolerant schemes based on large block codes and topological codes, which may have higher thresholds than faulttolerant schemes that concatenate small codes.Very likely, the maximum weight of the Hamiltonian terms used to describe topological codes during adiabatic evolution will be small and well bounded." Our work also differs in that we focus on a model of quantum computation that only uses (a) adiabatic interpolations between Hamiltonians that can never be completely turned off and (b) measurements of logical operators; we further we make it clear that these operations alone are insufficient to make our model fault-tolerant relative to standard definitions of fault-tolerance.The work by Zheng and Brun focuses on a model that has these operations but also adds (c) the ability to measure code check operators and (d) the ability to completely turn on and off Hamiltonians.With these additional features, their model becomes fault tolerant according to a definition of fault-tolerance they provide.Augmented with these capabilities, our model also becomes fault-tolerant according to their definition, but we have not highlighted this property in the main text as our emphasis is on the features of pure adiabatic topological quantum computing model.
Finally, by explicitly going through the steps of how to implement each element of a universal set of encoded operations, we have found that contrary to the statement in the work of Zheng and Brun that "standard techniques, like magic state injection and distillation, can realize fault-tolerant encoded non-Clifford gates," it can in fact be quite subtle as to how to realize state injection by adiabatic interpolations.Indeed, we point out that there are even qualitative differences between how to do this correctly for surface codes and for color codes.Repeating the end of our main Conclusion section above, this revelation suggests that an interesting area for future research would be extending our analysis to models that can achieve universality without the need for the creation and distillation of magic states.

FIG. 1 :
FIG.1: Stabilizer generators (checks) for the surface code.An example of a plaquette check Sp and a vertex check Sv.

FIG. 4 :
FIG.4:A large array of qubits in the state |0 , each protected by a Hamiltonian H = −∆Z.

FIG. 8 :
FIG. 8: The four potential situations faced when growing a smooth defect.(a) Only one interior qubit.(b) Two interior qubits.(c) Three interior qubits.(d) Four interior qubits.

FIG. 9 :
FIG.9: Growth of a smooth defect with only a single qubit on the interior after the procedure.(a) We wish to grow the defect to the indicated plaquette.(b) We adiabatically turn off the neighboring plaquette while (c) turning on a −X Hamiltonian on the interior qubit.(d) This procedure causes modifications to the neighboring X checks that can be performed simultaneously with steps (b) and (c).

FIG. 10 :
FIG. 10: Growth of a smooth defect with two qubits on the interior.(a) We wish to grow the defect to the indicated plaquette.(b) We adiabatically turn off the neighboring plaquette while (c) turning on two −X Hamiltonians on the interior qubits.(d) This procedure causes modifications to the neighboring X checks.
FIG.11: Growth of a smooth defect with three qubits on the interior.The process is essentially the same as the one depicted in Fig.10.

FIG. 14 :
FIG.14:After the Hamiltonian deformation (or sequence of deformations), we are left with a surface code with trivial boundaries encoding a rough defect in the state |+ .

FIG. 15 :
FIG.15:The interior qubit is adiabatically dragged to the state |ψ , the desired magic state.

FIG. 18 :
FIG.18:One of the defects is with the boundary to make the standard single defect.

1 .
Sec. IV A: Adiabatic preparation of a surface code encoding no qubits 2. Sec.IV B: Adiabatic preparation of smooth defects in the +1 eigenstate of Z and rough defects in the +1 eigenstate of X 3. Sec.IV C: Adiabatic deformation of smooth and rough defects, allowing for defect movement 4. Sec.IV D: Adiabatic detaching and attaching procedures, allowing for the isolation of regions containing defects 5. Sec.IV E: Adiabatic preparation of smooth defects in the ±1 eigenstate of X and rough defects in the ±1 eigenstate of Z 6. Sec.IV F: Adiabatic injection of ancilla states into defects 7. Sec.V A: Non-adiabatic procedures for "nondestructive" ancilla-coupled measurement of X and Z for defects 8. Sec.V B: Non-adiabatic, measurement-based procedure for the heralded application of X and Z

FIG. 26 :
FIG. 26: Two adjacent green Z-plaquettes are turned off while turning on the −XX Hamiltonian shown, creating a Z-type defect in the +1 eigenstate of Z (shown here as a light blue string encircling the defect).The green string depicts the associated X operator.

FIG. 29 :
FIG. 29: Four interior qubits are "exposed." . 16: The missing X checks are reintroduced to the code, causing neighboring Z checks to be removed.This new defect is now encoded in the state |ψ with an encircling Z and a single-qubit X. FIG . 17: Because X was only a single-qubit operator, the two removed faces are moved apart and grown to combat decoherence. FIG In our Hamiltonian model, this in-situ measurement is an issue because Gate teleportation circuit using the T |+ state.The S correction needs to be performed half of the time and can be implemented in the same way using the state S |+ = |+i instead of T |+ (and utilizing a Z correction half of the time).Circuit for applying the Hadamard gate with an ancilla state.The correction A depends on the result of the measurement: if the measurement result is +1, then A = X, and if the measurement result is −1, then A = Z.The S and S † gates can be performed using a circuit like the one in Fig.23.