Quantum search with hybrid adiabatic-quantum walk algorithms and realistic noise

Computing using a continuous-time evolution, based on the natural interaction Hamiltonian of the quantum computer hardware, is a promising route to building useful quantum computers in the near-term. Adiabatic quantum computing, quantum annealing, computation by continuous-time quantum walk, and special purpose quantum simulators all use this strategy. In this work, we carry out a detailed examination of adiabatic and quantum walk implementation of the quantum search algorithm, using the more physically realistic hypercube connectivity, rather than the complete graph, for our base Hamiltonian. We calculate the optimal adiabatic schedule for the hypercube, and then interpolate between adiabatic and quantum walk searching, obtaining a family of hybrid algorithms. We show that all of these hybrid algorithms provide the quadratic quantum speed up when run with optimal parameter settings, which we determine and discuss in detail. We incorporate the effects of multiple runs of the same algorithm, noise applied to the qubits, and two types of problem misspecification, determining the optimal hybrid algorithm for each case. Our results reveal a rich structure of how these different computational mechanisms operate and should be balanced in different scenarios. For large systems with low noise and good control, quantum walk is the best choice, while hybrid strategies can mitigate the effects of many shortcomings in hardware and problem misspecification.

Quantum computing based not on discrete quantum gates, but on continuous-time evolution under quantum Hamiltonians, is a promising route towards near-future useful quantum computers. This is in part because of the success of experimental quantum annealing efforts [1][2][3][4][5], and also because of special purpose quantum simulators that employ this technique, and are potentially useful for a wider range of computations [6]. Problems known to be suitable for continuous-time algorithms are wide-ranging across many important areas, including finance [7], aerospace [8], machine learning [9][10][11], pure computer science [12], decoding of communications [13] and computational biology [14].
Continuous-time computation is less familiar than the ubiquitous digital computation that underpins everything from mobile phones to internet servers. There is no classical equivalent of computing via continuous-time manipulation of digital data to guide our intuition, or provide a source of classical algorithmic resources that might be adapted to a quantum setting. A detailed study based on a well-characterised problem can thus serve to elucidate the mechanisms in continuous-time quantum computing and build a firm foundation for further development. Hence, we focus this work on the unordered search problem first studied in a quantum setting by Grover in 1997 [15]. Grover's algorithm provides a quadratic speed up over classical searching, proved by Bennett at al. [16] to be the best possible improvement.
Two further examples of quantum search algorithms are quantum walk (QW) searching [17] and the adiabatic quantum computing (AQC) search algorithm [18], which both obtain the optimal quadratic speed up. There remains the questions of which is more efficient in terms of the prefactors [19], or more robust in the face of imperfections. While the results in [16] imply that any protocol we develop here will not provide better scaling properties, asymptotic scaling factors don't give a full account of algorithm performance. A recent study in which a quantum annealer appears to show the same asymptotic scaling as a classical algorithm, but with a prefactor advantage [3] of ∼ 10 8 , underscores the importance of practical computational advantages beyond asymptotic scaling. This prompts more detailed study of exactly how the quantum search algorithms work, the topic of many papers since the original algorithms were first presented [20][21][22][23].
Quantum walk searching has been shown to implement a similar type of rotation in Hilbert space to that which Grover's algorithm employs [17]. On the other hand, adiabatic quantum searching alters the Hamiltonian over time, turning on the term for the marked state slowly enough to keep the quantum system in its ground state throughout. On the face of it, these are quite different dynamics, as has been highlighted in [24]. However, both use the same Hamiltonians and initial states, and we argue here that both are best viewed as extreme cases of possible quantum annealing schedules. This invites consideration of intermediate quantum annealing schedules, and we show how to interpolate smoothly between them, enabling both mechanisms to contribute to solving the search problem. We examine the hybrid algorithms thus created using simplified models for the asymptotic scaling, and numerical simulation to explore smaller systems where more complex finite size effects contribute. Taking into account realistic factors, such as a finite initialisation time for each run of the algorithm, our results reveal a rich structure of intermediate strategies available to optimise the performance of a practical quantum computer.
Our paper is structured as follows: In Sec. II, we give the background and lay the groundwork for our study in terms of the QW and AQC protocols which we interpolate between. We introduce the two AQC schedules which we use in this study, and we explain in detail how they arise from the dynamics of the quantum search Hamiltonian on a hypercube. In Sec. IV, we construct interpolated protocols which can take advantage of both QW and AQC mechanisms. We then turn to the performance of the interpolated protocols in finite-sized systems. In Sec. IV C, we examine the scaling for larger systems in detail, and demonstrate that the interpolated protocols will also yield a quadratic speed up over classical searching. In Sec. V we incorporate strategies which involve performing multiple runs, including in Sec. V C the effect of adding decoherence, and in Sec. VI we examine the effect of problem misspecification. Finally, in Sec. VII we summarise our results and their implications for future work. The calculation of the optimal schedule for the hypercube is outlined in appendix A, and notes on our numerical methods are in appendix B.

A. Encoding search into quantum states
The search problem can be framed in terms of the N = 2 n basis states of an n-qubit system {|j } = {|0 , |1 } ⊗n , where {|0 , |1 } is the basis of a single qubit. We are given that one of the basis states behaves differently to the others and denote this 'marked' state as |m , where m is an n-digit bitstring identifying one of the basis states. Because of the difference in behaviour, we can easily verify whether a given state is the marked state. One way to implement this is for the marked state to have a lower energy than all other states, e.g., using a Hamiltonian likeĤ p = 1 1 − |m m|. The search problem is then to determine which of the basis labels j corresponds to the marked state label m, given that a priori we have no knowledge of m. We represent this ignorance of the marked state by starting with the system in a uniform superposition over the basis states, The quantum search algorithms considered in this paper solve the search problem by evolving the system into a state with a large overlap with the marked state, so that a measurement can be made to return the marked state label m with high probability. This is achieved by applying a (generally time-dependent) Hamiltonian to evolve the system initially in state |ψ init to a final state |ψ final . Performing a measurement of this state in the basis {|j } will yield the marked state label with probability | ψ final |m | 2 . If | ψ final |m | 2 = 1 then the search is perfect and the problem is solved. If the search is imperfect then the problem can be solved by searching multiple times: since the result of each search is checked independently, a single successful search is sufficient. As long as | ψ final |m | 2 is greater than 1/poly(n) this form of amplitude amplification will be efficient. Multiple runs have a cost: see Sec. V for details of the trade off between multiple runs and the initialization time for each run.
In general, problems with full permutation symmetry, such as the search problem, are considered to be toy problems from a practical point of view. A naive implementation of such a problem-in this caseĤ p = 1 1 − |m m| the marked state Hamiltonian-requires exponentially many terms of the form j∈mσ (j) z , where m is a binary number with n bits, and j iterates over the bits in m that are equal to one. However, it has recently been shown [12] that the spectrum of such terms in permutationsymmetric problems can be reproduced using n extra qubits and a number of extra coupling terms of the form σ (j) zσ (k) z which scales as n 2 . It has also been suggested that adding a single additional qubit may allow such models to be fully realized perturbatively [25,26]. Although this approach to construct such terms is much closer to the realm of what can be experimentally realized, it would still be highly non-trivial to implement. Nonetheless, the insights gained from studying the search problem can be adapted to realistic problems of practical interest.

B. Quantum walk search algorithm
A continuous-time quantum walk can be defined by considering the labels j of the n-qubit basis states {|j } to be the labels of vertices of an undirected graph G. The edges of G can be defined through its adjacency matrix A, whose elements satisfy A jk = 1 if an edge in G connects vertices j and k and A jk = 0 otherwise. Since G is undirected, A is symmetric, hence it can be used to define a Hamiltonian. Although we can use the adjacency matrix A directly, it is in general more convenient mathematically to define the Hamiltonian of the quantum walk using the Laplacian L = A − D, where D is a diagonal matrix with entries D jj = d j the degree of vertex j in the graph. We follow this convention here, but note that in this work we use regular graphs for which the degree d j = d is the same for all vertices, so that D = d1 1, where 1 1 is the identity matrix (ones on the diagonal) of the same dimension as A. Terms proportional to the identity in the Hamiltonian shift the zero point of the energy scale and contribute an unobservable global phase, but otherwise don't affect the dynamics. The quantum walk Hamiltonian is then defined asĤ QW = −γL, whereL is the Laplacian operator, and the prefactor γ is the hopping rate of the quantum walk. For any regular graph of degree d we thus havê where the adjacency operatorÂ has matrix elements in the vertex basis {|j } given by the adjacency matrix A. The action ofĤ QW is to move amplitude between connected vertices, as specified by the non-zero entries in A. During a quantum walk, a pure state |ψ(0) evolves according to the Schrödinger equation to give after a time t, where we have used units in which = 1.
Quantum walk dynamics can be used to solve the search problem by modifying the energy of the marked state |m to give a quantum walk search Hamiltonian In the units we are using, this amounts to giving state |m an energy of −1 while all other states have zero energy. This also makes γ a dimensionless parameter controlling the ratio of the strengths of the two parts of the quantum walk search Hamiltonian. ApplyingĤ QWS to the search initial state |ψ init in Eq. (1) produces a periodic evolution such that the overlap with the marked state oscillates. The frequency of these oscillations depends on the hopping rate γ, which must be chosen correctly, along with the measurement time t f , to maximize the final success probability The performance of quantum walk search algorithms will clearly have some dependence on the choice of the graph G. Provided the connectivity isn't too sparse or low-dimensional [27], most choices of graph will work, even random graphs [28]. Two convenient choices on which the quantum walk is analytically solvable are the complete graph, for which all vertices are directly connected, and a graph whose edges form an n-dimensional hypercube. Moore and Russell [29] first studied quantum walks on hypercubes, and Hein et al. [30] perform a detailed analysis of discrete time quantum walk searching on the hypercube, extending the work of Shenvi et al. [17]. We choose to focus our work on a hypercube, rather than a fully-connected graph, because it is the more practical graph in terms of implementation on a quantum computer. A hypercube graph is the natural choice for a quantum walk encoded into qubits because moving from one vertex to a neighbouring vertex corresponds to flipping a qubit. The techniques and scaling arguments we give in this work also apply in the case of a fully connected graph, and can be easily extended to a more general setting, for example to the 'typical' random graphs considered in [28].
The adjacency matrix of an n-dimensional hypercube graph has elements A jk = 1 if and only if the vertex labels j and k have a Hamming distance of one. That is, when written as n-digit bitstrings, they differ in exactly one bit position. The corresponding adjacency operator can be conveniently expressed aŝ where the sum is over all n qubits andσ (j) x is the Pauli-X operator applied to the jth qubit with the identity operator on the other qubits. That is, where ⊗ denotes the tensor product, and1 1 2 is the identity operator of dimension two. The Hamiltonian for the quantum walk on the hypercube is thus given bŷ since an n-dimensional hypercube has vertices which have degree n.
To construct the quantum walk search Hamiltonian on the hypercube, we include two trivial adjustments for later mathematical convenience. If we make the energy of the marked state lower by adding 1 1 − |m m| to the quantum walk Hamiltonian, this gives the marked state an energy of zero while all other states have an energy of one for this part of the Hamiltonian. We also include a factor of a half in gamma, to match Refs. [27,31,32] and facilitate the mapping to the symmetric subspace (appendix A). Our quantum walk search on the hypercube is then Childs and Goldstone [27] analyze the quantum walk search algorithm for both the complete and hypercube graphs. For each graph, they find optimal values of γ for which the performance of the search matches the quadratic quantum speed up achieved by Grover's search algorithm. The mechanism for finding the marked state can be understood intuitively as follows. Note that the initial state |ψ init from Eq. (1)  is approximately |m . Over a narrow range of intermediate values of γ, the ground state switches between the two. By calculating the low level part of the energy spectrum ofĤ (h) QWS , Childs and Goldstone tune γ until both the initial state |ψ init and the marked state |m have significant overlap with both the ground state E 0 and the first excited state E 1 of the search Hamiltonian. Intuitively, we want the search Hamiltonian to drive transitions between |ψ init and |m as efficiently as possible. This occurs when the overlaps are evenly balanced, which in turn occurs when the gap g = E 1 − E 0 between the ground and first excited state is smallest: g min . With this optimally chosen value of γ, the time it takes for the transition to occur turns out to be proportional to 1/g min . For the hypercube graph, the optimal value of γ is This sum appears many times in the following calculations, so it is convenient to abbreviate it by R 1 . Note also that it is not always sufficiently accurate to use the approximation R 1 2/n given in [27]. The time to reach the first maximum overlap with the marked state is t (o) h (π/2) √ N , providing a quadratic speed up equivalent to Grover's original search algorithm.

C. Adiabatic quantum search algorithm
Adiabatic quantum computing (AQC), first introduced by Farhi et al. [31], works as follows. The problem of interest is encoded into an n-qubit HamiltonianĤ p in such a way that the solution can be derived from the ground state ofĤ p . The system is initialized in the ground state of a different HamiltonianĤ 0 , for which this initialization is easy. The computation then proceeds by implementing a time-dependent Hamiltonian that is transformed slowly fromĤ 0 toĤ p . In general this adiabatic 'sweep' Hamiltonian can be parameterized in terms of a timedependent schedule function s ∈ [0, 1] aŝ with s ≡ s(t) such that s(t = 0) = 0 and at the final time t f we have s(t = t f ) = 1. It is useful to define a reduced time τ = t/t f , with 0 ≤ τ ≤ 1. Whereas τ is linear in t, the schedule function s(τ ) -written as a function of t or τ -allows for nonlinear transformation. Nonlinear schedules are essential to obtain a quantum speed up. The adiabatic theorem of quantum mechanics [33] says that the system will stay in the instantaneous ground state of the time-dependent HamiltonianĤ AQC (s) provided the following two conditions are satisfied: (i) there is at all times an energy gap g(s) > 0 between the instantaneous ground and first excited states, and (ii) the Hamiltonian is changed sufficiently slowly. Provided these are both true the system will be in the desired ground state ofĤ p at the end of the computation, thus solving the problem encoded inĤ p . In practice, the duration of this adiabatic sweep would be prohibitively long, so a feasible sweep will incur some probability of error. We discuss this and other subtleties of the adiabatic theorem in Sec. III, after we introduce the adiabatic quantum search algorithm. For a comprehensive overview of AQC, see Albash and Lidar [34].
Roland and Cerf [18] describe how adiabatic quantum computing can be used to solve the search problem with a quadratic quantum speed up. Define the problem Hamiltonian asĤ whose non-degenerate ground state is equal to the marked state |m with eigenvalue zero. We then need to choose our easy HamiltonianĤ 0 such that it has |ψ init , as defined in Eq. (1), as its non-degenerate ground state. There are many possible choices, Roland and Cerf useĤ 0 =1 1 − |ψ init ψ init |. With the system initialized in |ψ init , the algorithm proceeds by implementing the time-dependent Hamiltonian in Eq. (10), with a suitable schedule function s(τ ), so that after a time t f the final state of the system is close to the marked state |m . Roland and Cerf demonstrate that a linear schedule function s (l) (τ ) = τ = t/t f does not produce a quantum speed up. It is necessary to use a more efficient nonlinear s(τ ), whose rate of change is in proportion to the size of the gap g(s) at that point in the schedule, in order to produce the quadratic speed up of Grover's search algorithm.
It is easy to show thatĤ 0 =1 1 − |ψ init ψ init | is proportional to the adjacency operator of the fully-connected graph with N = 2 n vertices. For the reasons already given in the context of the quantum walk search algorithm, a Hamiltonian corresponding to a less connected graph is preferable for practical applications. In order to make direct comparisons between adiabatic and quantum walk searching, we use the hypercube graph, since this also has |ψ init as its non-degenerate ground state, with Hamiltonian (in its Laplacian form) given bŷ where we have again included a factor of a half for mathematical convenience. As further motivation for this choice, we note that this corresponds to a transversefield driver Hamiltonian applied to qubits, the commonest choice for quantum annealing hardware and which can be experimentally realized on a large scale [35]. Combining Eqs. (11) and (12), we have the adiabatic quantum computing Hamiltonian for search on a hypercube,  It remains to specify the function s(τ ) for the optimal performance of this Hamiltonian for searching. There are several subtleties to deriving an optimal s(τ ) for the hypercube that we also address in the next section.

A. Adiabatic condition and method
As promised, we now return to the nuances of the adiabatic theorem and how, in the regime of limited running time, the schedule s(τ ) may be optimized to minimize the error. A more quantitative statement of the adiabatic theorem [18,31] proceeds as follows: Consider a time-dependent Hamiltonian of the form in Eq. (10), with initial and final HamiltoniansĤ 0 ,Ĥ p respectively, and parameterized by the schedule function s(τ ) that sweeps from s(0) = 0 to s(1) = 1 over a time t f , the runtime of the sweep. Denote by |E j (t) the jth energy eigenstate of the Hamiltonian at time t and its energy by E j (t), where j = 0, 1 denotes the ground and first excited states respectively. Provided that E 2 (t) > E 1 (t) for t ∈ [0, t f ] and transitions to higher energy eigenstates can be ignored, the final state obeys for small parameter 1, provided that at all times where the matrix element dĤ/dt 0,1 is given by and the gap g(t) is given by However, adiabatic protocols derived from Eq. (15) are not always optimal. This equation is a condition on the instantaneous rate at which probability amplitude will leave the ground state for the first excited state, assuming the first excited state is not populated. Thus it does not apply where transfer directly to a higher excited state dominates over, or is competitive with, transfer to the first excited state, as such transitions are not taken into account. We can therefore describe Eq. (15) as a twolevel approximation. In the context of the search algorithms studied here, such an approximation turns out to good for all but the smallest values of n, and becomes more accurate for larger search spaces. We make extensive use of this in what follows, especially Sec. IV E.
Equation (15) also does not take into account the return of probability amplitude which has already entered the excited state. Such effects can become the most relevant to the dynamics under two circumstances. If the first excited state is populated significantly, then nonadiabatic dynamics can occur such that this amplitude returns and interferes with the ground state amplitude. This is the regime which we primarily study in this work. Quantum walk dynamics are an extreme example of such behaviour as they can be viewed as time independent coherent evolution bracketed by instantaneous quenches, which are the ultimate non-adiabatic transitions. The second and more subtle case is deep in the adiabatic regime, where the Hamiltonian sweep rate is so slow that the rate of excitation formation is very low during the middle of the anneal. In these cases, boundary effects become important, which depend in a complicated way on both the nature of the annealing schedule and the total runtime [36][37][38]. While this regime is very interesting, it is outside of the scope of our current study, and not relevant for practical implementation of algorithms. For this reason, we limit our numerical studies to a maximum runtime of ∼ 5π/g min , about ten times the typical runtime derived from the minimum gap. With runtimes t f 5π/g min , we do not observe any appreciable boundary effects in our numerical results.
Roland and Cerf [18] derive a schedule s(τ ) for the fully connected graph by optimizing Eq. (15), by matching the instantaneous rate of change of the schedule function s(t) to the size of the gap at that time. Using in the adiabatic condition of Eq. (15) gives The instantaneous gap g(t) and dĤ/ds 0,1 can be calculated from the eigensystem of the Hamiltonian, which is analytically tractable for the complete graph. The schedule they obtain this way produces the full quadratic quantum speed up for the adiabatic quantum search algorithm on the fully connected graph.

B. Hypercube schedule calculation
Since we are using the hypercube graph, we must do the equivalent calculation for the hypercube AQC search Hamiltonian given by Eq. (13). The eigensystem of this Hamiltonian has been solved in Refs. [27,31,32] by mapping it to the symmetric subspace. The full calculation for the hypercube is somewhat lengthy and is outlined in appendix A. We find the calculated optimal schedule the constant R 1 is defined in Eq. (9) and R 2 by For N 1, the runtime is given by where the approximation of the arctans by π/2 becomes exact as N → ∞. Note that choosing a value for (the accuracy with which the system stays in the ground state, see Eq. (14)) determines the corresponding runtime t f , and vice versa. For our numerical calculations we have chosen to specify t f , since this enables direct comparisons with QW searching to be made. The energy levels of H (h) AQC are shown in Fig. 1 (top left) for n = 9, and for comparison the energy levels of the search Hamiltonian for the complete graph (which is the same for any size) are shown top right.
We also solve Eq. (15) numerically to obtain s (n) using an explicit numerical calculation of g as a function of t, while still using the maximum value of dĤ (h) AQC /dt 0,1 = n/4. Our numerical algorithm is described in Appendix B. While it does not provide a closed form solution, results using s (n) do provide insight on the accuracy of s (c) . Provided the numerics are performed to a sufficient accuracy, s (n) will always provide an optimal √ N speed up. The analytically and numerically calculated gaps are plotted in Fig. 1 (bottom left) for n = 9, and the corresponding gap for the complete graph is shown bottom right. For the hypercube, the analytical and numerical gaps are strikingly different, yet both produce schedules that obtain a quantum speed up. As we will see, this is because for the quantum search problem only the position and size of the gap are important. Elsewhere, the transition probabilities are so small it does not matter how fast the schedule proceeds.
However, note that all of these schedules assume a twolevel approximation, as they start from Eq. (15). While in general for large N this is a good approximation, for small system sizes the higher energy levels do affect the performance, as we show in the next subsection.

C. Performance of hypercube schedules
Having calculated optimal schedules both analytically and numerically, we now compare their performance for system sizes up to n = 20 qubits. Note that the size of the minimum gap g (min) calculated from the two-level approximation in Sec. III is exactly the same for both. Since both are based only on the interactions of the two lowest energy levels, both will find the correct shape for the annealing protocol in this region. Numerical results support this prediction in that for n = 20 the numerically calculated optimal schedule s (n) slows down at the same value as s (c) in Fig. 2. For n = 5 qubits the schedules are distinct over the whole range of τ , while for n = 20, the schedules are almost identical, the only visible difference occurs at τ 0.1. The difference between them around τ 0.1 is likely due to interactions with the higher excited states of the hypercube Hamiltonian early in the schedule. In the large system limit this difference will have little effect on the overall success probability, as the overlap with the initial ground state and the manifold of states participating in the avoided crossing approaches one exponentially fast in the number of qubits n (see table I).
For n < 20, the difference between s (c) and s (n) at early times in the run does affect their relative performance, as Fig. 3 shows. Although the numerical schedule s (n) is a more accurate solution of the optimization in Eqn. (15), s (c) does better than s (n) . The reason is that, while the gap is relatively small early in the schedule, so is the matrix element between the ground and first excited state of the marked state Hamiltonian, as shown in the top inset of Fig. 3. As a result, the numerically calculated schedule slows down unnecessarily in this region, as can be seen in Fig. 2. The approximate expansion for the gap which used to derive the schedule s (c) in appendix A grows within this region, see Fig. 1. Hence, s (c) traverses this part of the schedule much faster than s (n) . Effectively, the approximate nature of the expansion for the gap used to calculate s (c) partially cancels an unnecessary slowdown caused by the approximation that dH ds 0,1 is constant for all s. However, as the main figure and lower inset of Fig. 3 show, the difference between the success probabilities using the two schedules shrinks as system size increases and the avoided crossing becomes more dominant.

A. Motivation and definition
We have already noted that QW and AQC search algorithms both use the same terms in the Hamiltonian, differing only in the time dependence. With appropriate choice of parameters, both provide a quadratic quantum speed up, a search time proportional to √ N for a search space of size N . What we want to find out is, can we map smoothly between QW and AQC searching, while maintaining the quantum speed up?
To construct the mapping, we generalize the AQC Hamiltonian of Eq. (10) by defining a time-dependent HamiltonianĤ as a function of the reduced time τ = t/t f , where the annealing schedules A(τ ), B(τ ) satisfy A(0) B(0) and B(1) A(1). The AQC algorithm as described by Eq. (10) is obtained by setting The QW search Hamiltonian described by Eq. (8) can also be described by setting We can make this even closer to the AQC form by defining β = 1/(1 + γ) and setting For QW search on the hypercube, using Eq. (9) for γ (h) o , to achieve optimal √ N scaling we must set β equal to For 0 < τ < 1, the re-parameterization of Eq. (26) in Eq. (27)    QW (τ ). The observant reader will note that, because the optimal γ (h) o is dependent on the size of the system, this reparameterization introduces a weak dependence of the global energy scale on system size N = 2 n . However, since β (h) o → 1 in the large N limit, this weak dependence cannot affect the leading order term in the asymtotic scaling, and the re-parameterized quantum walk search algorithm still provides optimal √ N scaling. In the way we have parameterized them above, the AQC and QW protocols differ only in the annealing schedules A(τ ) and B(τ ). Hence, we can use the QW and AQC schedules as end-points of a smooth interpolation between these two search algorithms to define a continuum of hybrid protocols. Using a parameter α ∈ [0, 1], where α = 0 corresponds to QW and α = 1 corresponds to AQC, we can define (color online) Interpolated schedule functions A(α, β, τ ) (dashed lines) and B(α, β, τ ) (solid lines) as defined by Eq. (29) for hybrid QW-AQC quantum searching on an n = 5 (left) and n = 8 (right) dimensional hypercube graph. α = 0 (QW), blue (dark gray in print); α = 0.1, black; α = 0.5, green (mid gray in print); and α = 1 (AQC), red (light gray in print), calculated numerically following the method in Appendix B.
giving a family of hybrid quantum algorithms defined by the Hamiltonian This interpolation is quite general, for well-behavedĤ 0 andĤ p , with the caveat about the extra dependence of the energy scale on the QW hopping rate through β mentioned above. The resulting family of functions is illustrated in Fig. 4 for search over 5-and 8-qubit hypercube graphs. Note that, although it is plausible, it doesn't follow a priori from the construction that these interpolated AQC-QW schedules will yield a quantum speed up at all for searching, let alone an optimal √ N scaling. This is because the different mechanisms in QW and AQC could be incompatible in combination. We return to this important question in Sec. IV C, where we show that properly specified interpolations can indeed achieve the theoretical optimum √ N scaling.

B. Small size examples
To gain intuition for how our interpolated schedules behave, we study small systems of five and eight qubits. These have been simulated using the full Hamiltonian on the hypercube: for numerical methods, see appendix B. different values of α, from flat for a quantum walk to a curving AQC annealing schedule for α = 1. We see that the qualitative behaviour of adiabatic evolution is fundamentally different from that of the quantum walk search. For the optimal AQC schedule the success probability increases monotonically to a value very close to one. In contrast, QW shows oscillatory behaviour, and although the success probability does not approach one, it does show a faster initial increase than for AQC. The intermediate schedule shows a mix of both behaviours, with a locally oscillating but globally increasing success probability that shows an initial increase rate between that of QW and AQC. We now turn to the probability P of finding the marked state that is obtained for different choices of α and t f . For a continuum of α values, Figs. 6 and 7 illustrate the same qualitative behaviour for 5-qubit and 8-qubit quantum searches. The oscillatory behaviour associated with a QW slowly fades away as the interpolation approaches the respective AQC schedule, at which point the success probability P increases monotonically with t f . If a relatively low success probability is sufficient, only a short total runtime t f is needed, and quantum walk is the best strategy. As t f is increased, the best strategy is to increase α and start adding some adiabatic character into the protocol. Finally, if a high success probability is required and a long runtime t f is possible, then AQC becomes the best strategy. We also see that, for these system sizes, the hybrid protocols maintain the quantum speed up for the search algorithm runtime.
We now consider the differences between the calculated and numerical annealing schedules s (c) and s (n) for these small systems. Fig. 6 depicts results for n = 5 qubits. The main difference for five qubits is that the numerically calculated optimal schedule s (n) is able to perform  substantially better for α < 0.4, where "better" means a higher probability of success for a given runtime t f and value of α. Figure 7 shows the same comparisons for the slightly larger value of n = 8 qubits. The optimal α moves away from α = 0 at a smaller value of t f and P for s (c) than it does for s (n) . There is also more structure in the optimal α line (black dashes) for s (c) than for s (n) , with a range of α values that are optimal for more than one value of P. Otherwise, the two behave quite similarly for these small sizes, suggesting that both s (c) and s (n) are able to provide a quantum speed up for hybrid protocols. To confirm this in general, not just for small n, further analysis and simulations of larger systems are required, which we tackle in the next section.

C. Performance of hybrid algorithms
Our strategy for analyzing the scaling of the hybrid quantum search algorithms is to show that the performance is dominated by a single, low energy, avoided crossing, see Fig. 1, which is present at the same position in all our hybrid algorithms. We then show that the essential features of the behavior are captured by a simple, two-state single avoided crossing model which all the hybrid algorithms map to in the large size limit. For this simple avoided crossing model we can easily show that the hybrid algorithms all provide an optimal quantum speed up. It follows that our full-size hybrid algorithms have the same asymptotic scaling.
We first consider the end points of the interpolation, QW and AQC search. For AQC search, the optimal schedule s (c) (τ ) or s (n) (τ ) is derived directly from the functional form of the lowest avoided crossing, ensuring that the Hamiltonian is changed slowly enough to avoid transitions to higher energy levels. We only need to show that the low energy structure of the Hamiltonian is dominated by a single avoided crossing throughout the process. This is shown numerically in Fig. 8. The width w(n) of the avoided crossing decreases rapidly with n. Even for a modest size of n = 50 qubits, the switch from 95% overlap with the hypercube Hamiltonian ground state to 95% overlap with the marked state occurs in less than 10 −6 of the total dynamic range of the protocol, which runs from s(τ ) = 0 to s(τ ) = 1. In contrast, for QW search, transitions to higher energy levels are a necessary part of the evolution to the marked state, so we need to determine the scaling of several related quantities to show that a single avoided crossing dominates in determining the behavior.

D. Minimum gap scaling in QW search
For QW search, to show numerically that the lowest avoided crossing is the only relevant feature in the large N limit, we must demonstrate two things. First, that the minimum gap g min = (E 1 −E 0 ) between the ground state and the first excited state becomes much smaller than the minimum gap between the ground state and the second excited state. Second, that the lowest avoided level crossing, where g(τ ) = g min , dominates the transition between the ground state of the hypercube HamiltonianĤ  ure 8 shows that both of these do, in fact, occur. The left inset shows that at the avoided crossing, the gap between the ground state and first excited state shrinks exponentially faster in n than the gap between the ground state and second excited state. The main figure and right inset of Fig. 8 show how the transition between the two ground states becomes dominated by the dynamics at g min as n increases. For a pure quantum walk search, this convergence to behaviour dominated by a single avoided crossing can be seen in Fig. 9, which shows that not only does the search success probability P approach one in the large system limit (main figure), but also that the time evolution of P (inset) approaches the functional form for the single avoided crossing P(τ ) = sin 2 (g min t f /2). The non sinusoidal shapes of these curves at low qubit number are due to the influence of excited states higher than the first exited state. In the main figure, these small size effects are clearly significant up to about n = 12 qubits. This highlights the potentially atypical nature of the 5-and 8-qubit examples in section IV B, and the importance of examining larger system sizes. For n > 12, the probability P smoothly approaches one, although relatively slowly (polynomially) as a function of n. Based on the data in table I we can deduce that this effect relates to the fact that the overlap of the manifold where the avoided crossing takes place with the marked state only approaches one polynomially in n (logarithmically in N ).
Since states of higher energy than the first excited state play very little role in the QW search dynamics for larger systems, we can approximate the probability that the marked state can be reached by considering only the ground and first excited states. Starting in |ψ init , the ground state of the hypercube QW Hamiltonian, the probability of evolving to the ground state |E 0 or first excited state |E 1 of the full search HamiltonianĤ (h) QWS , and then to the marked state |m , is given by the product of the sums of the overlaps, when higher energy levels are neglected. Figure 10 shows how P (QW ) max approaches one as n increases, by plotting the difference from one on a log or log-log scale. The top right figure shows that P (QW ) max → 1 only happens rel-atively slowly, with a polynomial scaling in n, and therefore logarithmic in N . By plotting the first overlap in Eq. (31) separately, the left figure shows that the overlap of |ψ init with |E 0 and |E 1 rapidly approaches one. Hence, the scaling of P (QW ) max shown top right is dominated by the overlap of the marked state with the lowest energy states |E 0 and |E 1 at the gap. We can quantify how slowly P approaches one by doing numerical fits to determine the scaling of the relevant quantities: these are summarized in table I. In particular, we note that γ (h) o only approaches 1/n linearly in n, consistent with the analytical results in Ref. [27].
The fact that P (QW ) max → 1 suggests that the optimal protocol for all success probabilities should approach QW (α = 0) for large system size, because QW does not slow down at the minimum gap like AQC does. However, P (QW ) max → 1 only happens relatively slowly: the maximum P (QW ) max which a QW search obtains only reaches 99% by around 100 qubits. Brute force classical techniques will become computationally non-trivial beyond around 30 bits, where P (QW ) max ≈ 95%. The finite size effects we study here are thus relevant to real world applications.

E. Single avoided crossing model
We have shown that a single avoided crossing dominates for large N for both QW and AQC search algorithms on the hypercube. Dominance of a single avoided crossing is the method used to solve analytically for all Hamiltonian-based quantum search algorithms treated to date, including the complete graph [18] and Cartesian lattices (which provide a quantum speed up for d ≥ 4 dimensions) [27]. It is also the typical behavior for a broad class of random search graphs [28]. We now introduce a simple, two state, single avoided crossing model for quantum search which provides the quadratic quantum speed up. We will then show how all of our hybrid protocols can be mapped onto it.
There are several ways to parameterize a two-state single avoided crossing model. If we designate the marked state to be |0 , this will be the end point of the schedule. The initial state needs to be orthogonal to |0 , i.e., it has to be |1 . These two states are the lowest energy eigenstates of 1 2 (1 1+σ z ) and 1 2 (1 1−σ z ) respectively, where the factor of 1 2 makes the eigenenergies zero and one in our units. We also need a hopping Hamiltonian term σ x , to drive transitions between |1 and |0 . The relative strength of the hopping Hamiltonian is g min , the minimum gap at the avoided crossing. The single avoided crossing AQC search Hamiltonian iŝ  I. Numerical fits for various quantities related to quantum walks and adiabatic protocols. These fits were performed using linear fitting on either logarithmic or semi-logrithmic axes in the range n = 40 to n = 70, except for | ψinit|E0 | 2 + | ψinit|E1 | 2 which was fit over the range n = 11 to n = 40 due to numerical precision issues. The coefficient of determination where fi are the data and y is the fitting function, this coefficient is calculated against the linear function on the logarithmic or semi-logarithmic axes. These fits are plotted along with the data used to produce them in Fig. 10. The slight difference from −1 in the scaling exponent for γ (h) o is due to numerical finite size effects.
The initial state |1 is only an approximate eigenstate of H (AC) 0 but the approximation improves as g min decreases.
Solving the eigensystem for this Hamiltonian gives for the gap between the two energy levels. The minimum gap occurs for s = 1 2 . We can then apply the method of [18] to find the optimal schedule s(t) for this system. Calculating dĤ/ds we find giving a maximum value of one for | dĤ (AC ) ds 0,1 |. Using Eq. (19) to find the optimal schedule, we need to solve This can be integrated straightforwardly to give arctan 2g min (s − 1) + 2s − 1 g min = 2g min t + c (36) with c = − arctan 2g min + 1 g min .
From this we find for s = 1 that the runtime t f is given by where the approximate expression uses arctan(1/g min ) π 2 − g min for g min 1 and terms of order g 2 min have been dropped. The runtime of the optimal schedule thus depends inversely on the size of the minimum gap, as expected. Solving for s(t) and dropping terms of order g 2 min gives In this limit where g min 1, an equivalent way to parameterizeĤ (AC) iŝ where −∞ < f (t) < ∞. This form is obtained by taking (1 − 2s(t))/g min → f (t) and shifting the zero point of the energy scale to the middle of the avoided crossing. As f (t) changes from −∞ to ∞ it passes through zero as the sign of theσ z term changes, when theσ x term drives the transition from |1 to |0 . Although theσ x term is no longer turned off at the end of the schedule, it becomes negligible in comparison to theσ z term and does not significantly alter the dynamics. This can be intuitively thought of as scaling all features ofĤ (AC) other than the avoided crossing to ±∞. The QW form of the single avoided crossing search Hamiltonian is also simple to analyze. We deduce the optimal value of γ o = 1 from the value of s = 1 2 at the avoided crossing. We then use Eqns. (27) in which Theσ x term causes deterministic transitions between the two states regardless of their energies, at a rate determined by g min . By solving for the dynamics, the time for the input state |1 to evolve to the marked state |0 can be shown to be t f = π/g min . We can now map between QW and AQC in the avoided crossing model using Eqs. (29) for A(α, β, τ ) and B(α, β, τ ). Using β = 1 2 = 1/(1 + γ o ), for s(t) from Eq. (39) we have hybrid schedules We can easily show numerically that all the hybrid algorithms defined by Eqs. (42) find the marked state with high probability (given by ) in a runtime t f , the runtime required by the optimal AQC s(t) used to define the hybrid schedules. Figure 11 shows this is indeed the case. The white contours highlight the difference between the pure QW search, which succeeds with certainty, and the AQC and hybrid algorithms, which always have a probability of error 2 that can be traded against the runtime t f . The shallow upward curve of these contours towards the AQC end of the hybrid protocols shows in what sense the QW search is better than AQC in the large size limit.
The hybrid algorithms on the full hypercube map onto the hybrid single avoided crossing model algorithms for large n. This follows from the solution methods for the end points, QW and AQC searching, which all use the two-level approximation to prove the quadratic speed up. Since the full hypercube hybrid algorithms are defined from these in the same way as the single avoided crossing model hybrid algorithms are defined, the hybrid algorithms also map to the corresponding single avoided crossing hybrid algorithm. They therefore also obtain the quantum speed up for large n.

F. Optimal hybrid algorithm for a single run
Having shown that hybrid protocols between QW and AQC maintain the quadratic quantum speed up, the next question is how to optimize over this continuum of hybrid schedules for finite size systems. The single avoided crossing model gives the large size limit in which QW is the optimal strategy. However, this limit is only reached in a polynomial scaling with n, as described in section IV D. For a single run of a search algorithm, we can trade off between the magnitude of the success probability and the runtime of the search. For QW searches, there is Value of interpolation parameter α giving the shortest runtime for a fixed success probability P for a single search, using numerically calculated optimal schedules s (n) for hypercube dimension n = 12 (red); n = 14 (green); n = 16 (blue); n = 18 (magenta); n = 20 (black). Bottom: Normalized runtime versus P for corresponding α and hypercube dimension as above (solid lines). Dashed lines: single avoided crossing model (large N limit) for t f = gmin/π, the time at which a QW reaches a success probability of one (red), time for QW to reach P (blue), time for AQC to reach P (black).
a maximum probability P (QW ) max that can be obtained; shorter runtimes reach lower success probabilities, and so do longer runtimes. For AQC searches a longer runtime always reaches a higher success probability. We can thus specify the success probability we require and ask which hybrid algorithm attains this success probability with the shortest runtime. We consider multiple run strategies in Sec. V.
As Fig. 12 (top) illustrates for sizes from n = 12 to n = 20, the optimal protocol jumps from QW to hybrid at P ≈ P (QW ) max , and the optimal hybrid strategy it jumps to becomes more QW-like (smaller α) as the system size increases. As P is increased further, the optimal hybrid strategy becomes steadily more AQC-like (increasing α). Figure 12 (bottom) shows that the hybrid strategies require runtimes t f larger than g min /π to achieve higher success probabilities in a single run.

A. Motivation
In a realistic setting of the search problem we can easily check whether the result of a search is the correct answer or not. Hence, we must consider not only single run strategies, but also multi-run strategies, where the success probability is defined as the probability of succeeding in at least one of several runs. In the context of quantum search on the hypercube, we measure which site of the hypercube our state is on, and then determine the energy of this state with respect to the search Hamiltonian. If this energy is zero, then we have found the state we are looking for, otherwise, we should re-initialize and run the search again. However, we also need to account for a nonzero 'initialization' time t init associated with each run of the search. Such an initialization time is mathematically as well as physically necessary. The fidelity between the initial state and marked state | ψ init |m | 2 = 1 N is nonzero. An arbitrarily short run is equivalent to making a random guess. Therefore, without an additional penalty per run, it would be possible to guess an arbitrarily large number of times for free, thus finding the marked state in a total arbitrarily short time. Any physical device will take a significant amount of time both to setup the initial state and to measure the final state. For the purposes of our study, the effects on the total search time of initialization and readout times are the same, therefore the quantity we call t init should be taken to include all of the time associated with a single run other than the actual runtime of the algorithm t f , i.e., as including both initialization and measurement.

B. Multiple run searching
As an example, we consider eight qubits using the numerically calculated optimal strategy s (n) . What we find is that for chosen success probabilities in the range 0.975 − 0.99, the optimal strategy depends on both t init and P target in a complicated way, as shown in Fig. 13. For the range of t init we examine, optimal strategies can range from QW (α = 0) all the way to AQC (α = 1), and also include many hybrid strategies. This suggests that there is no one "best strategy" for a small search space, and indeed we also found that the optimal strategy changes significantly when any of the parameters are varied. The complexity in the optimal search strategy for small n is because the two-level approximation does not hold very well in this regime, and interactions with higher excited states have a non-negligible effect. This suggests that a similarly complex situation will likely be present in more sophisticated optimization Hamiltonians, whenever a two-level approximation is not valid.

C. Noisy quantum searching
Another realistic situation where multiple runs can be helpful is when there is a significant level of unwanted decoherence or other forms of noise acting on the quantum hardware. In this case, shorter runs that end before decoherence effects are too strong, but consequently have lower success probabilities and hence need more repeats, may be able to maintain a quantum speed up. Decoherence effects on the different AQC and QW mechanisms are analysed in more detail in related work [39], and the effects of noise in AQC search have been studied in [40,41]. Here we focus on hybrid algorithms, and the extra options these provide for optimizing the search.
We choose a simple model of decoherence by adding a Lindblad term to the von-Neumann equation for the system density operatorρ(t), whereĤ(t) is the search Hamiltonian and κP[ρ(t)] is a decoherence term tuned by a rate κ. We choose a form for P that uniformly reduces the coherences between states corresponding to vertices of the hypercube (the computational basis). This type of decoherence has been wellstudied in the context of quantum walks [42][43][44] and, for high decoherence rate κ γ, can be thought of as continuous measurement in the search space resulting in a quantum Zeno effect [45]. It is equivalent to coupling with an infinite temperature bath.
We begin by looking at how the instantaneous success probability P(t) = m |ρ(t)| m evolves during a search, where m denotes the marked site. Figure 14 shows the evolution of P(t) during a search over an 8-qubit hypercube graph. The broad effect of the decoherence is to reduce the instantaneous success probability towards a value of 1/N , equivalent to classical guessing. The QW, AQC and hybrid search algorithms retain their characteristics up to an overall decoherence damping, which is independent of α. This suggests that the QW search, which spreads out more quickly over the search space, makes hybrid searches with more QW character better under decoherence. Indeed, for the higher decoherence rate in Fig. 14, QW run for a short time can obtain a reasonably high success probability, whereas longer hybrid or AQC runs fail entirely. The AQC search example in this figure relies on coherence sustained for longer times to reach high values of P. However, the results in Fig. 14 do not preclude the possibility that running AQC for a shorter period of time with lower success probability may still provide better performance than QW. As  Fig. 15 shows, this does indeed happen over the range of parameters we examine.
Since we now have five parameters to optimize over for a given search size n, (P, t f , α, κ and number of runs r), we first consider single run searches with success probability P(t f , α, κ). This is the final success probability of a hybrid search specified by α of duration t f in the decoherence model of Eq. (43) with decoherence rate κ. We simulate the searches for durations 0 ≤ t f ≤ 200, and define the search duration t o that maximizes P for a particular choice of α and κ. We also define α o as the value of α which maximizes P(t o , κ, α), this corresponds to the search that reaches highest success probability for a given decoherence rate κ. Note that, for computational reasons, we limited α to the values 0.0, 0.1, 0.2 . . . 0.9, 1.0 when performing the maximizations; intermediate values are of course possible. Figure 15 (bottom) shows the results of simulating this for searches over a n = 7 dimensional hypercube graph. As the decoherence rate is increased, the hybrid searches which combine QW and AQC characteristics are able to reach slightly higher success probabilities P. The optimal hybrid schedulegiven by α o reduces as the decoherence rate κ increases, confirming our hypothesis that QW is more useful for high decoherence rates, due to its faster spreading. Our simulations find that, for small values of κ, we have α o = 1, i.e., AQC gives the highest success probability, because for n = 7 QW has a success probability significantly below one. As κ is increased, the highestscoring search changes and α o decreases monotonically, indicating hybrid searches perform the best overall for interemediate levels of decoherence. In the limit of very high decoherence we are in a quantum Zeno effect regime which keeps the search in the intial superposition over all possible states. This means all searches will succeed with the same probability P = | ψ init |m | 2 = 1/N , equivalent to classical guessing. The usefulness of a search is also determined by how quickly it can be performed. The results for t f in Fig. 15 (top) show that, while QW is never optimal for individual searches, it can be substantially quicker. This means that as the decoherence rate is increased, hybrid schedules take on more QW character and soon begin to achieve higher success probabilities than AQC in shorter search times.
Having characterized the effects of decoherence on a single run, we now consider multiple-run search strategies where each search is of the same duration t f . We define the optimal annealing schedule as that which minimizes the time taken to reach a given success probability, optimized over all equal duration multiple-run hybrid search strategies, with durations of individual searches in the range 0 < t f ≤ 200. There are three variables to optimize over: the success probability P, the initialization time between searches t init , and the decoherence rate κ. We denote the number of runs by r, so the total search time is t f r.
To make this multiple parameter optimization tractable, we considered a discrete set of values for α ∈ {0.0, 0.1, . . . , 0.9, 1.0}. For a fixed value of P = 0.95, we then minimised the total search time t f r while varying t init and κ. This is shown for a 7-dimensional hypercube in the left plot of Fig. 16. There is a small threshold initialization time, below which the best strategy is to mea- sure the system state as soon as it is prepared, at t init = 0, indicating that our device can do no better than classical random guessing. There is little dependence on initialization time, other than this threshold. As κ is increased, there is a broad trend for more AQC-like searches to be optimal. However, this is punctuated with discontinuous changes to a QW search. The reason for this can be seen in the right plot of Fig. 16 which shows, on the same axes, the number of runs r taken by the best performing multiple-run hybrid search algorithm. The boundaries where another run is required as κ is increased correspond exactly to the regions where the optimal value of α changes to 0. This transition arises around the point where decoherence has increased such that the best performing search drops below P = 0.95, and so another run is required. However, the best hybrid search takes longer for larger α. Having an extra run means that a faster QW search with lower success probability for a single run is now sufficient to reach P = 0.95 for multiple runs.
As the decoherence rate rises further, AQC is unable to outperform QW, as illustrated in Fig. 14, and the best strategy becomes as many QW runs as necessary to bring the total probability of success to P = 0.95.

A. Motivation
It is also important to consider misspecification of the problem, for which the dynamics remain coherent, but some parameters are changed in unknown ways. Such a study is particularly relevant given the critical difficulties which many classical analog computing efforts have faced due to propagation of errors [46]. Misspecifications can come about in a variety of ways, such as limited precision for setting the controls in the computer, ignorance as to what the optimal parameters should be, or noise which is at a much lower frequency than the rate of the relevant quantum dynamics. An important example of the latter is so-called 1 f noise in superconducting qubit devices [47,48], such as the quantum annealers constructed by D-Wave Systems Inc. It has been shown, for instance, that such misspecifications can cause AQC to give an incorrect solution on Ising spin systems [49], and it effectively limits the maximum useful size of such devices.
For this work, we will consider simple misspecification models in the large system limit, where the Hamiltonian can be mapped to a single avoided crossing in the form of Eq. (32) or (40). Because the initial and marked states are orthogonal in this limit, considering multiple runs which can be performed with negligible initialization time is not mathematically pathological. Furthermore, physically, we expect initialization and readout time to scale, at worst, polynomially with n, while runtime will scale as √ N ∝ 2 n 2 . Therefore, in the large N limit, it is a natural physical assumption that t f t init . We first examine the effect of having the size of the minimum gap be misspecified, so that we do not know when to stop QW protocols, and then examine the effect of not knowing the position of the avoided crossing, which will cause QW protocols to use the wrong value of γ and AQC protocols to slow down at the wrong point.

B. Error in gap size
The effect of misspecifying the size of the minimum gap can be approximated as an uncertainty in the total energy scale ∆g min , which is mathematically equivalent to a misspecification of the total runtime t f . Assuming that the misspecification is distributed in a Gaussian manner around the intended runtime, the new success probability for a given anneal time t f and α becomes where ∆g min is the (unitless) fractional uncertainty in g min , and the absolute value in the argument of P within the integral is included to avoid negative time arguments. Fig. 17 shows how the evolution makes a smooth transition between the characteristically sinusoidal behavior of success probability versus runtime for QW, and the characteristically monotonic behavior of AQC. As the comparison between the perfect and misspecified cases demonstrates, gap misspecification causes a large reduction in the success probability of QW protocols, but has almost no effect on the monotonic AQC search. Fig. 18 illustrates that, for moderately high success probability and moderate amounts of misspecification of ∆g min , the best protocol is no longer QW, but lies in between the optimal AQC schedule and QW. For large gap misspecification where a high success probability is required, the best approach is to run an intermediate strategy twice.
The reason that gap size misspecification makes hybrid protocols (α > 0) outperform QW for a large range of parameter space is because a QW can only succeed with a probability approaching one if t f g min is an odd multiple of π. The misspecification smears out these peaks and implies that the success probability of a QW will not approach one for any value of τ . For protocols with some adiabatic character, however, the maximum success probability will still approach one as τ becomes larger, as the adiabatic theorem holds for any finite gap. In fact, in half of the cases, the misspecified gap will actually be larger than in the case with no misspecification, and the performance of AQC will thus actually improve.  (46). Bottom: number of repeats r in optimal strategy versus P and ∆q.

C. Error in avoided crossing location
Another type of problem misspecification is incorrectly specifying the position of the avoided crossing. To model this, we consider a modification of the problem Hamilto-nianĤ This addition to the problem Hamiltonian is mathematically equivalent to performing a shift in the avoided crossing position f (t) → f (t) + q in Eq. (40). Based on this Hamiltonian, we define the success probability with misspecified avoided crossing position as where ∆q is the (unitless) fractional uncertainty in q, that controls the degree of misspecification. Figure 19 illustrates that, in contrast to gap misspecification, the best strategy is almost always QW. Intermediate strategies only become the superior method briefly, at the edge of the regime where single runs are the best way to reach the desired probability. At higher misspecification, multiple repeated QW become the best strategy.
Misspecification in the avoided crossing position does significant harm to both AQC and QW protocols. The success probability of a QW protocol performed with an incorrectly chosen γ does not approach one. Similarly, an AQC protocol with a poorly chosen schedule will require a much longer runtime for the success probability to approach one. The faster runtime of QW then means it beats AQC for multiple runs.

VII. SUMMARY AND OUTLOOK
In this paper we provide a detailed study of the scaling of quantum search on a hypercube graph using both quantum walk and adiabatic quantum search algorithms. Noting that these can be expressed as two extremes of quantum annealing schedules, we defined a family of quantum search algorithms that are hybrids between QW and AQC, and showed that the whole family achieves the maximum possible √ N quantum speed up. There are a number of subtleties in the scaling behavior on the hypercube that we treat in detail for short search times, complementing the work by Weibe and Babcock [37] on long timescales.
Our hybrid QW-AQC schedules are an example of the advantages we gain by treating both QW and AQC as part of the same overall method of continuous-time quantum computing [6]. We find that hybrid strategies intermediate between QW and AQC provide the best quantum search algorithm under a range of realistic conditions. The techniques we use here can easily be extended to hybrid quantum search on other graphs, and to other quantum walk or adiabatic quantum computing algorithms.
This work focused on the search problem due to its relative simplicity, and the fact that annealing schedules can be derived analytically. The core ideas and methods are quite general and can easily be extended to more complex and realistic problems, such a 'fixed point search', where multiple states are marked. Fixed point search algorithms have been studied in both the QW [50] and AQC [51] regimes, so interpolation to generate hybrid algorithms should be straightforward. The quantum walk search on random graphs solved in [28] is based on the same kind of single avoided crossing arguments which appear in this work, meaning that these are also natural for hybrid QW-AQC protocols.
Hybrid algorithms such as the ones we present here can be viewed as particular instances of quantum control techniques applied to solving optimization and search problems. Another application of quantum control to quantum algorithms is based on the Pontryagin minimum principle of optimal control: that optimal control protocols for solving these problems will follow a bangbang scheme, with successive applications of the extreme values of the controls [52]. An algorithm based on such controls, called the Quantum Approximate Optimization Algorithm (QAOA), was first proposed by Farhi, Goldstone, and Gutmann [53,54]. This protocol can be implemented either through digital quantum circuits, or by successively applied Hamiltonians. It has been shown that the QAOA can obtain an optimal √ N scaling in solving the search problem using a transverse field search unitary [55], essentially the problem we consider in this paper.
However, there are two caveats worth noting in terms of the optimality of QAOA type bang-bang protocols. Firstly, when viewed as an application of successive Hamiltonians, these protocols require infinitely fast switching time, which is generally unphysical. Secondly, while the optimal control scheme to find the solution is mathematically always of a bang-bang form, this solu-tion may exhibit Fuller's phenomenon [56,57], in which the optimal solution involves switching back and forth between the two extremal Hamiltonians an infinite number of times in a finite time window. While mathematically valid, such a control scheme is clearly not physically realizable. It is an open question what happens to Hamiltonian-based QAOA when finite switching time is added as a constraint. Our result that intermediate protocols between quantum walk and adiabatic protocols are still able to obtain an optimal speed up do provide an encouraging sign that QAOA may remain effective with realistic constraints applied.
Recent studies by Muthukrishnan et al. [58,59] on a class of permutation symmetric problems related to, but distinct from, search, have found that, deep in the diabatic regime, the problem can be solved by dynamics which are effectively classical through 'diabatic cascades'. Muthukrishnan et al. focus only on changing the rate of evolution of an AQC algorithm; in contrast, we examine both the shape of the schedule and the rate of evolution. Furthermore, since all of the qubits need to align to interact meaningfully with the energy landscape of the search problem, it is unlikely that a similar classical diabatic cascade regime exists in our study.
As well as problem size, the performance of a quantum search in a realistic setting will depend on many other factors. By performing a fairly general and multi-faceted analysis of such factors, we uncover a landscape where no single protocol dominates. In asymptotically large systems with perfectly specified problems, a straightforward QW approach is best. However, this limit is approached slowly, since the success probability for QW scales only as n, i.e., logarithmically in problem size N . A rich structure exists for computationally interesting, non-asymptotic sizes. On the other hand, for asymptotically large systems with some degree of problem misspecification, interpolated protocols can outperform the QW approach. A simple open systems analysis reveals another layer of structure that can be exploited in realistic settings. For more discussion on the effects of noise and the competition between the mechanisms, see our related work [39]. In future work we will apply these techniques to algorithms with useful applications which can be run on near-future quantum hardware [60].
and show that λ (gmin) 1,0 ±n/(2 √ N ) for the two lowest eigenvalues corresponding the the ground state E 0 and first excited state E 1 .
To obtain the optimal schedule following the method in Roland and Cerf [18], we need an expression for the gap as a function of s(t), not just at the minimum gap. To obtain a suitable approximate value for dĤ ds 0,1 , we first calculate dĤ ds in the symmetric subspace representation, It is sufficient to use the maximum value of dĤ ds 0,1 , which occurs at s m , where the eigenenergies |E 1,0 (| n 2 x ± | n 2 z )/ where c is the constant of integration. To obtain the constant, set s = t = 0, giving where the factors in front of the arctan term have been rearranged to give a more convenient form for the constant. One can then in principle solve for s(t). However, the terms on the r.h.s., apart from the arctan, are potentially problematic as s → 1. Given that we started with the approximation λ 1, which occurs at the position of the minimum gap, we can't necessarily expect that the solution will be valid for s → 1. We first note that taking only the arctan term on the r.h.s. gives a schedule that is valid for all 0 ≤ s ≤ 1, and it provides a runtime proportional to √ N . If we don't discard these extra terms, we can show that they can be neglected, provided we stop the anneal very slightly before s = 1, but still well past the minimum gap.
To solve for s(t) retaining the full expression, invert the arctan to give where c now contains the awkward extra terms, The arctan argument is large, so the arctan is close to π/2. We note that the extra terms are small for most values of s, and only become large as s → 1. To check when these terms become O(1), for the first extra term we solve s (1 − s) to obtain s 1 This is well past the minimum gap, which occurs at s = 1/(1 + R 1 ) 1/(1 + 2/n). Applying the same procedure to the second extra term gives to leading order which is even closer to s = 1 and further from the minimum gap. Since the transition probabilities are only significant close to the minimum gap, and hence all the important slowing down of the schedule occurs around the gap, what happens this close to s = 1 has essentially no effect on the success or runtime of the algorithm. Dropping the extra terms from the solution provides an expression for s(t) (A18) where we have also dropped terms O(1/N ), and Strictly speaking, this is valid for s 1 1+4/(n √ N ) , although in fact it is well-behaved right up to and including s = 1. From this we can obtain the runtime where the two arctan terms have each been approximated by π/2, since their arguments are large, O( √ N ).
Optimal AQC schedules s (n) (τ ) were calculated numerically as solutions of Eq. (19), both to check the analytical solutions for the hypercube, and because we can solve numerically with less assumptions than are required to obtain analytical expressions. For the hypercube, the matrix which describes these systems is (n + 1) × (n + 1), even after taking advantage of symmetry by mapping to a line. A Hermitian 2 × 2 matrix can always be diagonalized analytically by finding the roots of the characteristic polynomial, as was done in [18]. For larger matrices this is no longer feasible, nor generally possible if the matrix is bigger than 4 × 4. Fortunately, the gap g(s) can easily be calculated numerically using the iterative eigensolving modules in Numpy [63], and we are thence able to iteratively solve ds dt = g 2 (s). We first define a normalized function where s is a function of the reduced time τ . To obtain s(τ ), we need to invert this function, s(τ ) = F −1 (τ ). Deliberately using a programming-like notation, we define τ List to be a linearly spaced list of points between τ = 0 and τ = 1, and sList to be a list of the corresponding values of s(τ ), obtained by applying F −1 (τ ) to each element of τ List. We approximate F (s) numerically byF (s), where we replace the integral by a finite sum plus linear interpolation. Writing s j = 1 2 (sList(j(s)) + sList(j(s) + 1)) sList(j + 1) − sList(j ) N g 2 (s j ) + s − sList(j(s)) N g 2 (s j ) , where j(s) is equal to the number of elements in sList which are strictly less than s, and N is a normalization factor which is included to ensure thatF (s) = 1. It is straightforward to numerically invertF (s). This can be accomplished by first finding j max (s), the largest value of j(s) for whichF (s) < τ , and then solvinĝ F (s)| j(s)=jmax(s) = τ (B3) for s. Based on this numerical function inversion, we define an iterative method of converging on the solution for s (n) (τ ),