Quantum optimization for combinatorial searches

I propose a `quantum annealing' heuristic for the problem of a combinatorial search among a frustrated set of states characterized by a cost function to be minimized. The algorithm is probabilistic, with post-selection of the measurement result. A unique parameter playing the role of an effective temperature governs the computational load and the overall quality of the optimization. Any level of accuracy can be reached with a computational load independent of the dimension N of the search set by choosing the effective temperature correspondingly low. This is much better than classical search heuristics, which typically involve computation times growing as powers of log(N).


26.2
have computational requirements proportional to small powers of n. The price for this speed-up is that these methods are not guaranteed to find the true minimum-cost state but provide only a near-optimal solution. Some of the best known classes of such optimization heuristics are simulated annealing [8] and genetic algorithms [9].
In order to generalize Grover's result to quantum combinatorial searches a quantum optimization algorithm is needed. Such an algorithm has been proposed by Dürr and Hoyer [10]. It has almost sure success in bounded time O( √ N ), where N is the dimension of the set to be searched. Another approach to quantum optimization is, instead, to construct quantum analogues of classical heuristic algorithms. In this case one might expect both a speed-up of the above exact quantum result due to the approximate nature of the procedure and an improvement upon the behaviour of classical counterparts due to the quantum nature of the algorithm. In this paper I will show that this is indeed the case.
A first proposal in this direction was recently made in [11], where a deterministic quantum optimization was presented. Quantum algorithms are deterministic if only unitary operations are performed. On the other hand there are also probabilistic algorithms, in which intermediate measurements are performed in addition to unitary operations, with post-selection of the measurement result. These are called probabilistic since the desired result is produced only with a certain probability and repetitions are thus necessary, a paramount example being probabilistic cloning [12]. Here I will propose a probabilistic quantum optimization algorithm.
The first step is to encode the elements of the search set on states of n qbits (quantum bits). Let us assume there are N = O(2 n ) such elements, corresponding each to a binary number I k between 1 and 2 n . One can then use the algorithm of [13], or its simplified version presented in [4], to store a superposition of all instances in a single quantum state of n qbits: Next one must identify the cost function and represent it as a function C(q 1 , . . . , q n ) of the n bits. The imaginary exponential of this function has then to be realized with quantum gates [1] as a unitary operator on the state |S . In general, this poses problems for the feasibility of quantum optimization algorithms since it is not guaranteed that exp(iC) can be realized with only simple gates involving a few qbits. To avoid this problem I will assume here that the cost function can be represented by a truncated expansion of terms involving at most m bits. This is actually not a big restriction, since most combinatorial search problems admit a representation of this type. As an example I mention the random graph partitioning problem of dividing an even number V of vertices pairwise connected with probability p by a set E of edges into two sets V 1 and V 2 of equal size, such that the number of edges joining the two sets is minimal. As shown in [14], the cost function given by the number of edges joining V 1 and V 2 can be represented as where and J ij = 0 otherwise. The last term is a soft implementation of the antiferromagnetic constraint i s i = 0.

26.3
I will denote by C min and C max the strict lower and upper bounds for the cost function, The unitary operator necessary for quantum optimization is then For a cost function of the form (2), this operator can be realized on |S as where G k are diagonal k-qbit gates given by and the subscripts denote generically the qbits on which operators are applied. For m not too large, the unitary operator U is thus feasible, since it can be realized with simple quantum gates involving only few a qbits.
Having introduced the two building blocks of quantum optimization, the search state |S and the unitary operator U , I will proceed to the description of the optimization algorithm proper. This involves, in addition to the n qbits in state |S , also a second register with b control qbits |c 1 , . . . , c b , all initially in state |0 . The initial quantum state is thus given by Applying the Hadamard gate [1] to the first control qbit one obtains At this point I need to introduce the controlled gate which realizes on the search state |S the unitary transformation U if the control qbit c is in state |0 and the unitary transformation U −1 if control qbit c is in state |1 . This can be realized as 26.4 where CG k −2 is the standard controlled G k −2 gate, realized only if the control qbit is in state |1 [1]. This shows that also U ± is feasible, since at most (m + 1)-qbit gates are involved. Applying U ± c 1 S to |ψ 1 gives Note that the cost function determines the relative phase of the search states. This is a generalization of the bit flip in Grover's algorithm [3], where the cost function takes only the values 0 or 1 (or a constant). The following concentration of amplitude on low-cost states, instead, is a totally different mechanism than the diffusion operator acting in Grover's algorithm.
Applying again the Hadamard gate H to the first control qbit c 1 one finally obtains Essentially, the steps H c U ± cS H c represent the quantum equivalent of the classical evaluation of the cost function on a search state. Here, the cost function is evaluated on all possible search states at the same time.
This evaluation has now to be repeated b times for all control qbits c 1 to c b , giving the final result where {J i } denotes the set of all binary numbers of b bits with exactly i bits 1 and (b − 1) bits 0. Note that the overall effect of the b operators H c U ± cS H c is an amplitude concentration on low-cost search states for such complete states which have a large number of 0 control qbits and an amplitude concentration on high-cost search states if there are many control qbits with value 1. This is the core of the deterministic part of the quantum optimization procedure, which is concluded here.
At this point one proceeds to a measurement of the control register. Given that the amplitude is most concentrated on low-cost states when all control qbits are in state |0 one retains the resulting projected state only if the control register is measured in state |0 1 , . . . , 0 b . In general this entails some repetitions of the deterministic transformation described above and of the measurement until this state is obtained. The expected number of these repetitions is 1/P 0 b , where P 0 b is the probability that |c 1 , . . . , c b = |0 1 , . . . , 0 b : Once established that the control register is in the desired state one can proceed to a measurement of the search state |S . This measurement will yield state |I k with a probability

26.5
which is peaked on the low-cost states, exactly as desired for an optimization heuristic. Overall, the quantum optimization procedure thus consists of a series of independent trials, each of which returns a set of values for the control qbits. As soon as one obtains the desired values for these control qbits one can proceed to measure the search state, with a high probability of selecting a low-cost state.
Completing the specification of the algorithm requires selecting a value for the number b of control qbits. Unfortunately, there is no general rule to select the best value of b, since this depends on the problem at hand. It is important, however, to point out that there is a generic trade-off between the advantages and disadvantages of high and low values of b. Selecting a high value of b clearly enhances the probability of finding the true minimum-cost state, since the probability distribution P b becomes more and more peaked towards the low-cost states: where k min is the index of the minimum-cost state (assumed for simplicity to be unique). On the other hand, however, high values of b make the probability P 0 b of measuring all control qbits in state |0 lower, thus increasing the expected number of repetitions of the deterministic part of the algorithm before one obtains the desired values of the control qbits permitting one to proceed.
For the purpose of comparing with classical algorithms, a measure of the computational load of a combinatorial search heuristic can be taken as the number of times the cost function has to be evaluated. For classical algorithms this usually scales as n or a small power of n, in order to obtain good-quality results. Quantum parallelism, instead, allows one to evaluate the cost function in all instances at the same time. The price to pay is the expected number 1/P 0 b of repetitions of this overall evaluation in order to obtain the correct state for a measurement. These repetitions are, however, harmless, since their number is independent of n for large n. This follows from the fact that the probability P 0 b in (16) has a finite, non-vanishing large-n limit, given that 0 < C nor (I k ) < 1 for all I k .
As a consequence, the computational load of quantum optimization is determined entirely by the parameter b. The role of this parameter can be better understood by examining closer equations (17) and (18). The quantum distribution described by these equations is equivalent to a canonical Boltzmann distribution with (dimensionless) effective temperature t = 1/b and (dimensionless) energy levels given by with Z in equation (18) playing the role of the partition function. The relation between the unbounded, positive energies E entering the effective thermal distribution and the bounded, normalized cost function simplifies in the two limits of low and high cost: As expected, the deviation is largest for high-cost configurations: the logarithmic transformation maps the region near the bound 1 of C nor to the positive axis for E. The appearance of an effective thermal distribution highlights the analogy between this quantum optimization procedure and simulated annealing. In this classical search heuristic, one approaches a low-cost state by lowering the temperature in a simulated thermal ensemble 26.6 generated by an appropriate number of Monte Carlo steps. In the quantum optimization algorithm proposed here one obtains a low-cost configuration by choosing the effective temperature t = 1/b low enough. This can be tuned by adding an appropriate number of control qbits.
As in classical simulated annealing, one can use the effective thermal ensemble to derive the average behaviour of the optimization. As first pointed out in [8], this is a better measure of the heuristic performance than a worst-case analysis when the size of the problem becomes large. Following the classical approach [15] I shall thus concentrate on the free energy F defined by where I have chosen a normalization such e −bF (b) describes the deviation of the partition function from its value for b = 0. Since Z/2 n possesses a finite, non-vanishing large-n limit, as explained above, this normalization ensures that F (b) is intensive, exactly like the energy levels (21) and scales as a constant for large n. The free energy describes the equilibrium of the system at effective temperature t = 1/b and has the usual expression in terms of the internal energy U and the entropy S, By inverting equation (20) one can then also define an effective cost function C(t) at temperature t: This corresponds exactly to representing the probability (16) as which can be taken as the primary definition of the effective cost function C.
At t = ∞ all configurations I k contribute equally to the partition function and thus C(t = ∞) is a non-linear function of the average cost computed from equation (2). At t = 0 only the optimal configuration survives in the partition function and C(t = 0) is thus exactly the minimum cost, C(t = 0) = C opt . In general one can write with ∆(t) representing the average gain due to the optimization at effective temperature t. A measure of the accuracy of the optimization is then given by By construction this is independent of n to leading order. Any level of accuracy can thus be reached by tuning the effective temperature t to values low enough, independently of n.
The computational load is determined by b = 1/t and is thus also independent of n. In other words one can define a proper thermodynamics by taking the limit n → ∞ in equations (17) and (18). In this limit one is left with the parameter t alone: this determines both the accuracy via (27) and the computational load via b = 1/t.

26.7
The quantum optimization algorithm described here represents a huge improvement upon the exact quantum search for the minimum [10], which has a computational load of √ N , with N = 2 n . The price to pay is the approximate character of the solution. It is this approximation which allows the improvement without violating known bounds for exact quantum results [16]. My quantum optimization procedure is also much faster than classical search heuristics, which typically involve computation times growing as small powers of log(N ). The reason here lies in quantum parallelism. This is seen most explicitly by comparing with classical simulated annealing: in this algorithm a thermal distribution has to be simulated by computation at each temperature. This involves long relaxation times which already constitute one source of the log(N ) computational load. Due to quantum parallelism, instead, the whole thermal distribution is generated in one go.
Let me conclude by mentioning a particularly interesting case. This arises when the effective thermal distribution undergoes a (first order) phase transition at t = t cr . In this case one has C(t) = C(∞) for t > t cr , while for t < t cr the system is frozen into a 'quantum solid state' with C(t) rapidly approaching its limiting value C(0). An example of this phenomenon in the framework of quantum pattern recognition will appear in a forthcoming publication.