Adiabatic graph-state quantum computation

Measurement-based quantum computation (MBQC) and holonomic quantum computation (HQC) are two very different computational methods. The computation in MBQC is driven by adaptive measurements executed in a particular order on a large entangled state. In contrast in HQC the system starts in the ground subspace of a Hamiltonian which is slowly changed such that a transformation occurs within the subspace. Following the approach of Bacon and Flammia, we show that any measurement-based quantum computation on a graph state with \emph{gflow} can be converted into an adiabatically driven holonomic computation, which we call \emph{adiabatic graph-state quantum computation} (AGQC). We then investigate how properties of AGQC relate to the properties of MBQC, such as computational depth. We identify a trade-off that can be made between the number of adiabatic steps in AGQC and the norm of $\dot{H}$ as well as the degree of $H$, in analogy to the trade-off between the number of measurements and classical post-processing seen in MBQC. Finally the effects of performing AGQC with orderings that differ from standard MBQC are investigated.


Introduction
Quantum computation provides an advantage over classical computation in solving certain problems in shorter time. For example, known classical algorithms for factoring a number take exponential time in the number of inputs N, while a quantum algorithm polynomial in N exists [1]. Three widely studied methods for implementing universal quantum computation are circuit-based quantum computation (see e.g. [2]), in which a series of unitary gates are applied to a number of input qubits; measurement-based quantum computation [3] (MBQC), in which an entangled resource state is prepared and measurements are performed to drive a transformation on some portion of the unmeasured qubits; and adiabatic quantum computation [4] (AQC), in which the solution to a problem is encoded in the ground state of a Hamiltonian, and this ground state is reached adiabatically (i.e. slowly with respect to the minimum energy gap) starting from the ground state of some easily prepared Hamiltonian. These models have been shown to be equivalent to each other in the following sense; for a given computation, the number of gates required in the circuit model is polynomially equivalent to the number of measurements that have to be made on a graph state in MBQC [3] (or equivalently the size of the graph state), whilst the number of gates required in the circuit model is polynomial in the inverse energy gap of the equivalent AQC computation [5].
Beyond the application of the different models, it is of general interest to have methods of translating computations from one model to another so that intuition, understanding and techniques from one model can be applied to the others. Here we are interested in the translation from MBQC to the adiabatic model. Beyond being a universal model for computation (and indeed a fault tolerant one [6]) the inherent interplay of classical and quantum information in MBQC has also given rise to new protocols such as blind quantum computation [7] and verified universal computation [8]. Furthermore this interplay has been used to show that it differs from the circuit model in its quantum depth complexity [9]. Within the study of this interplay in MBQC a structural tool called gflow [10,11] is particularly useful. For example it has been used to study parralelism [7,9], translation between MBQC and the circuit model [7,12] and the emergence of causal order [13] in MBQC.
Bacon and Flammia proposed the direct translation of MBQC on a cluster state into an adiabatic evolution [14], which they call adiabatic cluster-state quantum computation. In this model, the initial adiabatic Hamiltonian is made up of the stabilisers of the cluster-state and the computation proceeds by replacing the discontinuous measurements of MBQC with continuous adiabatic transformations. In contrast to AQC, the adiabatically evolving Hamiltonian may be efficiently diagonalisable throughout the evolution, while the computation proceeds in the preserved subspace. Here we extend Bacon and Flammia's model to general graph states with gflow. This new adiabatic graph-state quantum computation (AGQC) allows us to investigate how the properties of MBQC change when we replace non-deterministic measurements by deterministic adiabatic transformations.
Firstly we are interested in how the trade-off between classical and quantum time in MBQC manifests itself in AGQC. We find that the trade-off between quantum and classical time in MBQC is translated into a trade-off between the number of adiabatic steps and the degree of the initial Hamiltonian (that is, the number of sites each term acts on non-triviallly) as well as the norm of the time derivative of the Hamiltonian. Whether or not large degree operators act as a useful resource in this model is important from a fundamental point of view as well as a practical one. Our results suggest that large degree operators are not a useful computational resource in this model and to decrease the number of adiabatic steps, the Hamiltonian degree needs to rise. Under the assumption that simulating high degree operators shrinks the energy gap (which is the case for all known methods e.g. [15,16]), this means that the optimal way of performing MBQC does not correspond to the optimal way to perform AGQC. These results are also interesting from the perspective of a subtlety that arrises within the application of the adiabatic theorem. In our computation, the time taken for each step is governed not by the energy gap (which remains constant), but the norm of differential of the Hamiltonian.
We are also interested in how the time order associated to computation through MBQC appears in our model. One may expect that replacing random measurements with deterministic adiabatic substitutions will allow different ordering of the computational steps. In particular Clifford operations can be done in a single step in MBQC, so we expect this behaviour to manifest itself in AGQC. However we find that, in certain cases, the computational steps can be performed in a limited order. Surprisingly the most limited ordering occurs for certain Clifford operations.
The paper is structured as follows; in Section 2 we provide background on adiabatic quantum computation, measurement-based quantum computation, and adiabatic cluster-state quantum computation. In Section 3 we generalise adiabatic cluster-state quantum computation to any graph state which has gflow, and investigate what tradeoff exists in this model in analogy to the trade-offs in MBQC. Finally we discuss the role of the ordering of measurements in adiabatic graph-state quantum computation in Section 4 and conclude in Section 5.

Adiabatic Quantum Computation
The original adiabatic quantum computation (AQC) protocol [4] starts with an initial Hamiltonian H 0 , which is easy to realise, such as a uniform magnetic field n X n , where X n is a Pauli X operator acting on the n th qubit. The system is prepared in the ground state of this Hamiltonian, |E 0 (0) , and then the Hamiltonian is slowly changed to a new 'problem Hamiltonian' H p whose ground state encodes the problem to be solved. Broadly speaking, the adiabatic theorem states that, provided the ground state energy E 0 (t) does not become degenerate with any other levels, and provided the evolution is slow enough, the system stays in or close to the ground state of the problem Hamiltonian.
A typical example is solving a satisfiability problem [4], where we have a boolean formula made up of logical clauses (OR, AND,¬) which we would like to be satisfied, e.g. x 1 AND ¬x 2 is satisfied by the assignment (x 1 , x 2 ) = (1, 0). If we replace boolean variables with spin-1 2 particles |0 = |↑ and |1 = |↓ , and logical clauses with interactions that penalise the wrong assignment (such as Ising interactions), then the problem can be rephrased as finding the ground state of a Hamiltonian. For example, the problem of finding the largest set of vertices on a graph with degree 3 such that no vertices are connected by an edge can be re-expressed as finding the ground state of an Ising model in a magenetic field [17].
How fast H 0 can be changed to H p is governed by the adiabatic theorem [18]. The form of the adiabatic theorem that will be most appropriate in this paper is the following [19]; consider a linear interpolation between two Hamiltonians H 0 and H p . The time dependent Hamiltonian of this transition is H(t) = (1 − t τ )H 0 + t τ H p so that the transition is finished at t = τ . To simplify the notation, we introduce a parameter s = t τ , and we denote the eigenvalues of H(s) as E n (s). Then if we start in the ground state of H 0 , the final state will be ε close in the l 2 norm to the ground subspace of H p provided the adiabatic run time τ satisfies where ∆ = min n |E n (s) − E 0 (s)|, 0 < δ ≤ 1, M is the operator norm, defined as the largest absolute eigenvalue of M, and c(δ) is a parameter depending only on δ.
Although it is tempting to set δ → 0, this isn't possible without the adiabatic time diverging, since lim δ→0 c(δ) = ∞ (see [19] for details). So δ is taken as some fixed, small positive number.

Measurement-based quantum computation
In MBQC an entangled resource state is measured sequentially and adaptively. To create this resource state, qubits are prepared in a |+ = (1/ √ 2)(|0 + |1 ) state, and controlled-phase (CZ) operations are performed between neighbouring qubits. To perform a computation on this resource state, single qubit measurements in bases , and where θ j is the measurement angle for qubit j. The measurement will have a random outcome ±1, however by adapting future measurements on other qubits this randomness can be corrected for. The deterministic output of the computation is either encoded in the quantum state of the unmeasured qubits (that is, the quantum output), or in the classical measurement outcomes [3,20], with the former case giving a unitary evolution on the encoded information.
For example, consider a system of two qubits, A and B. Qubit A is the input and is prepared in a state |φ = α|0 + β|1 , whilst qubit B is the output, and is initially prepared in state |+ . Performing a CZ gate between them entangles the input and results in the state |ψ AB = α|0 |+ + β|1 |− . Note that by preparing A in state |φ instead of |+ , we are able to encode information in the chain, so we call A the input to the chain, and since B is the system where the information will be at the end of the computation, we call this the output. We can rewrite the state |ψ AB as where U z (θ) is a rotation about the z-axis by angle θ, andH is a Hadamard gate. Now consider performing a |± θ measurement on qubit A. If the outcome is |+ θ , the state of qubit B isHU z (θ)|φ , and if the outcome is |− θ the state of qubit B is XHU z (θ)|φ . If we apply a Pauli X correction on qubit B when the measurement outcome is |− θ , then both outcomes will be the same. In this way corrections allow for a determinsitic implementation of the unitary operationHU z (θ)|φ . More general computation in MBQC can be depicted using graphs. Qubits prepared in the |+ state are represented by vertices V on a graph G, and the edges E represent which pairs of qubits have been acted on by a CZ gate. The state resulting from these operations is called a graph state, |G . The graph state of the cluster state, which is a universal resource for MBQC [3], is the two dimensional square lattice (see Fig. 1). Graph states can also be defined using the stabiliser formalism [21], where it is defined as the state which satisfies the stabiliser eigenequations where a stabiliser operator is associated to each vertex v, Here X v , Y v , Z v are the Pauli matrices acting on site v, and the notation v ∼ w means that v and w are connected by an edge. The K v generate the stabiliser group The same group can be found by choosing different generators, for example S = {K α K v } v (for some arbitrary fixed vertex α), and indeed the graph state is stabilised by the set of generators {K α K v } v as well. This flexibility of choice will be useful later on. As in the example above for a quantum input / quantum output computation, we can extend the definition to include input qubits, labelled I. In this case the stabilisers (4) are defined on non-inputs only. This is referred to as an open graph state. During a computation all vertices are measured except the output vertices, labelled O. In this work we are concerned with computations for quantum inputs and outputs, so we will be using open graph states from now on.
In order for a measurement pattern on a graph state to be able to be correctable such that the output is the same regardless of the measurement outcomes, it is sufficient (although not in general necessary) for the graph to have Generalised flow (gflow ) [10,11]. Gflow is defined for measurements in any of the three planes, (X, Y ), (X, Z) or (Y, Z), in a generalization of the example presented earlier. In this paper, we just focus on measurements in the (X, Y ) plane, as results for measurements in other planes will follow in a similar fashion, although, for completeness we present the definition of gflow for all planes. Gflow allocates a time ordering over the vertices on a graph state and a gflow function g for each vertex. g(v) tells us which vertices are affected by the measurement outcome of vertex v and which qubits can be used to correct for this. The notation v < w is used to represent that vertex v is measured after vertex w, and v = w to indicate that v and w can be measured at the same time. The conditions for gflow are based on how certain sets of vertices are connected to other vertices; we say that a set of vertices U is oddly (evenly) connected to a vertex v if there is an odd (even) number of edges connecting U and v. The definition of gflow is then: Given an open graph state G with inputs I, outputs O, edges E and vertices V , we say it has gflow if there exists a gflow function g and a time ordering < over V such that, for all v ∈ V which are not outputs: (G1) All qubits w in g(v) are in the future of v, i.e. v < w for all w ∈ g(v).
(G2) if w ≤ v, and v = w, then w is evenly connected to all qubits in g(v).
In [22] it is shown that if an open graph has gflow then it is possible to run an MBQC from input I to output O. Furthermore, the gflow defines a valid measurement pattern. Finding out if a graph has gflow can be done in polynomial time [23]. The time ordering in the measurement pattern required by gflow means that some qubits can be measured at the same time. Any qubits which can be measured simultaneously are said to be in the same layer of the computation. This leads to the definition of depth for MBQC; Definition 2 (Depth) The depth of an MBQC with gflow is the number of rounds of measurements in the measurement pattern (i.e. the number of layers).
In general this depth will be different depending on which gflow we are using (there can be more than one -indeed we will see in section 3.3 an example where many gflow s can be realised). Since we can think of gflow as a directed graph superimposed on an undirected graph, an equivalent and perhaps more intuitive definition is that the depth is the longest possible path along these directed edges (so-called gflow lines).
The depth is effectively the time needed for the quantum part of the computation. To decrease this quantum time one is interested in pushing as many measurements together as possible, so that there are as few layers as possible [7,9]. This is achieved by what is called the maximally delayed gflow [23]. However, this is done at the expense of increasing the classical time needed to process the measurement results, which increases for larger gflow. The techniques of gflow thus give rise to a tradeoff between the classical and quantum time for the computation [7,9]. As we will see in the example in section 3.3 this tradeoff can be great, so that for some cases all the time of the computation can be shifted to the classical processing except some constant quantum part. This tradeoff is characterised in [9] in terms of circuits with fanout. We end this subsection with some further definitions which will be important in the theorems later on, and are illustrated in Fig. 1.

Definition 3 (Layers)
A layer of a computation is defined as any (non-output) qubits in a measurement pattern which can be measured at the same time.
We denote the layers as L k , and we use L(v) to denote the layer that vertex v is in. For example, for the gflow defined on the graph in Fig. 1, the layers are given by L k = {a k , b k , c k , d k , e k }, for k < 6, and L(a k ) = L(b k ) = L k etc. We further denote v ≤ L k for vertices in L k or earlier layers, similarly for v ≥ L k .
The following definitions will also be useful: The size |g(ν)| of a gflow is the number of qubits for which the product of the stabilisers over g(ν), v∈g(ν) K ν , is non-trivial.

Definition 5 (gflow lines)
A gflow line is a directed edge from a vertex ν to an element of g(ν). The set of gflow lines generates a directed graph over the set of vertices of the original graph (see for example Fig. 1).
Definition 6 (g-influencing walk) Given a gflow on a graph state, we define a ginfluencing walk as any path that follows graph edges and gflow lines, such that any graph edge which is not a gflow line is preceded and followed by a gflow line.
The size of the forward cone for vertex ν, denoted |C(ν)|, is the number of vertices touched by all g-influencing walks, starting from qubit v.
This is similar to the definition of backward cone in [7], except in this they defined it as the set of all influencing walks that lead to a qubit.

Adiabatic cluster-state quantum computation
An adiabatic approach to MBQC was proposed in [14]; adiabatic cluster-state quantum computation. First note that generating a cluster state is equivalent to initialising in the ground state of the Hamiltonian: where γ parametrizes the strength of the interactions and K v are cluster-state stabilisers. Indeed this is also true if we replace the {K v } by any set of generators of the stabiliser group. This will be useful later when extending to general graph states with gflow.
The computation protocol in [14] proceeds by adiabatically replacing each stabiliser by rotated Pauli-X operators Table 1), in analogy to the measurements in MBQC. This can be done one by one, or at the same time. If done one by one, the time for each individual replacement is independent of the computation, so that the total time scales with N. If all the replacements are done at the same time it becomes difficult to get analytical bounds on the time, however numerical studies suggest that the energy gap scales inversely with N [24].
This model allows for implementation of single qubit rotations and CNOT gates, and so is universal for quantum computation [25]. For the purposes of this paper, we will often use twisted stabilisers K θ n , defined as We use these to form an initial Hamiltonian H 0 = −γ v∈V K θn v . Then instead of adiabatically replacing the stabilisers by X θn n operators, they are instead replaced by X n operators, and the resulting computation is the same. The advantage of using the twisted picture is that certain results become clearer compared to the untwisted version. Note that, although this choice of stabiliser does not really affect the analogous MBQC protocol, in adiabatic cluster-state quantum computation these stabilisers are different physical Hamiltonians which must get realised.
We now look at the single qubit rotation to illustrate the main ideas and introduce a few concepts. Details of doing a oontrolled-NOT gate are in the appendix, which completes the set of universal gates [14]. To perform single qubit rotations in the adiabatic cluster-state model, consider a twisted one-dimensional cluster state. The stabilisers for such a state are To fit with the notation used in [14], we will use slightly different stabilisers {T v }, where v+1 . The initial Hamiltonian is then: H 0 has a doubly degenerate ground state, which we can use to encode a qubit. For example, we can define logical states |0 L and |1 L as |+ θn n (9) and similarly |± L : . Preparing the ground state in a superposition α|0 L + β|1 L corresponds to attaching an input α|0 + β|1 to the cluster state in the MBQC picture. The protocol proceeds by adiabatically replacing the first stabiliser T 1 with X 1 (see Table 1), so that the timedependent Hamiltonian is where 0 ≤ s ≤ 1. After this process, the information is encoded in the new degenerate ground space of H(1), and the information originally encoded in {|0 L , |1 L } has been transformed.
Rather than following how the information transforms by following how the ground state evolves, an alternative method is to follow how the computation proceeds in terms of the logical operators X L , Y L , and Z L . The logical operators for Hamiltonian H 0 are Following the transformations of these operators is equivalent to following how the ground states transform, and can be simpler to deal with. In this picture, encoding an arbitrary input state is equivalent to applying the field H f ield = αX L + βY L + γZ L . To see how the information is transformed by the adiabatic substitution in (10), the logical operators are multiplied by stabilisers (since they act as identity) until they commute with X 1 (i.e. the logical operators are put in a form which is conserved during the adiabatic transformation). X L already commutes with X 1 , but Z L doesn't so we multiply by T 1 : Then, after setting X 1 → ½ since we are in the +1 eigenstate of X 1 , the logical operators become Now defining new logical operators in the same way as in eqn. (11): Expressing X L and Z L in terms of these new logical operators, we can see that the information has been moved one step along the chain and transformed by U Step No.  . At the next step we replace T 2 with X 2 , and so on from left to right down the chain (see Table. 1 for an illustration of this). Finally the information is encoded in the N th qubit, with the information transformed by the operation U and since U , this will depend on the sequence of angles {θ v } used (following [14] we set θ 1 = 0 for convenience).
Since we are doing adiabatic transformations, the speed of the computation is limited by the ratio of the energy gap and Ḣ (s) . For the Hamiltonian in (10), this is given by (see Appendix B) where 0 < δ ≤ 1 and the probability of ending up outside the ground state is O(ε). For the remainder of this paper we will compare adiabatic evolution time to this time τ 0 , so this is our definition of one unit of time for the adiabatic computation.

Relationship between AQC and AGQC
We generalise adiabatic cluster-state quantum computation to graph states in the next section. Here we briefly discuss the conceptual differences between adiabatic quantum computation (AQC) and adiabatic graph-state quantum computation (AGQC). In AQC, all that matters is that the system ends in the ground state of the problem Hamiltonian.
The route taken to get there is not important provided the computation proceeds as fast as possible. In contrast, in AGQC the computation depends on the particular path taken in parameter space. This is known as an open-loop holonomic quantum computation [26,27], in which information is encoded in the degenerate energy levels and adiabatic steps result in unitary transformations on this subspace. These unitaries are non-Abelian generalisation of the Berry phase. In AQC, a simple Hamiltonian is adiabatically transformed to a complicated problem Hamiltonian, for which the energy spectrum is not known. In contrast, in AGQC the protocol starts with a complicated Hamiltonian that is adiabatically transformed to a simple local Hamiltonian. As we will see in the next section, the time-varying energy gap for each step in AGQC can be completely known. This difference is especially important given that certain algorithms in AQC require a detailed knowledge of how the energy gap changes with time, so that a local evolution specific to the instantaneous energy gap can be used, rather than a global evolution that is only sensitive to the minimum energy gap [28,29]. These points are summarised in table 2. Both models have a built in noise reduction mechanism since there is always an energy gap between the allowed states and erroneous states. It is believed that decoherence and noise can be treated relatively easily by cooling the system down to avoid transitions into higher energy states. Despite this, achieving fault tolerance in AQC is an ongoing problem (see e.g. [30]). However for holonomic computation, there are known schemes to implement fault-tolerant computation [31] which can be extended to AGQC.

Adiabatic graph-state quantum computation
In the previous section we reviewed the results of [14,24] where they show that universal quantum computation is possible using adiabatic substitutions, instead of measurements, on the cluster state. Here we generalise this method to other graph states using tools from MBQC and show that any MBQC measurement pattern on a graph state can be converted into an adiabatic computation of the form in [14], such that the same computation is performed. We call this adiabatic graph-state quantum computation (AGQC).

Translation of MBQC patterns with gflow to adiabatic computation
In AGQC, given an open graph state with gflow (g, <), we start with initial Hamiltonian where the T v operators are products of the twisted stabiliser operators, ∀v / ∈ O. Hence the ground state corresponds to the open graph state. For simplicity we take the number of inputs to be equal to the number of outputs |I| = |O|, but all statements and proofs can be easily extended to the cases |O| > |I| (|O| < |I| is not allowed as this would mean information is lost). The final Hamiltonian will be H f = −γ v X i , and the transition will be done in steps, as in the cluster state case.
We will show explicitly how to compute the initial and final Hamiltonians for each step in the computation, and find the associated adiabatic time. We first show that each X v commutes with all stabilisers T w for w > v. From the conditions of gflow, a product of stabilisers w∈g(v) K w has an even number of connections to vertices in the past (which means an even number of Z operators, which cancel to give identity) and an odd number of connections to vertex v (which means there is one Z v term in the stabiliser). On the level of the Z operators, this does not change moving to the twisted versions. Therefore we have {T v , X v } = 0, and [T w , X v ] = 0 for all w > v. This initial Hamiltonian can be computed efficiently from the graph and gflow, since each stabiliser can be calculated in a time that scales as O(log(max v |g(v)|)) using the methods in [32].
To perform the computation, we can either replace the T v one by one in an order that doesn't violate the gflow, or we can replace those in the same layer all at once. Replacing them one by one will take N steps of time τ 0 . When replacing layer by layer, the adiabatic transition for the kth step is governed by the interpolation Hamiltonian where In Appendix B we show that, if we have a number |U| of stabilisers {T v } such that {T v , X v } = 0 and [T v , X w ] v =w = 0 for all v, w ∈ U, then these can be adiabatically replaced in a time which scales with Ω(|U| 1+δ ), with 0 < δ ≤ 1. Interestingly the dependence of the time on |U| does not come from the energy gap ∆, which remains constant and independent of |U|, rather it comes from the norm Ḣ , which scales as |U|. In this way we can replace all operators T v in the same layer simultaneously, but the adiabatic runtime for each layer scales as the size of each layer |L k |. This point highlights a subtlety of the adiabatic theorem as applied here -the time is dominated by the norm Ḣ , not the energy gap ∆ as is more commonly the case. Now consider what happens to the information when we replace all T v defined above with an X v operator, in the order given by gflow. This can be seen by multiplying logical operators with stabilisers in such a way that the logical operators commute with all the adiabatic 'measurements' [14] (as illustrated for the one dimensional chain graph in section 2.3). If there are any Z v or Y v operators which appear in a logical operator α, the gflow conditions guarantee that multiplying these terms by T v will either give the identity or an X v operator at vertex v, and the new logical operator will commute with any X w for w ≤ v. This means that it is possible to update the logical operators α L , toα L such that [α L , X v ] = 0 for all v which are not outputs, and where α = X, Y, Z. The output of the computation is encoded in these final logical operators, after setting To see that this performs the same computation as in MBQC, consider performing MBQC on a twisted graph state. If we start with the logical operators X L , Z L of the MBQC resource state, and update these logical operators α L , toα L such that [α L , X v ] = 0 for all v, then all measurements in the X basis commute with these operators. Therefore if we start in the +1 eigenstate of the logical operators, after the measurements the final state will be the +1 eigenstate ofα L (after corrections have been applied). Indeed, the procedure outlined above for updating the logical operators is essentially the same process given by gflow for tracing the logical operators in MBQC in the Heisenberg picture as in [33], thus the computation is clearly identical. This is summarised in the following theorem.
Theorem 1 Any measurement based computation on an open graph state |G of N qubits which is the ground state of a Hamiltonian H and which has gflow g and depth d can be efficiently converted into an adiabatic computation for which • The adiabatic computation can be done in d steps, where the energy gap for each step is the same, and Ḣ = |L j | for the j th step. Thus the time to perform the j th step is Ω(|L j | 1+δ ), where 0 < δ ≤ 1.
• The maximum degree of the initial Hamiltonian, k max , is equal to the maximum gflow size : k max = |g(ν)| max , • The initial Hamiltonian can be computed efficiently.
In this way the tradeoff in quantum time (d) versus classical time (log(|g(ν)| max )) that is facilitated by the use of gflow in MBQC [11], translates to a tradeoff between the number of steps and simultaneously the degree of the initial Hamiltonian and the norm Ḣ . However, even though the gap ∆ is unaffected by tradeoff, the fact that the norm Ḣ is affected and scales with N, means that there is no overall gain in time for the adiabatic computation. An example where this tradeoff can be seen is given in section 3.3. We thus see that whereas in MBQC one is interested in finding gflow with the maximal size (so called maximally delayed gflow ), there is no such advantage for the AGQC case. Indeed, given the expense (or impossibility) of having high degree Hamiltonians in AGQC one is rather interested in the reverse, that is finding a gflow with the minimal size (so called minimally delayed gflow ). In section 3.4 we see that if we try to simulate such high-degree Hamiltonians with local ones, we lose even further so that we have even more reason to be interested only in minimally delayed gflow in AGQC.

Performing the computation all at once
In the previous subsection, we saw that any measurement pattern on N qubits with gflow and depth d can be converted into an adiabatic computation, such that the computation takes N steps of time τ 0 or can be done in layers where the adiabatic time to replace the j th layer scales with Ω(|L j | 1+δ ). We also saw that the trade-off between number of measurements and classical processing time in MBQC translates into a trade-off between the number of adiabatic steps, the degree of operators in the Hamiltonian, and the size of Ḣ .
We now take this trade-off further, in particular we explore whether it is possible to perform all adiabatic substitutions in constant time at the expense of another property in the Hamiltonian. Performing all operations in one step was also investigated in [24], in which all of the cluster state stabilisers on a 1D or 2D grid were replaced simultaneously with local Pauli operators, and the energy gap was found numerically to have an inverse polynomial dependence on N. Here we take a slightly different approach, in that we change the initial Hamiltonian such that all the adiabatic substitutions can be performed in a single step with energy gap independent of N. We will see that this is possible, at the expense of increasing Ḣ and the degree of operators in the initial Hamiltonian. However, the process of finding the initial Hamiltonian is closely linked to the classical simulation of the computation itself, and thus can also only be efficiently calculated for simple cases such as Clifford computations. These properties are expressed in the following theorem.
Theorem 2 Any measurement based pattern of depth d on a graph state |G of N qubits which is the ground state of a Hamiltonian H and which has gflow can be converted into an adiabatic computation for which • The computation can be done in one adiabatic step, with constant energy gap but with Ḣ ∝ N. The adiabatic time therefore scales with Ω(N 1+δ ), where 0 < δ ≤ 1.
• The maximum degree of the initial Hamiltonian k max is bounded by the size of the maximum forward cone over all measured vertices: k max ≤ max ν |C(ν)|.
• The computation of the initial Hamiltonian can be inefficient, in the worst case as difficult as classically simulating the computation itself. For Clifford operations it is polynomial, whilst in general it is exponential.
Proof: Again we use the result in Appendix B, that if a subset of vertices U in V satisfy the commutation relations then all of the stabilisers T v with v ∈ U can be replaced at the same time, provided the adiabatic runtime scales as Ω(|U| 1+δ ). Starting from a set of stabilisers {T v } defined by a gflow pattern, we can multiply these stabilisers together in such a way that the new stabilisers {T v } commute with all X w operators on non-outputs w. Then we can perform this subset of adiabatic substitutions in one step, with the step time scaling as Ω(N 1+δ ). Gflow always allows such a procedure, since whenever a stabiliser T w contains a Z v or Y v operator, these can be multiplied by T v , giving identity or X v , respectively, such that the resulting stabiliser commutes with X v . Here we define a specific choice of such a procedure to make all stabilisers commute with all Pauli X operators: Definition 8 (Updating Procedure) To update stabiliser T v , we start in layer L n+1 , where L n = L(v).
(1) If T v contains a Z w or Y w term such that w ∈ L n+1 , multiply by T w .
(2) Proceed to the next layer, as determined by the time order. Iterate until the outputs are reached.
However, creating a Hamiltonian in this way is polynomially equivalent to simulating the computation by following the evolution of the logical operators (see e.g. [33]), which we have already used in our discussion of making general measurement patterns adiabatic. Or to put it another way, this procedure is only efficient for certain classes of operations. For Clifford operations the procedure takes polynomial time; if we have N qubits in total, we will have to perform one updating sweep per qubit, each sweep involves a search over at most N stabilisers to see whether they commute or anti-commute, and the cost of testing if a stabiliser commutes or not will be O(N) since each stabiliser contains at most N terms, so the overall procedure takes O(N 2 ) steps. For general angles the procedure takes an exponential amount of time, since at every step we replace a Z v operator with a Z v T v = e −iθ v+1 Z v+1 X v+1 Z v+2 term, so every update converts a Z term into 3 new terms when expanding the exponent. If we start off with a stabiliser containing n Z operators, then the update procedure will triple this number so there are 3n Z operators, and after r sweeps we will have O(3 r n) operators to search through.
To complete this theorem, we now look at exactly how quickly the degree grows with the size of the graph state, and we will find that the degree is related to a quantity defined in 2.2; the size of the forward cone. During the procedure, we multiply every Z w operator by T v = w∈g(v) K w . So following this procedure, we are left with only Pauli X's in positions g(v) for every Z v that we have corrected for. The only parts that will contribute to the degree ofT v are situated at vertices which can be arrived at by following a path on which a non-gflow line is preceded and followed by a gflow line, which is by definition contained within the forward cone.
So we have seen that the trade-off seen in Sec. 3.2 can be extended to allow the computation to proceed in one adiabatic step with energy gap independent of N, but as the number of adiabatic steps decreases, the complexity is shifted into the description of the Hamiltonian, which simulates the computation by allowing us to keep track of how the logical operators are evolving. In addition, Ḣ increases, so there is no overall gain in time, and the degree of the initial Hamiltonian increases.

Example
We now look at an example presented in [11] where the same graph gives rise to a tradeoff between classical and quantum times in MBQC. We will see how this translates to a tradeoff in AGQC. Consider the graph in Fig. 2, with all measurement angles set to zero for simplicity. Many different gflows can be defined on this graph, for example a family of gflows can be defined as where 1 ≤ r ≤ N. For a gflow g r , r measurements can be performed simultaneously, interspersed by classical processing. Corrections on qubits will be of the form X s 1 +s 2 +...sm where the s m are binary variables accounting for the measurement outcomes. Thus the classical processing involves a binary sum of the results of these r measurement outcomes, and so takes time O(log r) [34]. There is also classical processing required on the outputs, which involves the same number of terms to be added and so can also be done in time O(log r) (each output requires addition of r binary variables or less, and these additions can be done in parrallel). Since we can perform r measurements simultaneously, the measurement depth d r is given by The two extreme cases are where r = 1 or r = N. The former is just where we can perform each measurement one-by-one (d 1 = N), with no addition of binary variables in between. The latter is where we can perform all measurements simultaneously (d N = 1), but we must perform corrections on the outputs which take time O(log N). g N is called the maximally delayed flow associated with this graph [23]. Following the conversion of these gflows into an adiabatic computation, we can perform the computation in d adiabatic steps, where the time to perform the j th layer scales as Ω(|L j | 1+δ ), and the maximum degree is given by the influencing volume. Thus g r is converted into an adiabatic computation which has d r steps, and each step takes Ω(r 1+δ ) time, and the Hamiltonian degree k = r + 2. In the most extreme case, g N −1 is converted into an adiabatic computation which takes 1 step, but this step takes Ω(N 1+δ ) time to complete, and the Hamiltonian degree is proportional to N (note that, in this example, starting from g r and updating the stabilisers using the procedure in 3.2 just gives g N ). In all cases the total time for computation is Ω(N 1+δ ), thus there is no advantage in using large delayed gflow, and given the expense of high degree, we should rather use minimal gflow.

Simulating k-local Hamiltonians
In the previous subsections, we have seen how an update procedure can be applied to create a tradeoff between the number of adiabatic steps, and the norm ofḢ. This update procedure also came with a by-product of increased degree of operator. Here we look at known results of high-degree operators, and argue that the apparent penalty for simulating large degree operators implies that the optimum way to perform a computation in AGQC is in fact the minimally delayed flow, in contrast to in MBQC where the maximally delayed flow is optimal.
It is generally accepted that the only fundamental interactions in nature are 2-body interactions. It has been shown in [35,36,37] that there are no 2-body Hamiltonians for which the ground state is exactly the same as that of a k-body Hamiltonian, where k > 2. If we try to simulate this k-body interaction with a 2-body interaction, then it was shown in [35,36] that the energy gap will scale as E gap < O((1 − F 2 )), where F = | ψ|E 0 | is the fidelity between the actual ground state |ψ and the k-body ground state |E 0 (i.e. the accuracy of the approximation).
There are also known methods for constructing large degree operators from 2-local operators [38,39,40,15]. In particular we use the results from [15], that we can create k-local Hamiltonians H k using a perturbative Hamiltonian acting on rk ancilla qubits and n computational qubits (r is the number of terms in Hamiltonian of the order k, which we consider as being fixed). The result is that the effective Hamiltonian, apart from some overall energy shift, is: where P + is a projector on the space of r ancilla qubits, projecting each one into the |+ state, and the perturbation converges provided that λ < k−1 4k . This energy gap decreases exponentially with k, suggesting that having large degree operators with k ∝ N would cause the minimum energy gap to decrease exponentially rather than polynomially. This means that performing the computation using the minimally delayed gflow seems to be optimal for AGQC.

Reordering the computation
In general, performing measurements in the wrong order in MBQC can result in random outcomes to the computation. In some cases however the order of measurement does not matter, such as when all qubits are measured in the Pauli basis. A natural question to ask is whether or not this property also applies to AGQC. In this section we will go back to the original formulation of adiabatic cluster-state quantum computation, and look at what order we can perform the adiabatic substitutions in. Firstly we will consider the most obvious case, where we keep the stabilisers exactly as in [14] and replace one stabiliser by one Pauli operator, and then we consider a less constrained method, and discuss how these two approaches lead to different behaviour.

Re-ordering the adiabatic computation with fixed number of terms in Hamiltonian
We start with an N-qubit 1D chain with N −1 stabilisers (i.e. one qubit is encoded in the chain), and we consider replacing one stabiliser by one Pauli operator in a different order to the corresponding measurement pattern in MBQC. As a physical motivation we may imagine that we have some experimental apparatus which is limited to only applying the T operators and X operators, and which can turn them on in any combination. We would like to find orders of replacements which keep us in the 2-dimensional logical subspace, and we might expect from MBQC that changing the order will in some way disrupt the computation.
As an example, consider a 4-qubit chain with all angles set to zero (i.e. with un-twisted stabilisers). We begin with the Hamiltonian and we now replace T 3 with X 3 out-of-order leading to the time-dependent Hamiltonian At s = 1, this Hamiltonian has a ground state degeneracy of 4, i.e. the degeneracy doubles (T 1 + X 3 effectively forms a new stabiliser, so there are effectively only 2 stabilisers in the Hamiltonian). However, there is a constraint in that the operator T 1 T 3 commutes with H(s) for all s and so the eigenstate of T 1 T 3 is conserved throughout the evolution. Therefore, since we start in the +1 eigenspace of T 1 T 3 , we will also end in the +1 eigenspace of T 1 T 3 . So although the gap closes, the transitions between these degenerate eigenstates are forbidden and so the logical subspace is preserved. Now consider replacing T 1 in (27) with X 1 . Throughout this evolution, T 1 T 3 no longer commutes with H(s), and so unless there is a stabiliser that can be multiplied with T 1 T 3 to make it commute with H(s), the evolution is no longer constrained to the +1 eigenspace of T 1 T 3 . It is easy to check that there are no remaining stabilisers which satisfy this property, since this requires an operator with a Z 1 term. Since at the very start of the T 1 → X 1 evolution, the energy gap is zero and the subspace is no longer preserved, this means the information now leaks out of the subspace unless the evolution time τ → ∞. Thus the computation fails at the final step for this ordering. Note that this happens whether or not T 2 is replaced by X 2 ; the key part was the fact that there were no stabilisers left to multiply T 1 T 3 with to make it commute with H(s).
Extending this to larger chains, whenever we replace T n with X n , the evolution is still constrained to the +1 eigenspace of T n−2 T n . If this 'hidden' stabiliser anticommutes with the next Pauli replacement X m , then provided we can multiply by T m−2 the subspace is still preserved. But since at some point we need to replace T 1 → X 1 or T 2 → X 2 , and there are no other stabilisers to multiply with to make sure that the 'hidden' stabiliser still commutes with H(s), the computation fails as there will be zero energy gap and a non-zero matrix element to leak out of the 2-dimensional logical subspace.
Similar behaviour can be seen when performing Y measurements, again using untwisted stabilisers: consider a Hamiltonian on 3 sites, H = T 1 + T 2 . After replacing T 2 → Y 2 , we are still in a 2-dimensional subspace since [T 1 T 2 , H(s)] = 0 and so the subspace where T 1 T 2 has eigenvalue +1 is preserved. However, after replacing T 1 → Y 1 , there are no stabilisers which can be chosen, and so the computation fails at the last step. This argument can similarly be extended to larger chains, and just like in the above case we will find that once we reach the boundary the computation time has to go to infinity to avoid leakage. Similar behaviour is also seen for the CNOT gate proposed in [14] and discussed in Sec. Appendix A. Consider two rows of qubits, labelled a and b, with 3 columns numbered from left to right. The initial Hamiltonian is: Although we can replace T a2 → X a2 out of order without leaking out of the 4-dimensional subspace (since the operator T b1 T a2 is conserved), then when we try to replace T a1 → X a1 afterwards, the computation fails. Thus we have seen that, with this approach, the only replacements in 1 dimension which can preserve the subspace are replacements with X n with n ≤ 2, and replacements by Y n with n ≤ 1, and no out-of-order measurements are possible for the CNOT gate.
What about more general angles? Since both X n and Y n measurements fail when n > 2, and any general measurement is a superposition of X and Y measurements, we might expect that any general measurement fails for n > 2. So we try replacements starting on the second site for general angles, i.e. replacements of the form The energy gap ∆ 1 is given by where Γ(θ, s) ≡ 2s 2 cos 2θ 2 + (4 − 8s + 6s 2 ). For a given θ 2 , this reaches a minimum at s = (1 − 1 2 cos θ 2 ). For all θ 2 then, the minimum energy gap ∆ min 1 is given by: Over all possible θ 2 values, ∆ min 1 (θ 2 ) is largest for θ 2 = lπ, s = 1/2, and goes to zero when θ 2 = (2l + 1)π/2, s = 1, where l is an integer.
So we see that, for angles θ 2 such that the minimum energy gap remains non-zero, it is possible to perform the computation out-of-order. While the information remains in a protected subspace, it is also necessary to check if the information is transformed in the expected way. To see this, we start with the logical operators (excluding Y L since Y L = iZ L X L ). Using the method in [14], these operators are multiplied by stabilisers to make them commute with the 'measurements'. The appropriate transformation for the above case would be Note that this is exactly the same transformation we would make in the normal computation; we have just done two steps at once. Both these logical operators are in a form which commute with X 1 and X 2 , so they commute with the time-dependent Hamiltonian, and so, for example, if we start in the +1 eigenstate of X L , we end up in the +1 eigenstate of X θ 3 3 Z 4 . In summary, we have seen that if we simply replace T n operators with X n operators one-by-one on a 1D chain, we are extremely restricted in what we can do, and reordering is only possible using measurement angles which are not odd multiples of π 2 . In particular, in a 1D chain, we can only start by replacing the stabiliser at the first site or the second site. The information stored in the chain is transformed in the same way in both cases, however the latter only works for θ 2 = (2n + 1) π 2 , and the energy gap depends on θ 2 so the speed of the adiabatic substitution must vary.

Re-ordering without a fixed number of terms in Hamiltonian
So far we have seen that our initial approach to re-ordering the 'measurements' works only for a limited case. This is perhaps expected, as the way we have performed the outof-order measurements so far is not a proper reflection of what happens in MBQC. For instance, in MBQC measuring a qubit destroys any entanglement on edges connected to that qubit. This is clearly not true above, since we end up with Hamiltonians containing terms like T 1 + T 2 + X 3 . So a more natural way to perform the out-oforder measurements would be to remove all entanglement to measured qubits, or just remove all anticommuting terms entirely [8]. Take the chain considered above: Now if we replace T 3 → X 3 , we also remove any other operators which anticommute with X 3 , i.e. the final Hamiltonian is Notice that the operator T 1 T 3 is still conserved, as in the previous subsection. Instead of replacing T 1 with X 1 , we can just add X 1 to the Hamiltonian, and we are still constrained to be within a 2-dimensional subspace. This would also work if we had instead just removed all entanglement to site 3 (except T 2 can be left untouched since it commutes with X 3 ), i.e.
The energy gap will still be the same when we introduce X 1 in equation (35) to when we replace Z 1 X 2 → X 1 in equation (36), since the Hamiltonian is of the form (1 − s)Z 1 ⊗ A + sX 1 and so has energy gap 2η = 2 √ 1 − 2s + 2s 2 (Appendix B). Similar results hold for Y measurements or the CNOT gate, so that Clifford operations can be performed in any order. Note that if we begin to replace more than one operator at the same time, the energy gap decreases, and so using this method, Clifford operations cannot be done all at once. For instance, it was shown in [24] that the Hamiltonian corresponding to simultaneous X-measurements has a spectrum equivalent to the transverse Ising model, which has known eigenvalues, and for which the energy gap is O 1 N . Numerical results were also presented in [24] for a 1D and 2D cluster, showing a linear decrease in energy gap with number of qubits .
In summary, we have seen that Clifford operations can be done in any order, provided we either change the stabilisers so that the entanglement to 'measured' sites is destroyed, or remove any stabilisers which anticommute with the measurement operator entirely. This is in contrast to the method in the previous subsection, in which the stabilisers did not reflect what happens in MBQC, and in which the re-ordering is limited to performing alternating measurements from left to right. In both of the approaches we have considered, we cannot perform Clifford operations all in one step, since the energy gap decreases inversely with the number of measurements we make.

Conclusions
We have shown that any measurement pattern with gflow can be converted into an adiabatic evolution, such that the number of adiabatic steps is equal to the depth in MBQC, and each step takes time proportional to the size of each layer. This opens up the possibility of future results about efficiency and trade-offs in MBQC being used in AGQC. For example, there is still little understood about how to view the efficient simulatability of Clifford gates from the perspective of gflow. The framework developed here offers a natural route to translate future possible results in this area, which may have implications for the efficiency of AGQC as well as the simulation of many-body Hamiltonians.
We have also found that in analogy to the trade-off between quantum and classical time in MBQC, there is a trade-off between the number of adiabatic steps taken and the size of Ḣ , together with the degree of the initial Hamiltonian. One interesting point is that the trade-off is only between the number of steps and Ḣ , but does not involve the energy gap, which highlights the subtleties of using the adiabatic theorem. It is also interesting that the increase in degree does not appear to provide any computational advantage in this model. Since known methods of simulating high-degree operators result in an exponentially small energy gap in AGQC it is optimal to use the minimally delayed flow, in contrast to MBQC where the maximally delayed flow is preferable.
We considered the influence of adiabatic measurements in a different order from the corresponding MBQC pattern. When stabilisers are replaced in a different order, the computation fails with the exception of a few, special cases. When however the continuous measurement is performed in such a way that the terms that anticommute with the measurement are all adiabatically removed, then all Clifford operations can be performed in any order.
Finally we note that these results do not cover all possible methods of performing a measurement-based quantum computation, as there are some graph states without gflow which still yield deterministic computations [11]. For both Theorems we require correcting sets to be known which allow us choose stabilisers {T v } such that {T v , X v } = 0, and [T v , X w ] = 0 for all v = w. For extensions of gflow where such correcting sets are known our arguments can be carried forward simply, for example for Pauli Flow [11]. However, more generally, the lack of characterisation of possible correcting sets means it is not easy to guarantee these conditions are met so our procedure may not work. There are also more resourse states for MBQC such as those investigated in [41], which could have interesting properties.
To prove this, we need to find the spectrum of the time dependent Hamiltonian, and also the spectrum of the derivative of the time-dependent Hamiltonian, and then insert this into the following expression for the adiabatic time given in section 2.1 τ ≥ max This means the eigenvalues of each term in the sum are λ = ±η. Now to find the spectrum of H(s); if [T u , X v ] v =u = 0 for all u ∈ U, then each of the terms in the sum commute, and we expect the eigenvalues of γ u∈U [(1 − s)T u + sX u ] to be all possible combinations of the indivudual terms in the sum. However, for the sake of completeness, we will show that this is the case. To do this we use the explanation given in [42] for why stabilisers each halve the number of encoded qubits in a stabiliser code. Say we have a number of operators M = {M n } which all have eigenvalues ±λ n and eigenvectors |±λ n . Consider that we also have a set of unitary operators Q = {Q n } such that {Q n , M n } = 0, [Q n , M m ] n =m = 0 for all n, m. Then Q n | + λ n is an eigenstate of M n with eigenvalue −λ n . Since Q n is a unitary operator, it is a one-to-one mapping, so that there must be an equal number of eigenstates of M n with eigenvalue +λ n or −λ n (i.e. they have the same degeneracy). Now extending this, consider a state |ψ which is an eigenstate of all the M n operators. Then So Q m |ψ is an eigenstate of ( n M n=1 M n ), with eigenvalue n M n=1 λ n (−1) δnm , and with the same degeneracy as |ψ . This means that, if we can find an operator Q n for every operator M n such that {Q n , M n } = 0, [Q n , M m ] n =m = 0 for all m, and if each M n has eigenvalues ±λ n , the spectrum is ±λ 1 ± λ 2 ± ... ± λ N . An explicit procedure to construct these Q n for operators M u = [(1 − s)T u + sX u ] which satisfy [T u , X v ] = 0 is Definition 10 (Creating Q n ) Consider a set of operators M u = γ[(1 − s)T u + sX u ] with u ∈ U, where T u is a tensor product of Pauli operators with a Z operator at site u, and [T u , X v ] = 0 for all u, v ∈ U. We can construct a set of matrices {Q u } which satisfy {Q u , M u } = 0, [Q u , M v ] u =v = 0, using the following algorithm: Start with the smallest u ∈ U;