Quantum speedup of branch-and-bound algorithms

Branch-and-bound is a widely used technique for solving combinatorial optimisation problems where one has access to two procedures: a branching procedure that splits a set of potential solutions into subsets, and a cost procedure that determines a lower bound on the cost of any solution in a given subset. Here we describe a quantum algorithm that can accelerate classical branch-and-bound algorithms near-quadratically in a very general setting. We show that the quantum algorithm can find exact ground states for most instances of the Sherrington-Kirkpatrick model in time $O(2^{0.226n})$, which is substantially more efficient than Grover's algorithm.

Quantum computers can solve certain problems, such as simulation of quantum-mechanical systems [20] and integer factorisation [41], exponentially faster than the best classical algorithms known. As well as these special-purpose algorithms, there are general-purpose quantum algorithms which can outperform their classical counterparts more modestly for a wide range of problems within the domains of constraint satisfaction and optimisation [32]. A famous example is Grover's algorithm for unstructured search [21], which can be applied to find the minimal value in a set of size N with O( √ N ) evaluations of values in the set [17]. This algorithm achieves a quadratic speedup over exhaustive classical search. However, for many problems encountered in practice, there are more efficient classical algorithms than exhaustive search, which take advantage of the structure of the problem. This can apply to NP-complete problems, which are expected not to have polynomial-time algorithms, yet which can sometimes be solved surprisingly efficiently in practice.
One of the most successful general approaches to solving constrained optimisation problems is known as branch-andbound. This approach can be applied to problems where the goal is to find a minimal-cost valid solution, in a setting where one has access to two functions: a bounding function cost that, for a given subset of the set of possible solutions, returns a lower bound on the cost of any valid solution in that subset; and a branching rule branch to be applied if a subset of possible solutions cannot yet be ruled out, which will divide that subset into two or more "live" subsets to be explored in later iterations. Then the branch-and-bound approach explores subsets of potential solutions, ruling out those where the cost of any valid solution is too high (e.g. higher than the lowest cost of a valid solution found so far). The goal is to use this additional information to avoid exploring every possible solution. Clearly, this approach can equivalently be applied to problems where the goal is to maximise the value of a valid solution.
Although the number of subsets produced by the branching steps can grow exponentially, implying an exponential running time, algorithms based on this technique can sometimes find exact solutions to instances of hard optimisation problems substantially beyond the reach of unstructured search. For example, integer linear programming problems can be solved * ashley.montanaro@bristol.ac.uk using a branch-and-bound approach where the cost function is based on relaxing to linear programming problems (see Appendix A for more details).
Here we describe a general quantum approach to accelerate classical branch-and-bound algorithms almost quadratically. The quantum branch-and-bound algorithm can be applied to speed up any classical algorithm that fits into the branch-andbound paradigm (formally defined below). These include algorithms for integer linear programming; nonlinear programming; the travelling salesman problem; and more [30].
The quantum algorithm is based on quantum subroutines that speed up a related class of classical algorithms: backtracking algorithms [2,33]. Backtracking is an approach that solves constraint satisfaction problems given the ability to determine whether a partial solution to the problem could be extended to a full solution. Backtracking algorithms can be interpreted as the special case of branch-and-bound algorithms where the cost function either returns 0 (for a valid solution to the problem) or ∞ (for an invalid potential solution, or a partial solution that cannot be extended to a full solution), so the algorithm described here can be seen as generalising the results of [2,33].
This result contrasts with other quantum approaches to solve hard optimisation problems, such as the adiabatic algorithm [19] and the quantum approximate optimisation algorithm [18], in that the branch-and-bound algorithm guarantees to find the minimal-cost solution with arbitrarily high probability; however, for certain problems its running time can be long (e.g. exponential in the input size).
One area where branch-and-bound algorithms have been successfully applied classically is finding ground states of spin models [22,28,35,36]. For example, branch-and-bound has been used to find the largest exact ground states known of instances of the Bernasconi model [8], corresponding to binary sequences with minimal autocorrelation. The fastest known branch-and-bound algorithms for this model have runtime estimated numerically as approximately O(2 0.79n ) [35]; the quantum branch-and-bound algorithm would improve this scaling to approximately O(2 0.4n ).
Another spin model addressed using branch-and-bound is the well-studied Sherrington-Kirkpatrick (S-K) model [40], which is the family of classical Hamiltonians H(x) = 1≤i<j≤n a ij x i x j where x ∈ {±1} n and a ij are distributed according to the normal distribution N (0, 1). Finding the lowest-energy state for such a Hamiltonian can be achieved arXiv:1906.10375v1 [cs.DS] 25 Jun 2019 in time O(2 n/2 poly(n)) using Grover's algorithm. Recently, Callison et al. [12] have described an intriguing quantum algorithm that uses quantum walks to solve the S-K model, and gave evidence based on numerical experiments for small n that the runtime of the algorithm should be approximately O(2 0.41n ). Here we apply the quantum branch-and-bound algorithm to speed up a simple classical branch-and-bound algorithm [22] for the S-K model, and show rigorously that the runtime of the quantum algorithm is O(2 0.226n ) on most instances of size n, which is substantially more efficient than Grover search. Numerical evidence suggests that the runtime in practice could be as low as O(2 0.186n ).
Branch-and-cut methods have also been used to find ground states of spin glasses [36]; these could be accelerated using the same quantum approach.
Model for branch-and-bound algorithms. For a problem to be accessible to branch-and-bound, we must have access to cost and branch procedures. Each takes as input a subset S of potential solutions to an optimisation problem, perhaps chosen from a restricted family of subsets. cost(S) returns a lower bound on the cost of any solution within S. branch(S) either returns that S only contains one element, or splits S into two or more disjoint sets S 1 , . . . , S k . For simplicity, here we assume that k is a fixed constant. For the behaviour of cost to be reasonable, we must have cost(S) ≥ cost(S ) whenever S ⊆ S . We assume that for all subsets S, either cost(S) ∈ [0, c max ] for some known c max , or cost(S) = ∞, where the latter corresponds to S containing no valid solutions. We can assume essentially without loss of generality that cost is integer-valued; real-valued cost functions can be handled by truncating their output to precision δ, and multiplying all costs by 1/δ. In this situation c max effectively acts as a precision parameter.
An abstraction of the problem of finding a minimal-cost solution to a problem given access to the cost and branch procedures is the following model of search within trees [24], illustrated in Figure 1. The search space is described by a rooted tree where each node v is either labelled with an integer c(v) between 0 and c max or with ∞, and satisfies the promise that if w is a child of v, then c(w) ≥ c(v). We are given query access to two oracles, each of which takes as input a node v. One oracle returns c(v) and the other returns the children of v, if there are any. The goal is to find a leaf node v such that c(v) is minimised, while making the minimal number of queries.
In this abstraction, a node in the tree represents a subset of possible solutions (with a leaf representing a single possible solution), and its label represents a lower bound on the cost of any solution in that subset. A label of ∞ represents that there is no valid solution in that subset. Revealing the children of a node corresponds to splitting a set of potential solutions into subsets. Note that the backtracking approach for solving constraint satisfaction problems corresponds to exploring a tree of this form where each node is labelled either with 0 or ∞.
The best classical strategy for solving the search problem in such a tree is to maintain a list of "live" nodes (those whose children have not yet been explored), and always to choose to explore the live node with the lowest cost [24]. This strategy is Nodes are labelled with their cost bounds, which are nondecreasing on any path from the root to a leaf. The green node is the optimal solution; yellow nodes are removed if the tree is truncated at the optimal cost. known as best-first search. Although it is optimal in terms of query complexity, it may require a very large amount of space to store the list of live nodes, so in practice other strategies may be preferred (such as depth-first search); strategies which achieve near-optimal query complexity in limited space are known [24]. We will consider particular subtrees of the overall tree, obtained by truncating it at a particular cost c, i.e. deleting all nodes whose labels are greater than c. This is equivalent to changing the cost function to a cost' function such that cost'(x) = ∞ if cost(x) > c. This transformation clearly preserves the tree structure and the monotonicity of the cost function. We also have that truncating the tree at a cost c min equal to the minimal cost of a valid solution preserves the presence of a minimal-cost valid solution in the tree.
As observed by Karp and Zhang [25], this kind of truncation controls the complexity of a class of classical search algorithms: Any algorithm which outputs all the minimal-cost leaves must explore the entire tree truncated at cost c min . Otherwise, it could not be sure that it had found all the minimalcost leaves. In particular, if all solutions have distinct costs, any algorithm which outputs the minimal-cost solution must explore the whole tree truncated at that cost.
Statement of results. We can now state our main result. Let T be the tree corresponding to a branch-and-bound algorithm A. Let d be the depth of T , let c min be the minimal cost of a valid solution, and let T min be the size of the truncated tree with cost bound c min . (If there is no solution, c min = ∞, and T min is the size of the whole tree T .) Fix a constant > 0. Then there is a quantum algorithm which uses calls to cost and branch, and except with failure probability at most , returns a solution with minimal cost, if one exists, and otherwise returns "no solution". The O notation hides polylogarithmic factors in d, 1/ and log c max .
Assuming that T min poly(d), T min log c max , this is roughly a quadratic speedup over any possible classical branch-and-bound search algorithm which finds all minimalcost solutions in the tree corresponding to A, whose complexity (as discussed above) is lower-bounded by T min . In the usual case where there is a unique minimal-cost solution, the speedup is approximately quadratic over any possible classical branch-and-bound algorithm (i.e. one that uses only the cost and branch procedures).
Quantum branch-and-bound algorithm. In order to state the quantum branch-and-bound algorithm, we will need two quantum-algorithmic ingredients. Both relate to determining properties of trees, in a model where only the root node is known in advance, and the structure of the tree can only be revealed via "oracle" queries to nodes. A query to a node reveals the neighbours of the node and whether the node is marked. This model disallows the straightforward use of methods such as Grover's algorithm to search in the tree.
The first ingredient is quantum tree search. It follows from [6,7,33] that there is a quantum algorithm which, given and oracle access to a tree with depth at most d, T nodes and queries and performs O(1) other elementary operations per query, and except with failure probability at most : • If the tree contains at least one marked node, the algorithm returns the label of a marked node; • If the tree does not contain any marked nodes, the algorithm returns "not found". Jarret and Wan have described an algorithm [23] which solves the same tree search problem with complexity bounded by O( where m is the number of marked nodes. This is an improvement on (1) by up to a factor of almost d when m is small. However, if m is very large (e.g. exponential in n), this complexity bound can be larger than (1). Here, we will need to apply quantum tree search in a setting where we have no upper bound on m, which could be as large as T , which in turn can be exponentially large in n. So we will state complexity bounds based on (1), though in some cases (e.g. when T is small) the algorithm of Jarret and Wan may be more efficient.
When we use the quantum tree search algorithm we will have access to an upper bound on the size of the tree. Although, as stated above, having access to such an upper bound is not necessary, it can be seen by inspecting the proof of correctness in [33] that the algorithm is simplified somewhat given this additional information. However, this does not affect its asymptotic complexity.
The second ingredient we will need is quantum tree size estimation [2]. The quantum tree size estimation algorithm, given query access to a tree with depth at most d, T nodes and maximal degree k = O(1), and parameters T 0 , , δ, makes queries and performs O(log T 0 ) other elementary operations per query, and except with failure probability at most : 1. Set T ← 1, cold ← 0, ← /(Kd log 2 cmax) for some sufficiently large constant K.

While T ≤ Tmax:
(a) If T > Tmax/2, cnew ← cmax. Otherwise, set cnew ← 0 and for i = 1 to log 2 cmax: i. If Count cnew+cmax/2 i (T, , 1/2) does not return "contains more than T nodes", set If it returns the label of a solution, use binary search on c between cold and cnew within Searchc( ) to find the minimal c such that a solution with cost c exists, and return that solution.

Return "no solution"
Algorithm 2. Quantum branch-and-bound algorithm with failure parameter .
The restriction to k = O(1) in these algorithms is not significant, as any node with degree k can be replaced with a binary tree of depth O(log k). Hence, if each node had degree at most k, the tree size T would increase by a constant factor and the depth d would increase by an O(log k) factor, corresponding to the complexity bounds increasing by a factor polylogarithmic in d.
Let Count c (T 0 , , δ) denote the quantum tree size estimation algorithm applied to count the number of nodes in the truncated tree corresponding to the backtracking algorithm with cost bound c, where d and k are fixed; and similarly let Search c ( ) denote the quantum tree search algorithm applied to search in the truncated tree with cost bound c, where a node is marked if it corresponds to a valid solution to the original problem (i.e. was a leaf with finite cost in the original tree). Assume that we have an upper bound c max such that all valid solutions have cost strictly less than c max , and an upper bound T max ≤ k d on the size of the tree; further assume for simplicity that c max is a power of 2.
Then the quantum branch-and-bound algorithm is stated formally as Algorithm 2. The intuitive idea behind it is as follows: we want to find a cost c ≥ c min such that the size T c of the tree truncated at cost c is not much greater than T min . Given such a c, we can find a minimal-cost solution within the tree using Search c , with a complexity of O( √ T min poly(d)) queries. And to find such a c efficiently, we can perform a binary search on c using Count c , to find the maximal c such that the tree size is smaller than some upper bound, which is not much greater than T min . There is the technicality that Count c (T, , δ) may not return the correct answer for some choices of c and T . However, this turns out not to affect the correctness or performance of the binary search, because Count c (T, , δ) does always return the correct answer when the size of the tree truncated at c is sufficiently small with respect to T . The formal proof of correctness and runtime of the algorithm is deferred to Appendix B.
Sherrington-Kirkpatrick spin glass. The Sherrington-Kirkpatrick (S-K) model [40] is the family of classical Hamiltonians H(x) = 1≤i<j≤n a ij x i x j where x ∈ {±1} n and a ij are distributed according to the normal distribution N (0, 1). Let A = (a ij ) denote the corresponding square matrix where a ij = 0 for i ≥ j. Given a Hamiltonian H described by the matrix A, our computational task is to determine E min (H) := min x H(x).
Determination of the limiting form of the expected ground state energy E min := E H [E min (H)] as n → ∞ has been a question of extensive interest within the theory of spin glasses. A precise limiting expression is known for this quantity, which evaluates to E min = (−0.763167 · · · + o(1))n 3/2 . This formula was conjectured by Parisi [37] and later proven correct by Talagrand [42]. Although an explicit expression, evaluating it numerically is non-trivial; however, the constant factor is now known to many digits of precision [15,39].
Finding the ground state energy of general Ising model Hamiltonians (of the form of H with arbitrary coefficients a ij ) is NP-hard, which holds even given locality restrictions on the pairs i, j such that a ij = 0 [5]. The S-K model is a natural family of Ising model Hamiltonians, and has been a target for a number of different algorithmic approaches, both heuristic (e.g. [9,38]) and exact [22,27,28]. Although it was recently proven that ground state energies of the S-K model can be approximated efficiently [31], there is no known efficient (i.e. polynomial-time in n) method to compute them exactly.
There is a straightforward exact approach to computing E min (H) which fits into the branch-and-bound paradigm and was proposed in [22]. Variables x 1 , . . . , x n ∈ {±1} are assigned values sequentially. To determine a lower bound on the cost of any assignment beginning with a partial assignment x 1 , . . . , x , we observe that The first and second components of Bound A (x) can be computed from x in time O(n 2 ). The third component is equal to min x H (x), where H is formed from H by deleting the first rows and columns of the matrix A = (a ij ). Thus, if we have already solved the n − 1 minimisation problems obtained by restricting A to the corresponding submatrices, we can compute Bound A (x) efficiently. As the runtime of the overall algorithm is exponential in n, this additional cost does not significantly affect its overall complexity. This algorithm fits into the formal model for branch-andbound discussed above in a straightforward way: the branchand-bound tree is a binary tree, where nodes at depth correspond to -bit strings, for 0 ≤ ≤ n, and the cost function is Bound A . So the quantum branch-and-bound algorithm can immediately be applied to accelerate it quadratically. Note that cost should be non-negative and integer-valued; this can be achieved by truncating the real values a ij after p binary digits to produce a new Hamiltonian H, rescaling by 2 p , and performing an overall energy shift. It is sufficient to take p = O(log n) to achieve E min ( H) = E min (H) + o(1). This corresponds to a cost bound for the integer-valued problem c max = poly(n).
Let T A denote the size of the branch-and-bound tree corresponding to the Hamiltonian H with matrix A, using cost function Bound A , truncated optimally at cost E min (H). In Appendix C we prove that for sufficiently large n, Pr A [T A ≥ 2 0.451n ] ≤ 0.01. So for the vast majority of instances of size n, the runtime of the classical branch-and-bound algorithm is O(2 0.451n ) steps, which is already faster than Grover's algorithm. The runtime of the quantum branch-and-bound algorithm on these instances is O(2 0.226n ) steps, observing that the depth d of the branch-and-bound tree is equal to n, and log c max = O(log n), so these only contribute lower-order terms to the complexity. The constant 0.01 could be made arbitrarily small. This rigorous result is only an upper bound on the tree size of the classical algorithm (and by extension the runtime of the quantum algorithm), which may not be tight. To investigate this, a depth-first variant of the classical algorithm was implemented and run on instances of the S-K model for n ≤ 50. Extrapolation of the tree sizes obtained suggests that the true scaling of T A for random A is O(2 0.371n ), which would correspond to a quantum runtime of O(2 0.186n ). See Appendix E for further details.
Conclusions and further work. We have described a quantum algorithm which can accelerate classical branch-andbound algorithms in a very general setting. We finish by discussing potential routes to improving the results of this work. First, in some cases the square-root dependence of the runtime on T min cannot be improved; even in the special case where the cost function either evaluates to 0 or ∞, there are depthd trees for which the quantum algorithm requires Ω( √ T min d) queries to determine whether there is a leaf of cost 0 [1]. However, it might be possible to improve the depth dependence by a factor of up to d, e.g. by extending ideas of [23].
Ambainis and Kokainis [2] have given a quantum algorithm which, given a deterministic classical algorithm that explores a search tree to find a marked node and uses Q queries to do so, can find a marked node using O( √ Qd 3/2 ) queries. This improves on the quantum tree search algorithm used here in that its complexity depends on Q, rather than the size T of the whole tree. It seems unclear whether this algorithm could be applied to accelerate Algorithm 2 directly, for at least two reasons. First, the algorithm as designed also uses the Count subroutine, whose runtime depends on the entire tree size. Second, in practice any classical or quantum branch-and-bound algorithm is likely to explore the whole tree of potential solutions, in order to ensure that it has not omitted any solutions with lower cost than the current best solution.
Finally, in order to determine whether the quantum branchand-bound algorithm will genuinely outperform the best classical methods for problems of practical interest, once all overheads are taken into account, a more detailed analysis of the algorithm's runtime should be undertaken, extending previous analysis for backtracking [13].
Acknowledgements. I acknowledge support from the QuantERA ERA-NET Cofund in Quantum Technologies implemented within the European Union's Horizon 2020 Programme (QuantAlgo project), EPSRC Early Career Fellowship EP/L021005/1 and EPSRC/InnovateUK grant EP/R020426/1. This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No. 817581). I would like to thank Viv Kendon for insight into the results of [12], and Stephen Piddock for helpful discussions throughout.
To gain some intuition for how the results presented here could be applied, in this appendix we describe one simple and well-known application of branch-and-bound techniques: integer linear programming. An integer linear program (ILP) is a problem of the form: where b and c are vectors, A is a matrix, and inequalities are interpreted componentwise. Integer linear programming problems have many applications, including production planning, scheduling, capital budgeting and depot location [14]. We can solve ILPs using branch-and-bound as follows. We begin by finding a lower bound on the optimal solution to the ILP, by relaxing it to a standard linear program (LP) and solving the LP; that is, removing the constraint x ∈ Z n . This corresponds to the cost function. If the solution s is integervalued, we are done, as it corresponds to a valid solution to the ILP. Otherwise, consider an index i such that the found solution value s i is not an integer. To implement branching, we consider the two LPs formed by introducing the constraints x i ≤ s i , x i ≥ s i . At least one of these must have the same optimal solution as the original ILP. We then repeat with these new LPs. An appealing aspect of this method is that the solution to the relaxation simultaneously tells us a lower bound on the cost, and a good variable to branch on.
The sequences of additional constraints specify subsets of potential solutions to the overall ILP. The branch and cost functions take this sequence as input and solve the resulting LP, to make a decision about which variable to branch on next, and compute a lower bound on cost, respectively. The complexity of the LP-solving step is polynomial in the input size, so the primary contribution to the overall runtime will in general be the exponential scaling in terms of the number of branching steps. A standard classical method could be used (e.g. the simplex algorithm), or one of the recently developed quantum algorithms for linear programming [3,4,10,11,26].
A particularly simple and elegant special case of this approach is the knapsack problem. Here we are given a list of n items, each with weights w i and values v i , and an overall weight upper bound W . We seek to find a subset S of the items that maximises i∈S v i , given that i∈S w i ≤ W . We can write this as an integer linear program as follows: Each variable x i corresponds to whether the i'th item is included in the knapsack. Then the LP relaxation is simply to replace the constraint x i ∈ {0, 1} with the constraint 0 ≤ x i ≤ 1 for all i. This is equivalent to allowing fractional amounts of each item to be included.
The branch-and-bound approach to solving ILPs can immediately also be applied to the generalisation to Mixed Integer Linear Programming, where only certain variables are constrained. Now we only branch on those variables which are forced to be integers. One can also apply it to "branch and cut" algorithms. In this approach, when the LP relaxation returns a non-integer-valued solution, one may also add a new constraint (hyperplane) which separates that solution from all integer-valued feasible solutions.

Appendix B: Analysis of Algorithm 2
In this appendix we prove the correctness and the claimed runtime bound of Algorithm 2. Proof. We first show that the algorithm succeeds with probability at least 1 − . The loop executes at most O(d) times, so each of Count and Search is used at most O(d log c max ) times. By a union bound, it is sufficient to pick = O( /(d log c max )) to ensure that all the uses of Count and Search succeed, except with total probability at most . So we henceforth assume that Count and Search do always succeed.
If this is the case, we first observe that the algorithm always correctly outputs a minimal-cost solution, if one exists, or otherwise "no solution". This is because at the final iteration (when T > T max /2), if no solution has previously been found then Search will explore the entire tree and find a solution if one exists. To see that it outputs a minimal-cost solution, note that the binary search on c using Search is over the range [c old , c new ], and c old is no larger than the largest value of c new previously computed, so any solution with cost smaller than c old would have been found in a previous iteration.
It remains to prove the runtime bound. Let T c denote the size of the truncated tree with cost bound c (so T min = T cmin ). The first binary search (in part 2a) executes Count c O(log c max ) times, each iteration using O( √ T d log 2 (1/ )) queries; and the second binary search executes Search cnew O(log c max ) times, where each iteration uses O( T cnew d 3/2 log d log(1/ )) queries. At each iteration of the loop, after the binary search using Count c , T cnew ≤ 3T /2 by correctness of the quantum tree size estimation algorithm. Further, at the first iteration when T ≥ 3T min /2 (if such an iteration occurs), for all c ≤ c min , Count c does not return "contains more than T nodes". This implies that c new ≥ c min , because as the binary search terminated at cost c new , Count cnew+1 must have returned "contains more than T nodes". Note that this holds even though Count c can return an arbitrary outcome when T c ∈ (2T /3, 3T /2].
Therefore, at this iteration the tree truncated at cost c new contains a minimal-cost solution, which will be found by the binary search on c using Search c , and the algorithm will terminate. On the other hand, if there is no iteration such that T ≥ 3T min /2, we must have T min > 2T max /3. Combining these two claims, we have T ≤ 3T min throughout the algorithm. The loop over exponentially increasing values of T does not affect the overall complexity bound, so the overall complexity is queries, as claimed.
We remark that it seems that, in general, Algorithm 2 could not be replaced with simply using the Search subroutine with exponentially increasing values of the cost parameter (an approach taken in [34] for the special case of accelerating backtracking algorithms for the travelling salesman problem). This is because increasing the cost at which the tree is truncated by a constant factor could increase the size of the truncated tree substantially beyond T min .
Appendix C: Truncated tree size bound for Sherrington-Kirkpatrick model In this appendix, let T A denote the size of the tree corresponding to the classical branch-and-bound algorithm applied to find the ground-state energy of an Ising Hamiltonian H corresponding to an n × n matrix A, using the bounding function Bound A described in the main text, where the tree is truncated at the optimal value c min .
We will prove the following result: Theorem 2. Let A be an n × n matrix corresponding to a Sherrington-Kirkpatrick model instance on n spins. For all sufficiently large n, The dominant term in the quantum complexity is the square root of the classical complexity, which is determined by T A , so Theorem 2 implies that the quantum branch-andbound algorithm has an O(2 0.226n ) running time on 99% of Sherrington-Kirkpatrick model instances.
In order to prove Theorem 2, we will need two technical lemmas, proven in Appendix D. Then Lemma 3 was shown in [29] but with an incorrect constant. We will also need a bound on the expectation E A [min z∈{±1} n z T Az]. A precise value for this is known as n → ∞, but we will need a bound that holds for arbitrary n: We are now able to prove Theorem 2. The basic strategy is to upper-bound the expected value of T A , using that (by linearity of expectation) this can be expressed as a sum over all bit-strings x ∈ {±1} , 0 ≤ ≤ n, of the probability that the node corresponding to x is contained within the truncated branch-and-bound tree. These bit-strings x are precisely those such that Bound A (x) ≤ min z∈{±1} n z T Az, and a tail bound can be used to upper-bound the probability that this event occurs.
There are two technical difficulties which need to be handled. First, this approach does not give a good upper bound in the case where min z∈{±1} n z T Az is high, which can occur with non-negligible probability, leading to E A [T A ] becoming large. We therefore handle this case separately and show that it occurs with low probability. Next, to find a tail bound on Bound A (x), we need to compute expressions of the form E A [min z∈{±1} n− z T Az]; although a limiting form for this is known [37,39,42], we will additionally need relatively tight bounds in the case ≈ n. We therefore split into cases ≤ 0.9n (where (n − ) → ∞ and we can use the precise limiting result) and > 0.9n (where we use Lemma 4).
Proof of Theorem 2. Write µ = E A [min z∈{±1} n z T Az], and let γ > 0 be an arbitrary value to be determined. We will upperbound the probability that T A ≥ B for some B as follows, where we use the notation [Y ] for the indicator random variable which evaluates to 1 if Y is true, and 0 if Y is false: First assume that 0.4n ≤ ≤ 0.9n, so (n − ) → ∞ as n → ∞. For any x ∈ {±1} , we have where we use linearity of expectation to obtain the first expression, that i=1 a ij ∼ √ N (0, 1), and the known limiting result [37,39,42]. Writing α = /n, we have that On the other hand, for ≥ 0.9n, we follow a similar argument but apply the nonasymptotic result of Lemma 4 to bound In either case, we have By (C2), using µ = (−0.763167 · · · + o(1))n 3/2 and observing (see Figure 3) that E A [Bound A (x)] > µ + γn 3/2 for sufficiently large n, so the right-hand side is negative as required, we have 2 αn e −(g1(α)+0.763···+o (1) This can easily be achieved numerically, giving (see Figure 4) the result that h 1 (α) < 0.45003 for 0 ≤ α ≤ 1 and h 2 (α) < 0.45003 for α ≥ 0.9. Hence  where we use the bound ∞ a e −x 2 /2 dx ≤ 1 a e −a 2 /2 for any a > 0 in the second inequality.

Appendix E: Classical numerical branch-and-bound results
We implemented the classical branch-and-bound algorithm described in the main text, with cost function Bound A , using a simple depth-first search procedure within the branchand-bound tree which backtracks on nodes corresponding to partial solutions with an energy bound worse than the lowest energy seen thus far. For an S-K model instance described by a matrix A, this gives an upper bound on the size T A of an optimally truncated branch-and-bound tree (equivalently, on the runtime of the best-first search algorithm applied to find the ground state energy, with cost function Bound A ).
This algorithm enabled instances on more than 50 spins to be solved within minutes on a standard laptop computer. We then carried out a least-squares fit on the log of the number of nodes explored, omitting small n, to estimate the scaling of the algorithm with n. Note that, due to finite-size effects, this may not be accurate for large n; however, it gives an indication of tree size scaling. The median normalised ground state energy found for the larger values of n (e.g. ≈ −0.71 for n = 50) seems to approach the limiting value −0.763167 . . . relatively slowly. These results are consistent with heuristic finite-size results reported in [9] and were validated using exhaustive search for small n.