A Short Path Quantum Algorithm for Exact Optimization

We give a quantum algorithm to exactly solve certain problems in combinatorial optimization, including weighted MAX-2-SAT as well as problems where the objective function is a weighted sum of products of Ising variables, all terms of the same degree $D$; this problem is called weighted MAX-E$D$-LIN2. We require that the optimal solution be unique for odd $D$ and doubly degenerate for even $D$; however, we expect that the algorithm still works without this condition and we show how to reduce to the case without this assumption at the cost of an additional overhead. While the time required is still exponential, the algorithm provably outperforms Grover's algorithm assuming a mild condition on the number of low energy states of the target Hamiltonian. The detailed analysis of the runtime dependence on a tradeoff between the number of such states and algorithm speed: fewer such states allows a greater speedup. This leads to a natural hybrid algorithm that finds either an exact or approximate solution.

We give a quantum algorithm to exactly solve certain problems in combinatorial optimization, including weighted MAX-2-SAT as well as problems where the objective function is a weighted sum of products of Ising variables, all terms of the same degree D; this problem is called weighted MAX-ED-LIN2. We require that the optimal solution be unique for odd D and doubly degenerate for even D; however, we expect that the algorithm still works without this condition and we show how to reduce to the case without this assumption at the cost of an additional overhead. While the time required is still exponential, the algorithm provably outperforms Grover's algorithm assuming a mild condition on the number of low energy states of the target Hamiltonian. The detailed analysis of the runtime depends on a tradeoff between the number of such states and algorithm speed: having fewer such states allows a greater speedup. This leads to a natural hybrid algorithm that finds either an exact or approximate solution.

I. INTRODUCTION
While quantum algorithms are useful for many problems involving linear algebra (for example, finding eigenvalues 18 , solving linear equations 15 , and performing Hadamard transforms 1 ), there are few proven speedups for combinatorial optimization problems. The most basic such speedup is Grover's algorithm 14 , which gives a quadratic speedup over a brute-force search. For a problem such as finding the ground state of an Ising model on N spins, this can lead to a speedup from a brute force time O * (2 N ) (where O * (·) is big-O notation up to polylogarithmic factors, in this case polynomials in N ) to O * (2 N/2 ). In the black box setting, Grover's algorithm is optimal 4 , but for problems with a structure one might try to find a further speedup.
One attempt to find a speedup is the adiabatic algorithm 10 . Here, let H Z be a Hamiltonian which is diagonal in the computational basis, such as where i labels different qubits and Z i is the Pauli Z matrix on the i-th qubit. Then, consider the Hamiltonian where and X i is the Pauli X matrix on the i-th qubit. At s = 0, the ground state of this Hamiltonian can be easily prepared. At s = 1, the ground state is the ground state of H Z . If the spectral gap of H s between the ground and first excited state is only polynomially small for s ∈ [0, 1], then one may adiabatically evolve the ground state from s = 0 to s = 1 in polynomial time. Unfortunately, the gap may become superpolynomially small. Indeed, it was argued using ideas from Anderson localization 2 that the gap may become as small as N −const.×N so that the time required for adiabatic evolution is of order N const.×N which is much slower than even classical brute force search. While the actual behavior for random instances may be more complicated than this 20 , specific examples 33 can show this behavior. This is perhaps not surprising. The problem of finding the ground state of H Z is extremely hard, even if we restrict J ij ∈ {−1, 0, 1} for all i, j. While some speedups are known for bounded degree (here, we consider the graph with spins as vertices and an edge between vertices if the corresponding element of J is nonzero, and degree refers to the degree of this graph) 11,12,16,31 , if we only allow polynomial space then the fastest classical algorithms for arbitrary J take a time O * (2 N ). If we allow exponential space then it is possible to reduce this time to O * (2 ωN/3 ), where ω is the matrix multiplication exponent 34 . However, not only does that algorithm require exponential space, but it is not known how to give a Grover speedup of this algorithm, so that no quantum algorithm is known taking time O * (2 cN/2 ) for any c < 1. Finally, this algorithm is specific to constraint satisfaction problems where each constraint only involves a pair of variables, rather than a triple or more.
Here we present a quantum algorithm to find the ground state of H Z which improves on Grover's algorithm in many cases. In the next subsection we give the problem definition and define which H Z we consider.

A. Problem Definition
The problem is to find the ground state of H Z (i.e., eigenstate of H Z with minimum eigenvalue; eigenvalues of H Z , H s will often be called "energies") assuming that the ground state energy E 0 is known. We impose the following conditions on H Z . Let N be the number of qubits. We let H Z be any Hamiltonian that is a weighted sum of products of Pauli Z operators, with each product containing exactly D such operators on distinct qubits for some given D. That is, the case D = 2 is the Ising model, the case D = 4 is a sum of terms Z i Z j Z k Z l for i, j, k, l all distinct, and so on. We take D = O(1). We emphasize that all products must have the same D so that we do not allow for example H Z = Z 1 Z 2 + Z 1 Z 2 Z 3 ; this is for a reason explained later.
Each product has a weight that is an integer. We define J tot to be the sum of the absolute values of the weights. We require that J tot = O(poly(N )). That is, we fix some β > 0 and require J tot = O(N β ). (If all weights are chosen from {−1, +1} we have J tot = O(N 2 ). ) We require that H Z has a unique ground state for D odd while for D even we require that H Z has a doubly degenerate ground state. For even D, the operator i X i commutes with the Hamiltonian, flipping all spins, so that every eigenvalue has an even degeneracy. We call this assumption the "degeneracy assumption". We will analyze the performance of the algorithm without this assumption in future work. In an Appendix we show how to reduce to the case without this assumption at the cost of an additional time overhead.
We give two theorems 1,2 which describe the performance of the algorithm; the different theorems correspond to different choices of the parameters in the algorithm. Both theorems show, roughly, that at least one of two things holds: the algorithm finds the ground state in a certain expected time or H Z has a large number of low energy states, i.e., eigenstates with eigenvalue close to E 0 .
These theorems can be applied in one of two ways. One way is to define a promise problem, in which we are promised that H Z does not have such a large number of low energy states as well as promised the degeneracy assumption on H 0 . Then, the algorithm solves this promise problem. For this promise problem, while the algorithm is given E 0 , it is not necessary to know E 0 in advance since one can try all possible E 0 with only polynomial overhead.
Alternatively, we can consider H Z without such a promise on the number of low energy states but still including the promise on the degeneracy assumption. Then, we give a hybrid algorithm which tries both running the quantum algorithm here to find the exact ground state as well as random sampling (or a Grover search) to find an approximate ground state. This hybrid algorithm will be explained after theorem 1.
The problem of minimizing H Z is also known as MAX-ED-LIN2, as we assume that each term is exactly of degree D, rather than having degree at most D; of course, there is an overall sign difference also, as we try to minimize H Z rather than maximizing. Due to the uniqueness conditions on H Z , we call this problem UNIQUE-MAX-ED-LIN2.
However, we can reduce any instance of MAX-2-LIN2 with a unique solution to UNIQUE-MAX-E2-LIN2, where MAX-2-LIN2 allows terms to have degree 1 or 2. Up to a sign difference, MAX-2-LIN2 with a unique solution means that we consider H Z = i,j J i,j Z i Z j + h i Z i , with integer J i,j , h i and i,j |J ij | + i |h i | = J tot , with H Z required to have a unique ground state. We can find the ground state of this problem by finding one of the two ground states of a problem on N + 1 spins defined by

B. Main Results
We now give the main results. The parameters B, K enter into the definition of the algorithm, given later; the algorithm makes use of a family of Hamiltonians H s = H Z − sB(X/N ) K so that B sets the strength of a term that is proportional to a power (set by K) of the transverse field. In each theorem, the statement about the number of low energy states of H Z is first expressed as a statement about probability distributions with high entropy and low energy which then implies the statement about the number of low energy states.
We give two distinct theorems. The first theorem considers the case that K = C log(N ) for C > 0 a fixed constant. The second theorem is more general, and allows K to be an arbitrary odd integer with K ≥ 3; K may depend on N and the first theorem follows from the second. The first theorem is simply given as a way to explain some of the results in the particular case of a logarithmically growing K, when some of the results simplify; the second theorem gives stronger results but they are more complicated. Even in the case of a logarithmically growing K, the second theorem is stronger.
Fixed K, compared to logarithmically growing K, leads to a larger speedup but requires a stronger promise. In an abuse of notation, when we write K = C log(N ), we mean that K is taken to be the smallest odd integer larger than C log(N ). We explicitly write the dependence on these constants in the equations, not hiding them in big-O notation. The quantity b is a real number, 0 < b < 1. We take b < 1 else the second possibility (item 2 in the list) is trivially true and does not imply any interesting constraint on the density of states.
We let W (E) denote the number of computational basis states with expectation value E for H Z .
All entropies are measured in bits rather than nats. All logarithms are to base 2 unless otherwise specified.
Theorem 1. Assume that H Z obeys the degeneracy assumption. Suppose that B = −bE 0 and K = C log(N ). Then, at least one of the following holds: 1. The algorithm finds the ground state in expected time 2. There is some probability distribution p(u) on computational basis states with entropy at least Further, for any η > 0, for some we have Theorem 1 implies the following corollary about a hybrid algorithm: Corollary 1. There is an algorithm that, given H Z and E 0 , either outputs "approximate" or "exact". If it outputs "approximate", it returns also a state with energy at most E approx ≡ E 0 + (1.01) b|E 0 | + O(1) · Jtot N 2 C 2 D 2 log(N ) 2 and takes time at most O * (2 O(1)N/C ). If it outputs "exact", it outputs an exact ground state of H Z . The expected run time of the algorithm (averaged over both approximate and exact outputs, rather than conditioned on an output) Proof. Take η = 0.01.
Run the following algorithm. First, try repeated random sampling of states to find a state with energy at most E approx . Take a total of n samp samples. If any sample succeeds, terminate the algorithm, returning "approximate" and the given state. If item 2 of the theorem holds, each sample succeeds in finding such a state with probability at If no sample succeeds, then run the quantum algorithm of this paper in parallel with a brute force search, until one of them finds an exact ground state, returning "exact" and the state found.
The run time bound on the approximate output holds by construction. We now show the expected run time bounds. If item 1 holds, then the algorithm of this paper succeeds in expected time so the expected run time bound holds. If item 2 holds and the repeated random sampling fails to find an approximate state then the brute force search will find the ground state in time O * (2 N ); since the probability that the repeated random sampling fails is ≤ 2 −N , this adds a negligible amount to the expected time of the algorithm.
Remark: the repeated random sampling can be quadratically improved with Grover search but this only improves constants which are hidden in the big-O notation.
We now give the case of arbitrary K. The function τ (·) in theorem 2 is a continuous increasing function, taking [0, 1] to [0, 1]. It is defined in lemma 11. It is differentiable on this interval, except at zero; for small σ, ).
Theorem 2. Assume that H Z obeys the degeneracy assumption. Suppose that B = −bE 0 with 0 ≤ b < 1. Suppose that K ≥ 3 and K > β, with K odd. Then, at least one of the following holds: 1. The algorithm finds the ground state in expected time N .
2. For some X 0 ≥ X min = N · (4B) −1/K , there is some probability distribution p(u) on computational basis states with entropy in bits at least Further, for some function F (S) with then for some E > E 0 we have log(W (E)) ≥ F −1 (E) − O(log(N )).
There are two parameters b, K that can be adjusted in this algorithm, so the implications of this theorem take some unpacking. We now argue, however, that for most problems for many choices of b, K the conditions of items 2. of the theorem will not be satisfied and hence a nontrivial speedup will occur from item 1. The next paragraph will deliberately be more heuristic, and will draw on some physics intuition, since the goal is not to prove a result but rather to argue that certain conditions do not occur in most examples.
Let us consider a simple example, K = 99, b = 1/99. Then, either the algorithm gives a speedup over a Grover search, taking expected time O * (2 cN/2 ) for a c slightly less than 1, or there are a large number of computational basis states with low energy for H Z . Let us see whether we can satisfy log(W (E)) ≥ F −1 (E) for any E > E 0 . For E near 0, we have log(W (E)) close to N since a typical state has energy E near 0. If we had taken b = 1, we could then satisfy N ≥ F −1 (0). However, the function F (S) is bounded at E 0 + O(1) JtotK 2 D 2 X 2 min + BO(1), and the constant hidden in the big-O notation O(1) is such that for b = 1/99 we have F (S) bounded away from zero. Indeed, F (S) will be upper bounded by roughly (1 − bO(1))E 0 . Let us, for clarity in explanation pretend that the constant hidden in the O(1) is equal to 1. Then, we could have a problem if F −1 ( 98 99 E 0 ) ≈ N . However, this means an enormous (entropy almost equal to N ) number of states have energy which is 98/99 times the ground state energy. Now let us instead ask whether the conditions of item 2. can be satisfied for X 0 close to 0. Indeed, for an example such as the Sherrington-Kirkpatrick spin glass 17 , the entropy log(W (E)) has a power law dependence on E − E 0 , with the scaling behavior well-understood 9,25 from the Parisi solution 26,27 giving log(W (E)) ∼ N · ((E − E 0 )/|E 0 |) 2/3 . By choosing K large, from studying the limiting behavior of c we find that we might satisfy the condition at small E − E 0 if log(W (E)) ∼ N · ((E − E 0 )/|E 0 |) 2/99 up to some polylogs in energy. So, again, we would not expect to obey item 2. at small X 0 since 2/99 < 2/3. Note also that for K = 99, since B ≤ O(N 2 ) we have X min = Ω(N 1−2/99 ) = Ω(N 97/99 ) so that X min cannot be too small.
On the other hand, a model such as the "toy model" of Ref. 33 has a unique ground state but has log(W (E)) ≈ N/2 for E = E 0 + 1. Thus, for this model, we cannot consider fixed K without satisfying item 2. of the theorem but we can still obtain a nontrivial speedup by taking K = C log(N ), albeit not giving O * (2 cN/2 ) with c < 1. Even in the case K = C log(N ), theorem 2 gives tighter bounds than theorem 1. The entropy in theorem 1 is the entropy for X 0 = X min , i.e., it is the minimum possible, while the energy given in theorem 1 is the largest possible that can occur from theorem 2 for K = C log(N ) and this value of energy would not occur for X 0 = X min . Thus, theorem 2 gives stronger results involving a functional relationship between entropy and energy.

C. Outline
The algorithm has three distinct ideas. First we use a short path evolution, where the initial state is not a ground state of the initial Hamiltonian. That is, rather than trying to follow the full evolution from a transverse field Hamiltonian that is diagonal in the X basis to H Z which is diagonal in the Z basis, we instead follow only a "short path", keeping a term proportional to H Z in the Hamiltonian fixed and varying a transverse field-like term from a small value to zero. We called this term "transverse field-like" rather than a transverse field, because we add a more complicated term −B(X/N ) K that is proportional to a power of the transverse field. This is the second idea and plays a key role in avoiding small spectral gaps. The third idea uses measurements to obtain adiabatic evolution with exponentially small error; similar ideas are in Ref. 28,32. We will show that either the algorithm succeeds in giving a nontrivial speedup or a certain spectral gap becomes small. However, for such a gap to become small, there must be some state with a large expectation value for −B(X/N ) K and with a small expectation value for H Z . Roughly, the idea then is that for a large K, this imposes strong constraints on the expectation value of X. For example, if the state is an eigenstate of X, then we would have X/N = (X/N ) K 1/K , and so for large K, even a small expectation value of (X/N ) K would give a large expectation value for X/N . Technically, the implementation is more complicated than this because there may be large fluctuations in X in the state. Ignoring these technical details for the moment, the next idea is that given a large expectation value of X, we use log-Sobolev estimates on entropy to relate the expectation value of X to the entropy in the computational basis. This is then used to show that there must be many eigenstates of H Z with low energy.
Other technical tools used include a Brillouin-Wigner perturbation theory to compute overlaps and a method of localizing wavefunctions in X; this method is used to deal with the problem of large fluctuations in X.
In sections II,III we give the algorithm. In section IV we explain the Brillouin-Wigner perturbation theory. We then consider two cases, depending on the the spectrum of the Hamiltonian QH s Q, where Q projects onto the states of H Z with energy greater than E 0 . Theorem 3 in section V assumes the first case and gives bounds on the spectral gap of H s and shows the speedup of the algorithm. Theorem 4 in section VI assumes the second case and shows the existence of probability distributions over computational basis states with high entropy and low energy. Putting these results together, theorems 1,2 follow as shown in section VII; there, we use the high entropy and low energy probability distributions to lower bound W (E). In section VIII, we briefly discuss some other results and also remark on a hybrid algorithm.
Section VI will use the ground state degeneracy assumption for convenience, but we will show how to remove this assumption for the results of this section. Section V will rely more heavily on the ground state degeneracy assumption; we will remove this assumption in future work using a modified perturbation theory.

II. THE SHORT PATH ALGORITHM
The algorithm that we use is based on applying amplitude amplification 8 to another algorithm. This latter algorithm is Algorithm 1. Remark: The case K = 1, B = cN corresponds to a transverse magnetic field of strength c. Also, note the direction of evolution from s = 1 to s = 0.
To analyze this algorithm for even D we need a definition. For D even, we define the "even subspace" to be the eigenspace of i X i with eigenvalue +1 and define the "odd subspace" to be the eigenspace of i X i with eigenvalue −1. The Hamiltonian H s commutes with i X i and ψ + is in the even subspace; the measurement algorithm will be chosen to preserve the eigenvalue of i X i . When we analyze the algorithm for even D, all references for the remainder of the paper to the Hamiltonian will refer to the Hamiltonian projected into the even subspace and all vectors will be in the even subspace. We will remark on this as needed.
At s = 0, H s has a unique ground state; call this state |0 ; for even D this state |0 is the unique ground state of H Z in the even subspace and it is an equal amplitude superposition of two computational basis states. Let ψ 0,s be the ground state of H s . By Perron-Frobenius this state is unique for s ≥ 0 for K odd; to see this, note that one can flip any given spin K times to attain a single spin flip so that the matrix H s is irreducible in the computational basis, i.e., consider the term X K i for any given i. When we refer to uniqueness of a state, we mean uniqueness up to an overall phase.

2.
Use the measurement algorithm of section III to evolve under the Hamiltonian Hs from s = 1 to s = 0. where where where K is a positive odd integer and B is a scalar chosen later.
When we refer to a Hamiltonian Hs, it will be assumed that s ∈ [0, 1] unless explicitly stated otherwise. We pick B > 0 so that Hs has all off-diagonal entries non-positive in the computational basis.
3. Measure the state in the computational basis and compute the value of HZ after measuring. If this value is equal to E0 then declare success and output the computational basis state.
We will compute the squared overlap later. All state vectors that we write will be assumed to be normalized to have unit norm, except where explicitly stated otherwise later. Suppose that the gap remains Ω(1/poly(N )) along the path. Indeed, later we will give conditions under which the gap is Ω(1). Then, for any P succ < 1, > 0 we can use the measurement algorithm explained in section III to produce, with probability at least P ov P succ , a state equal to ψ 0,0 up to some error . This algorithm takes a time that is O(poly(N, (1 − P succ ) −1 ), log(1/ )). This measurement algorithm has the advantage, compared to adiabatic evolution, that we can achieve a better scaling with the error .
Thus, the quantum algorithm described above succeeds with probability at least P ov P succ − in finding the ground state of H Z . We take = 2 −N so that the error is negligible compared to P ov computed later. We choose P succ = 1/2. Hence, applying the method of amplitude amplification to the evolution, one obtains an algorithm which succeeds in producing the ground state of H Z in expected time O(P −1/2 ov P −1/2 succ poly(N, log(1/ )).

III. MEASUREMENT ALGORITHM FOR ADIABATIC EVOLUTION WITH SMALLER ERROR
We now explain how to do step 2. of algorithm 1. We explain the method in a general setting and then show that in the particular case here, it can be reduced to a single measurement.
Suppose that we have a path of Hamiltonians H s , for s ∈ [0, 1]. Suppose further that all of these Hamiltonians have a unique ground state ψ 0,s , separated from the rest of the spectrum by a gap at least ∆ = Ω(1/poly(N )) and suppose that ∂ s H s = O(poly(N )). Suppose that for any s, we can simulate time evolution under H s for time t up to error δ in a time that is O(poly(N, t, log(1/δ))). This holds for the Hamiltonians H s considered above so long as B = O(poly(N )) using any of several different algorithms in the literature which achieve this time [5][6][7]22,23 .
We seek a quantum algorithm that, taking a state ψ as input with overlap P ov = | ψ|ψ 0,1 | 2 , will succeed, with probability at least P ov P succ for P succ close to 1, in giving an output state which is equal to ψ 0,0 up to some error , with exponentially small. A natural way to do this is to follow adiabatic evolution of the Hamiltonians, i.e., to simulate a time-dependent Hamiltonian which slowly changes from H 1 to H 0 , taking ψ as input to the evolution and ψ as output. Unfortunately, this method has two problems, one minor and one major. We will explain these problems before giving a different approach using measurements that avoids these problems. The minor problem is that we must then simulate time-dependent evolution of a Hamiltonian; this problem is not too serious as for example the Taylor series approach 7 can simulate this evolution in a time that is O(poly(N, t, log(1/δ))) even for slowly varying Hamiltonians. The major problem is that there may be diabatic transitions from the ground state ψ 0,s to some excited state along the path. While there is some controversy about the exact error estimates in the adiabatic theorem 3,29 , even the best estimates give an error that is super-polynomially small but not exponentially small in the evolution time. Hence, even taking these estimates, in order to obtain an error δ that is exponentially small in N as we will need, we need a super-polynomial evolution time.
It is possible that a careful analysis of the error terms in the adiabatic algorithm would show that the required evolution time is not in fact too large. However, given some question about even simpler error estimates in the adiabatic theorem, we prefer not to use this method.
Instead we use the following algorithm 2. Later we will show that for the specific H s considered in this paper, it suffices to use the simpler algorithm 3 given later. We present algorithm 2 here because it also works for more general paths of Hamiltonians H s , so long as a spectral gap is present and the adiabatic evolution can be simulated.

Algorithm 2 Measurement Algorithm
1. Let ψ be the input state.
2. Phase estimate ψ using H1. If the energy estimate is larger than E0,1 + ∆/2, then terminate the algorithm and return failure. Else continue.

4.
Phase estimate ψ using H1. If the energy estimate is larger than E0,1 + ∆/2, then terminate the algorithm and return failure. Else declare success and return ψ.
One can also replace the adiabatic evolution of step 3. with a sequence of measurements as in Ref. 28. This has the advantage that one does not need to simulate a time dependent evolution.
In algorithm 2, we use the initial phase estimation to approximately project onto ψ 0,1 . Then we adiabatically evolve. Finally we repeat with another phase estimation to project onto ψ 0,0 . We now consider the error in the phase estimation. We consider the phase estimation scheme of Ref. 19 though others are possible. There are two ways to quantify the error. One is the probability of error and the other is the precision. For us, it suffices to have a precision that is smaller than ∆/2 so that one distinguishes the energy of the ground and first excited states. We take the probability of error in any step to be so that the total probability of error is O( ). If controlled time evolution can be implemented exactly, the phase estimation has an overhead that is only logarithmic in the error. For constant K, we can use any of the time evolution algorithms above or use 28 to implement the controlled time evolution with error O( ) for a time t ∼ ∆ −1 with a cost that is O(poly(∆ −1 , N, log(1/ )).
For K = C log(N ), implementing the controlled time evolution is slightly more difficult. The Hamiltonian is no longer sparse when expressed in the computational basis. However, we can still use the approach of Ref. 23 or the related approach in Ref. 28 using a sequence of measurements to implement time evolution as follows. The term −sB(X/N ) K can be expressed as a sum of terms, each of which is proportional to a projector onto an eigenspace of X, with eigenvalues −N, −N + 2, . . . , N so that there are N + 1 such terms. We can measure each such term using polynomially many gates by applying a Hadamard to all qubits, use an adder to compute to total X, then uncomputing the addition and undoing the Hadamard. A similar approach might also work for the Taylor series approach 7 . Even without this way of decomposing −sB(X/N ) K , the overhead due to the non-sparsity of the Hamiltonian would be quasi-polynomial and would be negligible compared to the improvements in theorems 1,2.
We choose the adiabatic evolution so that for input state ψ = ψ 0,1 , the output state has squared overlap with ψ 0,0 equal to 1 − P diab for some P diab close to 0. From the adiabatic theorems quoted above, the adiabatic evolution time required is only polynomial in P −1 diab . A similar estimate comes from using the repeated measurements of Ref. 28. Hence, Lemma 1. For any ψ, and P diab > 0, > 0, the algorithm succeeds with probability at least | ψ 0,1 |ψ | 2 (1−P diab )−O( ). It takes a time O(poly(N, log(1/ ), P −1 diab ). Assuming success, the output state has squared overlap at least 1 − with ψ 0,0 .
Choosing P diab and small we obtain the desired P succ close to 1. In fact, for the Hamiltonian H s from section II, we will show later that (under a spectral gap assumption and under some assumptions on B, K that we give later that) Hence, for this problem, we can use a single measurement, phase estimating H 0,1 , and not use any adiabatic evolution.
There is no need for the final phase estimation on H 0 since this measurement in the computational basis projects into an eigenstate of H Z whose energy can then be computed classically. This leads to the following simple algorithm Algorithm 3 which replaces Algorithm 1. As a technical remark, the above algorithm assumes that we know E 0,1 . However, in the application that we consider, we do have good estimates on E 0,1 , given later.
As a further remark, for even D many of the Hamiltonian simulation algorithms that we refer to can be chosen to preserve the even subspace exactly. Even if they do not preserve it exactly, they preserve it up to some error which is chosen to be negligible. Hence, if desired, one can do the simulation using H s not projected into the even subspace.
2. Phase estimate ψ using Hamiltonian H1. If the energy estimate is greater than E0,s + ∆/2, then terminate the algorithm and return failure.
3. Measure the state in the computational basis and compute the value of HZ after measuring. If this value is equal to E0 then declare success and output the computational basis state.

IV. BRILLOUIN-WIGNER PERTURBATION THEORY
We use Brillouin-Wigner perturbation theory to compute the ground state of H s as a function of s. In the case that H 0 has a unique ground state (as we consider here), Brillouin-Wigner perturbation theory gives a particularly simple result for the ground state of H s , given in Eq. (13). There are many references for Brillouin-Wigner perturbation theory; a useful reference is Ref. 21, which also gives some convergence results. We will however derive the needed results below.
For even D, we work in the even subspace throughout this section. We remark on the appropriate choice of basis states later.

A. Introduction
We begin with some general results on Brillouin-Wigner perturbation theory. The results in this subsection do not use any properties of the specific choice of H s above, except that we assume that H 0 has a unique ground state (one great feature of this perturbation theory, however, is that it becomes only slightly more complicated when the ground state is degenerate, while Rayleigh-Schrodinger perturbation theory becomes much more complicated). We consider a Hamiltonian H s = H 0 + sV in this subsection with H 0 , V arbitrary, later taking V = −B(X/N ) K .
Let |0 be the ground state of H 0 . Let Q = 1 − |0 0|. Let φ 0,s be the ground state of H s . To define the Brillouin-Wigner perturbation theory, it is convenient to normalize the states differently, rather than normalizing them to have unit norm. We will use the normalization that φ 0,s |0 = 1.
so that Let E 0,s denote the energy of ψ 0,s for Hamiltonian H s . Let where ω is a scalar and where the inverse is computed in the subspace which is the range of Q and let (1 − Q) Then Brillouin-Wigner perturbation theory gives Note that by definition G 0 (ω)V = G 0 (ω)QV .
Note that E 0,s appears in the power series of φ 0,s . Thus, in applications of this perturbation theory to compute eigenvectors or eigenvalues, it is necessary to self-consistently compute E 0,s , using We will give bounds on E 0,s later. The correctness of Eq. (13) as a formal power series in s can be readily verified by computing (H − E 0,s )φ 0,s . In subsequent subsections, we will give conditions for convergence of this power series and we will compute |φ 0,s |. Eq. (10) is immediate from Eq. (13).

B. Overlap
Now consider the specific choices of H 0 = H Z and V = −B(X/N ) K using Eq. (6) We will compute the overlap ψ + |φ 0,1 , assuming convergence of the series (13) and assuming a bound on E 0 − E 0,1 . Note that E 0,1 < E 0 .
For odd D, let us use |u , |v , . . . to denote basis states in the computational basis. For even D, we use |u to denote the equal amplitude superposition of a pair of basis states in the computational basis, with the two basis states related by flipping all the spins. Each u labels a bit string of length N ; let u denote the bit string with all bits flipped. Then, |u and |u denote the same basis state for even D.
Let E u , E v , . . . denote the corresponding eigenvalues for these states for Hamiltonian H 0 . Then, For any u, we have ψ + |u = 2 −N/2 . Before continuing, we need two technical lemmas. First, the following lemma which estimates 0|(X/N ) L |0 . The monotonic decrease with increasing L is immediate when working in the X basis since (X/N ) L > (X/N ) L .
Second we need the following inequality Lemma 3. Let x 1 , . . . , x k be positive random variables. The variables need not be independent of each other. Then , where the inequality is by convexity of the exponential. However, −E[ln( We now show that Lemma 4. Assume that E 0,1 ≥ E 0 − 1 and assume that series (15) is convergent. Let B = O(poly(N )). Then, Proof. Note that all terms in Eq. (15) are non-negative. We re-express the series in terms of a random walk on the basis states |u as follows. The random walk starts in state |0 at time 0. If the random walk is in some state |u t at time t, then the state of the random walk at time t + 1 is given by repeating K times the process of picking a random spin and flipping that spin. Note that we can flip the same spin more than once in a single step of the random walk (indeed, it may be flipped up to K times) although this is unlikely for K << √ N . That is, each step of the random walk we consider here is K steps of a random walk on the Boolean hypercube.
For t > 0 we say that the random walk "returns at time t" if the state of the random walk at time t is |0 . For t > 0 we say that the random walk "returns by time t" if the random walk returns at some time s with 0 < s ≤ t.
Let P nr (t) denote the probability that the random walk does not return by time t. Let E nr,t denote an expectation value conditioned on the random walk not returning by time t. Then, we have where the random walk has a sequence of states u 1 , . . . , u t . We can estimate P nr,t from lemma 2. We have where 0|(X/N ) Ks |0 is the probability that it returns at time s. By lemma 2, for t = O(poly(N )) and K ≥ 3, we have P nr,t = O(1/N 3 ). Eq. (17) requires computing the expectation value of t m=1 1 Eu m −E0,1 . Applying lemma 3 to this expectation value we have Suppose the state of the random walk at time t is given and has some energy E ut . Then, if we pick a single spin at random and flip it, the expectation value of the energy of the resulting state is equal to To see this, consider any term in H 0 which is a product of D spins; the probability that we flip one of these spins, changing the sign of this term, is D/N . Remark: this is the point at which we use that all terms in H Z have the same degree D; otherwise, the dependence of the average energy on m may be more complicated.
Repeating mK times, we find that the expectation value of the energy at time m + 1, for given u m , is equal to Since E um ≥ E 0 for all u m , we have for t = O(poly(N )), So, for t = O(poly(N ) where P nr, So, by Eqs. (18,21) we have .
We may assume that |E 0 | = Ω(N ) as otherwise the ground state is degenerate. So, for t only polynomially large, the is only polynomially small; indeed for |E 0 | = ω(N log(N )), this quantity is Ω(1).
Here, we have used the fact that the power series expansion of exp(α) is given by t≥0 α t /t! and the fact that t≥s α t /t! is negligible for s >> α. Indeed, t≥s α t /t! is exponentially small in α for fixed ratio s/α with s/α > e. Hence, we can choose the polynomial in the limits on the first line of Eq. (23) to be large compared to and then the sum of remaining terms (i.e., the terms in the series expansion of the exponential which are not included in the first line of Eq. (23)) is o(1).

V. CONVERGENCE PROPERTIES, ENERGY SHIFT, AND NORM
In this subsection, we consider convergence of the series (15), we bound the shift on energy E 0 − E 0,1 and we bound the norm |φ 0,1 |, and we consider the gap of H s . Most of the results will be based on considering the spectrum of QH s Q. Again we take H 0 = H Z and V = −B(X/N ) K .
We first show the following three results. Eq. (27) below implies that Eq. (9) holds.
1. The series (15) always converges, assuming that the value of E 0,1 in the series indeed is equal to the ground state energy of H 1 .
2. Consider the Hamiltonian QH s Q. Let E Q 0,s be the smallest eigenvalue of this Hamiltonian in the subspace spanned by the range of Q. Then, ∂ s E Q 0,s ≤ 0.
3. Finally, assume that E Q 0,1 ≥ E 0 + 1/2. Then, and For K odd with 0|B 2 (X/N ) 2K |0 ≤ 1/2, we have that and Proof. Defining where again the inverse is a Moore-Penrose inverse, the power series (13) is a series expansion of in powers of s. We now consider the singularities of G s (ω) considered as a function of s. Then, the radius of convergence of the series (13) is equal to the distance from the origin s = 0 to the closest singularity (as a function of s) of G s (ω) in the complex plane.
First, we will show that the singularities are simple poles at values of s where QH s Q has an eigenvector in the range of Q with eigenvalue equal to ω. Let g = (Q(ω − H 0 )Q) −1/2 and let v = QV Q, where the exponent −1/2 means a square-root of the Moore-Penrose inverse. For ω smaller than all eigenvalues of H 0 (which holds for our problem since E 0,1 < E 0 ), this inverse is well-defined and the square-root can be taken pure imaginary so that g is anti-Hermitian. We choose the sign of the square-root arbitrarily. Then, To see Eq.
where all inverses are Moore-Penrose inverses. The matrix gvg is Hermitian and so can be diagonalized. Thus, the singularities of G s (ω) are simple poles at values of s equal to eigenvalues of (gvg) −1 . Note that while elsewhere in the paper we assume that s ∈ [0, 1], here we allow s to be an arbitrary complex number. Let ζ be an eigenvector of gvg with eigenvalue s −1 , so that (1 − sgvg)ζ = 0. Hence, 0 = g(g −1 − svg)ζ = g(g −2 − sv)gζ = g(ω − H s )gζ so that gζ is an eigenvector of QH s Q with eigenvalue ω, as claimed.
The above results about singularities hold for arbitrary H 0 , V, ω. Now to show convergence, we consider H 0 = H Z , V = −B(X/N ) K , ω = E 0,1 ≤ E 0 . Suppose some matrix element of G s (E 0,1 ) in the computational basis has radius of convergence r. Every matrix element of G s (E 0,1 ) in the computational basis has a series expansion with all coefficients the same sign. So, by Pringsheim's theorem, there must be a singularity for s = r, i.e., there must be a singularity on the positive real axis. So, the series for G 1 (E 0,1 ) converges unless E Q 0,t = E 0,1 for some t ∈ [0, 1]. Since all off-diagonal terms of QH s Q and QV Q are negative, we have ∂ s E Q 0,s ≤ 0 by Perron-Frobenius, thus proving item 2. Hence, the series for s = 1 is convergent if E Q 0,1 > E 0,1 . However, E Q 0,1 > E 0,1 also by Perron-Frobenius, thus proving item 1.
We now consider the gap of H s : Lemma 6. The Hamiltonian H s has a gap between ground and first excited states that is greater than or equal to E Q 0,s − E 0 . Since ∂ s E Q 0,s ≤ 0, the gap of H s is greater than or equal to E Q 0,1 − E 0 . Proof. This is a special case of a general result. Consider a Hamiltonian where v a is an arbitrary vector. We will show that for any E a , v a , E 0 , the spectral gap of this Hamiltonian is greater than or equal to min a =0 (E a − E 0 ). Then, to apply this result to the spectral gap of H s , we take the states |a in Eq. (34) to be eigenstates of QH s Q and take v a to be matrix elements of sV between |0 and those eigenstates. Define the Green's function G(ω) = (ω − H) −1 . We have where For ω < min a =0 E a , we have Σ(ω) < 0. Hence, 0|G|0 does not have any poles in the interval E 0 < ω < min a =0 E a . Hence, if H has an eigenvalue in this interval, then the corresponding eigenvector has vanishing amplitude on |0 ; however, any such eigenvector has eigenvalue equal to E a for some a, so no such eigenvector exists.
Thus, all eigenvalues of H, for any v are contained in (−∞, E 0 ] ∪ [min a (E a ), ∞). If v a = 0 for all a, there is exactly one eigenvalue in the interval (−∞, E 0 ] and so this cannot change as v a changes. Hence it follows that: Theorem 3. Consider the Hamiltonian QH s Q. Let E Q 0,s be the smallest eigenvalue of this Hamiltonian in the subspace spanned by the range of Q. Assume that E Q 0,1 ≥ E 0 + 1/2 and assume that 0|B 2 (X/N ) 2K |0 ≤ 1/2. Then 1. The Hamiltonian H s has gap at least 1/2 between the ground and first excited state.

VI. GAP ASSUMPTION AND ENTROPY
In this section we assume that E Q 0,1 < E 0 + 1/2 and prove some consequences of that. In subsection VI A we show how to construct states with large expectation value for X. In subsection VI B, we show entropic consequences of this using a log-Sobolev inequality. In subsection VI C, we put these results together.
For technical convenience later, it is easier to work with an eigenvector of H 1 . So we show: Then, there is an eigenvector Ψ of H 1 with eigenvalue at most E 0 + 1/2 such that Ψ|B(X/N ) K |Ψ ≥ 1/4.
Proof. H 1 has at least two eigenvalues with energy at most E 0 + 1/2. This is because the ground state of QH 1 Q in the subspace spanned by Q and the state |0 span a two dimensional space. Further, the average of energy over the corresponding eigenvectors is at most E 0 + 1/4 since the ground state energy of H 1 is ≤ E 0 . On the other hand, the average of H Z over these eigenvectors is at least E 0 + 1/2. Hence, the average of B(X/N ) K over these eigenvectors is at least 1/4. So, at least one such Ψ exists.
Remark: the above lemma is the only place in this section in which the degeneracy of H Z is used. We used the degeneracy to show that the average of H Z over these eigenvectors is at least E 0 + 1/2. However, it is not hard to remove the degeneracy assumption here, at the cost of slightly worse constants. We sketch this in the discussion.

A. Localizing in X
In this section, we show how given an eigenvector with a large expectation value for B(X/N ) K we can construct a wavefunction with a large expectation value for X and whose expectation value for H Z is only slightly changed. This will be necessary to apply log-Sobolev bounds in the next section.
We begin with a lemma that considers states of a Hamiltonian describing a single particle hopping in one-dimension: Let h be a real Hermitian tridiagonal matrix. Label rows and columns of h by an integer x, so that h x,y = 0 if |x − y| > 1. Let ψ be a real eigenvector of h with eigenvalue E. Let ψ(x) denote the x-th entry of ψ. Let h od denote the off-diagonal part of h, i.e, h od has the same entries as h off the main diagonal and is zero on the main diagonal. Then, 1. For any integer > 0, for any y, there is a state ξ with |ξ| = 1 such that and such that ξ(x) is non-vanishing only for x < y + or ξ(x) is non-vanishing for x > y − .
2. For small > 0, the state ψ defined by ψ (x) = exp( x)ψ(x) obeys 3. If the state ψ defined above has for some z, then there is a state ξ with |ξ| = 1 such that and such that either ξ(x) is non-vanishing only for y − < x < y + for some y ≥ z.
Proof. Assume without loss of generality that E = 0 (otherwise add a scalar to h so that E = 0). Assume without loss of generality that ψ(x) is real. Let f (x) be any function. Letf be the diagonal matrix with entries given by f (·). We compute where the third equality follows from the fact that h x,x ψ(x) + h x,x−1 ψ(x − 1) + h x,x+1 ψ(x + 1) = 0 since ψ is an eigenvector with eigenvalue 0 and the fourth equality follows by shifting the variable in the summation by 1.
So, there must be some y > z such that ρ y ≥ (1/2)ρ y− and such that ρ y ≥ (1/2)ρ y+ . To see this, find the largest y > z such that ρ y ≥ (1/2)ρ y− ; by the above paragraph at least one such y must exist. This y must have ρ y ≥ (1/2)ρ y+ as otherwise it would not be the largest.
The above lemma applies to a one-dimensional Hamiltonian. However, we can apply it to an eigenvector Ψ of the Hamiltonian H 1 as follows. Let P x project onto the eigenspace of X with eigenvalues in the interval [xD, xD + D). That is, defining q(y) = y/D , then P x projects onto the eigenspace of X with eigenvalues y such that q(y) = x.
Then, the Hamiltonian H 1 , projected into the space spanned by P x Ψ/|P x Ψ| obeys the conditions of lemma 8 with h od ≤ H Z and with ψ(x) = P x Ψ|Ψ . We now show how to attain a wavefunction with a large expectation value for X. We do this in two slightly different ways depending on how large K is. The lemma will involve the constant C > 0; the constants hidden inside the big-O notation do not depend upon C.
1. Assume that K = C log(N ). Let B = −bE 0 with b ≤ 1. Then, there is a state Ξ, with |Ξ| = 1 such that and such that Then, there is a state Ξ with |Ξ| = 1 such that Ξ is supported on an eigenspace of X with eigenvalues in some interval [X 0 − X min /K, X 0 + X min /K] for X 0 ≥ X min and such that so that Proof. The proof of both cases is the same. By lemma 7, there is an eigenstate Ψ of H 1 with Ψ|H 1 |Ψ ≤ E 0 + 1/2 and Ψ|B(X/N ) K |Ψ ≥ 1/4. Throughout, the state ψ will be an eigenvector of h constructed from Ψ as explained above by projecting into the space spanned by P x Ψ/|P x Ψ|. Let X min = N · (4B) −1/K . For X < X min we have B(X/N ) K < 1/4. Recall that K is chosen odd. So exp(K(X − X min )/X min ) ≥ 4B(X/N ) K , and so exp(KX/X min ) ≥ 4 exp(K)B(X/N ) K .

B. Log-Sobolev Inequality
Given a quantum state ψ, let S (comp) (ψ) be the entropy of the probability distribution of measurement outcomes when measuring the state in the computational basis. That is, if ψ = u ψ(u)|u , with u |ψ(u)| 2 = 1, then Here we measure entropy using bits, i.e., taking logs to base 2, rather than nats. This will lead to some various ln(2) differences between our definitions and definitions in the log-Sobolev literature.
In this subsection, we relate the entropy S (comp) (ψ) to ψ|X|ψ . It is clear that if ψ|X|ψ = N , then ψ = ψ + up to an overall phase, and so S (comp) (ψ) = N . Roughly, we will show that if ψ|X|ψ is extensive (i.e., equal to N times some nonzero constant), then S (comp) (ψ) is also extensive.
One such result uses the log-Sobolev inequality. This lemma 10 is not tight: it only gives a nontrivial bound on S (comp) (ψ) if ψ|X|ψ > (1 − ln(2))N . In lemma 11 we give a tight bound and give a precise statement of that rough extensivity claim above.
Proof. This follows from the log-Sobolev inequality 13,24 . Define for any function f (u), where the expectation is taken for a random choice of u in the domain of f . We have E[ψ 2 ] = 2 −N u ψ(u) 2 = 2 −N . Here we abuse notation to use ψ to represent both a quantum state and a function ψ(u). So, The log-Sobolev inequality states that Hence Eq. (50) follows. Remark: the log-Sobolev literature usually expresses the inequality in terms of gradients of a function on the Boolean hypercube; however, since this gradient is defined in terms of bit flips and X induces a single bit flip, after a little algebra one may see that Eq. (53) is equivalent to the results in the literature.
A tighter bound on S (comp) follows from the log-Sobolev inequality of Ref. 30. We have be the binary entropy function (we use S rather than H to avoid confusion with the Hamiltonian H). Let (The inverse of S may be chosen arbitrarily so long as the same inverse is chosen in both locations.) Then, The function τ (·) is a continuous increasing function, taking [0, 1] to [0, 1]. For small σ, and for small ψ|X|ψ /N , Proof. This follows from theorem 1.2 of Ref. 30. That theorem is expressed in terms of Ent(ψ 2 ), up to multiplicative factors of ln(2) since natural logs are used in that paper. Use Eq. (52) to re-express this in terms of S (comp) (ψ) and then Eq. (55) follows after some algebraic manipulations.
The function τ (·) has a simple interpretation. Consider the single qubit state A product state of N qubits, all in this single qubit state, has entropy N σ and expectation value of X equal to 2N S −1 (σ)(1 − S −1 (σ)). The result is that this product state minimizes entropy for the given expectation value of X.
Remark: in fact, while we have only considered the case of pure states, it is possible to show a generalization of Eq. (55) to mixed states. We do not need this generalization here, but it is interesting to note that it exists. Let ρ be a density matrix. Let S (comp) (ρ) be the entropy of the mixed state obtained by measuring ρ in the computational basis. Then, we have This can be proven similarly to the proof of the pure state case: one establishes it for a single qubit, and then one uses convexity of c and conditional entropy to show it for an arbitrary number of qubits.

C. Number of Low Energy Eigenstates
Theorem 4. Assume that E Q 0,1 < E 0 + 1/2. 2. Consider arbitrary K. Let B = −bE 0 with b ≤ 1. Then, for some X 0 ≥ X min = N · (4B) −1/K , there is some probability distribution p(u) on computational basis states with entropy at least and with expected value of H Z at most where the function τ (·) is defined in lemma 11. If X 0 << N , then Proof. This follows from lemmas 9,10,11. We have dropped the additive +1/2 from lemma 9 as it is smaller than other terms hidden in the big-O notation.
VII. PROOF OF THEOREMS 1,2 We now prove the main theorem. Either E Q 0,1 ≥ E 0 + 1/2, in which case theorem 3 applies or E Q 0,1 < E 0 + 1/2 in which case theorem 4 applies. As noted, for B = −bE 0 , for K ≥ 3 and K > β, the condition B(X/N ) K ≤ 1/2 in theorem 3 holds for all sufficiently large N .
Theorem 4 shows the existence of a probability distribution with large entropy and small expectation value for H Z . To turn this into a statement about W (E) as in theorems 1,2 we need the following lemma. Remark: the factor of O(log(N )) in the statement of the lemma can be interpreted, for physicists, as an entropy difference arising when passing from a canonical to a microcanonical ensemble, and the need for two energies E 1 , E 2 can be interpreted as a Maxwell construction.
Lemma 12. Let p(u) be a probability distribution over basis states |u such that Then, there are two energies, E 1 , E 2 with E 1 ≤ E ≤ E 2 such that for some probability P ∈ [0, 1] we have P E 1 + (1 − P )E 2 = E and P log(W (E 1 )) + (1 − P ) log(W (E 2 )) ≥ S − O(log(N )), where W (E) is the number of computational basis states with expectation value E for H Z .
Proof. Let If P (E) > 0, then for u such that E u = E, let p(u|E) = p(u)/P (E) and let Then, Since there are only O(J tot ) possible values of E for which P (E) = 0, we have − E P (E) log(P (E)) = O(log(N )).
Hence, E P (E)S(E) ≥ S − O(log(N )). Also, E P (E)E = E. We have S(E) ≤ log(W (E)). Hence, E P (E) log(W (E)) ≥ S − O(log(N )). Now maximize E P (E) log(W (E)) subject to the linear constraints E P (E)E = E and E P (E) = 1, with 0 ≤ P (E) ≤ 1 for all E. Introducing Lagrange multipliers λ 1 , λ 2 corresponding to these constraints, one finds that for all E we have either P (E) = 0 or P (E) = 1 (and hence only one choice of E has P (E) > 0) or log(W (E)) = λ 1 E + λ 2 . Let T be the set of E such that log(W (E)) = λ 1 E + λ 2 . Since this constraint is linear, for any choice of P (E) such that P (E) = 0 for E ∈ T and E P (E) = 1 and P (E)E = E we have the same E P (E) log(W (E)). Hence, to maximize E P (E) log(W (E)) it suffices to consider the case that P (E) is nonvanishing for at most 2 choices of E. Let these choices be E 1 , E 2 with E 1 < E 2 and E 1 ≤ E ≤ E 2 .
Remark: In the lemma above we used the fact that H Z has integer eigenvalues to bound the entropy − E P (E) log(P (E)). For more general H Z , where J ij are chosen more generally, we could bin energies into polynomially many bins and obtain a similar result.

VIII. DISCUSSION
We have given a quantum algorithm for exact optimization. This algorithm leads to a nontrivial speedup, assuming a bound on the number of computational basis states with low energy for H Z . This naturally leads to a hybrid algorithm: if the bound is obeyed, we run the exact algorithm here while if the bound is not obeyed, one can find a low energy state (i.e., an approximate solution of the optimization problem) by repeated random sampling or by Grover search.
We have only considered problems where all terms in H Z have the same degree. Eq. (19) is the point at which we used this assumption. For problems such as MAX-3-SAT, the energy dependence may be more complicated so it is not clear how well this algorithm works there. It would be interesting to study this using numerical simulation. Also we emphasize that the mere presence of a large number of low energy states of H Z is not, on its own, sufficient to make the algorithm fail; rather, one needs to have a low energy eigenstate of QH 1 Q, which requires some structure to how those states are arranged on the hypercube. That is, if a large number of low energy states are distributed in some fairly random way on the hypercube it is possible that one might not have a small E Q 0,1 . Numerical simulation may also be useful here.
Lemma 7 is the only place in section VI where we used the assumption on the degeneracy of H Z . However, it is not hard to remove this assumption here. Assume E Q 0,1 < E 0 + 1/2. Then consider the Hamiltonian H Z − (5/2)B(X/N ) K . This must have an eigenvalue ≤ E 0 − 1/4. Hence there must be some eigenvector Ψ of H Z − (5/2)B(X/N ) K with Ψ|B(X/N ) K |Ψ ≥ 1/4. Then one could use this Ψ in the rest of section VI; the cost is that in some cases factors of B in this section get replaced by (5/2)B, in particular in theorem 4. One can equivalently understand this as follows: one instead assumes that E Q 0,2/5 < E 0 + 1/2. If this holds, then E Q 0,1 < E 0 − 1/4. If this assumption fails, then section 3 implies a nontrivial speedup for the algorithm using Hamiltonian H Z − (2/5)B(X/N ) K . In fact, there is nothing special about our assumption that E Q 0,1 < E 0 + 1/2. The analysis of section V would work under the assumption that E Q 0,1 ≥ E 0 + c for any constant c > 0. Further, there is nothing special about our assumption in the lemma that Ψ|B(X/N ) K |Ψ ≥ 1/4; the analysis above would go through up to some changes in constants if we assumed that Ψ|B(X/N ) K |Ψ ≥ c for any c > 0. So, it would suffice to consider H Z − c B(X/N ) K for c = (1 + c )/(1 − c) which can be made arbitrarily close to 1. In future work, we will address the degeneracy assumption in section V.
Thus, we can reduce to the unique ground state problem at the cost of trying (2N ) log(ngs) different choices of h. This number is small if n gs is small, while if n gs is large, one can find the ground state more rapidly by Grover search. Considering the algorithm with logarithmically growing K, note that if n gs ≥ 2 rN/ log(N ) 2 for some scalar r then one can find the ground state using Grover search in expected time O * (2 N/2−rN/ log(N ) 2 /2 ), while if n gs ≤ 2 rN/ log(N ) 2 then there are only (2N ) rN/ log(N ) 2 = 2 rN/ log(N )+O(N/ log(N ) 2 ) choices of h. For r < b/(2CD), theorem 1 shows a speedup greater than 2 rN/ log(N ) and so one still has a 2 const.×N/ log(N ) speedup in this case, so in worst case one has a 2 const.×N/ log(N ) 2 speedup.