Enhancing the efficiency of quantum annealing via reinforcement: A path-integral Monte Carlo simulation of the quantum reinforcement algorithm
A. Ramezanpour

TL;DR
This paper demonstrates through path-integral Monte Carlo simulations that quantum reinforcement can significantly improve the success probability of quantum annealing in solving hard combinatorial problems.
Contribution
It introduces a local quantum reinforcement algorithm and shows its potential to enhance quantum annealing efficiency for constraint satisfaction problems.
Findings
Quantum reinforcement increases success probability of quantum annealing.
The local reinforcement algorithm performs well on XORSAT problems.
Results suggest potential for larger problem sizes and classical optimization applications.
Abstract
The standard quantum annealing algorithm tries to approach the ground state of a classical system by slowly decreasing the hopping rates of a quantum random walk in the configuration space of the problem, where the on-site energies are provided by the classical energy function. In a quantum reinforcement algorithm, the annealing works instead by increasing gradually the strength of the on-site energies according to the probability of finding the walker on each site of the configuration space. Here, by using the path-integral Monte Carlo simulations of the quantum algorithms, we show that annealing via reinforcement can significantly enhance the success probability of the quantum walker. More precisely, we implement a local version of the quantum reinforcement algorithm, where the system wave function is replaced by an approximate wave function using the local expectation values of the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Enhancing the efficiency of quantum annealing via reinforcement: A path-integral Monte Carlo simulation of the quantum reinforcement algorithm
A. Ramezanpour
Physics Department, College of Sciences, Shiraz University, Shiraz 71454, Iran
Leiden Academic Centre for Drug Research, Faculty of Mathematics and Natural Sciences, Leiden University, Leiden, The Netherlands
Abstract
The standard quantum annealing algorithm tries to approach the ground state of a classical system by slowly decreasing the hopping rates of a quantum random walk in the configuration space of the problem, where the on-site energies are provided by the classical energy function. In a quantum reinforcement algorithm, the annealing works instead by increasing gradually the strength of the on-site energies according to the probability of finding the walker on each site of the configuration space. Here, by using the path-integral Monte Carlo simulations of the quantum algorithms, we show that annealing via reinforcement can significantly enhance the success probability of the quantum walker. More precisely, we implement a local version of the quantum reinforcement algorithm, where the system wave function is replaced by an approximate wave function using the local expectation values of the system. We use this algorithm to find solutions to a prototypical constraint satisfaction problem (XORSAT) close to the satisfiability to unsatisfiability phase transition. The study is limited to small problem sizes (a few hundreds of variables), nevertheless, the numerical results suggest that quantum reinforcement may provide a useful strategy to deal with other computationally hard problems and larger problem sizes even as a classical optimization algorithm.
I Introduction
Finding a solution to a computationally hard constraint satisfaction problem becomes more difficult for a typical instance of the problem as one approaches the phase transition from a satisfiable (SAT) to unsatisfiable (UNSAT) phase sat-nature-1999 ; sat-science-2002 ; in the SAT phase, with high probability there is a solution to the problem satisfying all the constraints, whereas in the UNSAT phase there is no solution to the problem with high probability. A reinforcement algorithm tries to find a solution to the problem by utilizing the information that is obtained from the system at each step of the algorithm. This provides a class of powerful classical reinforcement algorithms to deal with such problems SB-book-1998 ; BZ-prl-2006 . In this paper, we show that adding reinforcement to the standard quantum annealing algorithm is helpful in the study of a prototypical constraint satisfaction problem. More precisely, we observe that a path-integral Monte Carlo simulation of the quantum reinforcement algorithm gives much higher success probabilities than the simulated quantum annealing algorithm.
The presence of strong and long-range correlations between the problem variables, due to a spin glass or a freezing phase transition gibbs-pnas-2007 ; semerjian-jstat-2008 ; gibbs-pre-2008 ; clustering-prl-2005 ; clustering-jstat-2008 , is responsible for the computational complexity of a constraint satisfaction problem close to the SAT-UNSAT transition. It means that to obtain efficient approximation algorithms, we should be able to extract efficiently the global information that is relevant to the problem, from the system of interacting variables. For instance, the Gaussian elimination algorithm provides an efficient way of solving a set of linear equations over binary variables, which is known as the XOR-satisfiability (XORSAT) problem xor-prl-2001 ; xor-pre-2001 . See also Ref. qxor-prl-2009 for a quantum algorithm for the XORSAT problem. Nevertheless, it is very difficult to write the Gaussian elimination algorithm in a form that is amenable to local message-passing algorithms MM-book-2009 . Another example in this direction is provided by Ref. entropy-jstat-2016 , where the entropy, or number of solutions in a region around a point in the configuration space, is estimated at each step to guide the search algorithm. Here, the entropy is playing the role of the global information that is used by the algorithm. The main problem is that obtaining good estimations of the relevant global quantities and writing this computation in a locally manageable way is usually difficult. There are, however, special examples, where the global constraints can be treated exactly and efficiently via message passing along a spanning tree of the interaction graph globalgame-2011 ; sign-prb-2012 .
In a previous study QR-pra-2017 , we introduced a quantum reinforcement algorithm, which uses the global information contained in the wave function of the system in a quantum annealing algorithm. More precisely, we considered a continuous-time quantum random walk in the configuration space of the classical optimization problem ALZ-pra-1993 ; K-cp-2003 ; A-jqi-2003 . At the beginning of the algorithm, the on-site energies at each point of the configuration space are given by the energy function of the classical problem. These on-site energies are gradually modified according to the wave function of the evolving quantum system to localize preferentially the wave function on a solution to the classical problem. Using exact numerical simulations of small systems, we showed that such quantum feedback increases the minimal energy gap of the quantum system in a quantum annealing algorithm, and therefore could be useful in the study of hard optimization problems F-sci-2001 ; NC-book-2002 .
Notice that the quantum reinforcement algorithm results in a nonlinear Schrodinger equation, and it is known that one can efficiently solve a computationally hard problem with nonlinear quantum mechanics lloyd-prl-1998 . In addition, we know that the standard quantum annealing algorithm is frustrated by the exponentially small energy gaps of the system in the annealing process AHJ-pnas-2010 ; qxor-prl-2010 ; qxor-pre-2011 ; qxor-pra-2012 . There are remedies to this problem that work by adding auxiliary interactions to the Hamiltonian to suppress the spoiling quantum transitions in the annealing process B-jpa-2009 ; C-prl-2013 . These auxiliary interactions are highly nonlocal, but good approximation algorithms can still be obtained by replacing the nonlocal Hamiltonians with effective local Hamiltonians localCA-pra-2014 ; localCA-pnas-2017 .
In this paper, we show that the local versions of the quantum reinforcement algorithm work also for larger problem sizes. To this end, we resort to quantum Monte Carlo simulations of the algorithm, using the path-integral representation of the quantum system at equilibrium for sufficiently low temperatures tosatti-prb-2002 ; pathMC-prb-2008 ; QC-prep-2013 . We apply the algorithm to the XORSAT problem close to the SAT-UNSAT phase transition, where the problem is expected to be hard for a local algorithm. We compare the performance of the quantum reinforcement algorithm with that of the standard quantum annealing algorithm for problems with a few hundreds of variables. We observe considerable improvements in the success probability of the algorithms by adding reinforcement to the quantum annealing algorithm. Note that our previous study QR-pra-2017 was limited to small problem sizes and exact numerical simulations of a fully connected spin-glass model. Moreover, in that study we could not observe the superior performance of the quantum reinforcement algorithm in larger systems, compared to the standard quantum annealing.
The paper is organized as follows. In Sec. II we define the problem in more detail. Then we briefly review the quantum reinforcement algorithm and its local approximations in Sec. III. The path-integral Monte Carlo simulation of the algorithms is described in Sec. IV. Section V is devoted to the presentation of the numerical results, and finally Sec. VI gives the conclusions.
II Problem statement and definitions
We consider the classical optimization problem of minimizing an energy function of binary spins . As the benchmark, we take the random regular XORSAT problem MM-book-2009 , with
[TABLE]
Here, is the number of -spin interactions and with equal probability. The subset of spins involved in interaction are denoted by . The interactions are selected randomly and uniformly from the set of all possible -spin interactions. The interaction graph is regular in the sense that each interaction term involves exactly spins, and each spin is associated with exactly interactions.
A solution to this problem is a spin configuration with energy zero, where for all the . The problem is called satisfiable if there is at least one solution to the problem. It is well known that the problem is satisfiable (SAT) with high probability for , and unsatisfiable (UNSAT) for MM-book-2009 . Moreover, the problem is computationally easy and belongs to the complexity class ; this means that we can decide if the problem is SAT or UNSAT in a computation time that grows polynomially with the size of the problem (). In addition, as long as the problem is satisfiable, a solution can easily be obtained by the Gaussian elimination algorithm. To be specific, we consider random regular XORSAT problems with parameters . We know that for these values of and the solution space is clustered and it is computationally difficult to find a solution by a local algorithm such as the Markov Chain Monte Carlo xor-prl-2001 ; xor-pre-2001 ; MM-book-2009 . It is also known that we need an exponentially large computation time to find the ground state of the XORSAT problem by the standard quantum annealing algorithm qxor-prl-2010 ; qxor-pre-2011 ; qxor-pra-2012 .
We shall use a continuous-time quantum random walk to explore the space of spin configurations . The space is a hypercube of sites corresponding to the total number of spin configurations. The Hamiltonian for a particle walking in the energy landscape of the classical optimization problem is given by
[TABLE]
The parameter determines the strength of tunneling from to a neighboring state . Here, denotes the spin state which is different from only at site . In terms of the quantum spin variables (Pauli matrices), the above Hamiltonian reads as follows,
[TABLE]
The basis states are the -spin states with definite values, that is, .
Starting from an initial state , the time evolution of the isolated system is governed by the Schrodinger equation with . In the following, we shall assume that the system is always in thermal equilibrium with a thermal bath at a sufficiently small temperature. At equilibrium, the physical properties of the system are obtained from the quantum partition function , for a large inverse temperature .
III Quantum Reinforcement Algorithm
In this section we briefly review the quantum reinforcement algorithm introduced in Ref. QR-pra-2017 . The goal is to find a solution to the classical optimization problem by following the time evolution of the quantum system. A quantum annealing (QA) algorithm F-sci-2001 starts from the ground state of and changes slowly the Hamiltonian to . The adiabatic theorem then ensures that in the absence of level crossing, the system follows the instantaneous ground state of the time dependent Hamiltonian . The annealing parameter changes slowly from zero at to one at . In the following, we shall assume that .
In a quantum reinforcement (QR) algorithm, we add a reinforcement term to the Hamiltonian which favors the spin states of higher probability QR-pra-2017 . More precisely, the Hamiltonian is , where the reinforcement term reads as follows,
[TABLE]
Here, refers to the wave function of the quantum system. The reinforcement parameter is zero at the beginning and is expected to grow slowly with time.
III.1 Local approximations of the algorithm
To obtain a local version of the QR algorithm, we first replace the with , which is an increasing function of the probability distribution. On the other hand, we can always write , taking into account all the possible multispin interactions with complex couplings . Consequently, and is the normalization constant. The coupling parameters can in principle be determined from the expectation values inverse-advanc-2017 . A one-local quantum reinforcement (-lQR) algorithm then is obtained by approximating the wave function with a product state,
[TABLE]
The reinforcement fields depend on the average spin values through . More accurate approximations of the wave function and the quantum reinforcement algorithm can be obtained by considering the two-spin interactions in the expansion. This gives a two-local quantum reinforcement (-lQR) algorithm. Similarly, one obtains the higher-order approximations. The interaction pattern of the random regular XORSAT problem, however, suggests a -local reinforced Hamiltonian, where
[TABLE]
In the following, we shall focus mainly on the -lQR algorithm.
IV The simulated quantum reinforcement algorithm
Let us consider the one-local QR Hamiltonian with . In the following, we ignore the constant term in the energy function of the classical problem. Using the Suzuki-Trotter decomposition for the partition function , we get
[TABLE]
Here, shows different imaginary times, and is the number of imaginary-time slices. Note that we are using the periodic boundary condition, i.e., . The bold symbols show the spin values for a given imaginary time . On the other hand, the vector displays the spin values at site for different imaginary times.
Specifically, the partition function for our problem can be written as
[TABLE]
where we defined . This defines a positive probability measure for the spin configuration (for positive ) which can be used in a standard Monte Carlo (MC) simulation. In each step of the Monte Carlo, we replace the imaginary spin values with , which is sampled from the following probability distribution,
[TABLE]
This is a one-dimensional problem and the new configuration can easily be obtained by the transfer-matrix method QC-prep-2013 . Here, we use the belief propagation (BP) algorithm for this task. The BP algorithm is explained with more details in the Appendix. More precisely, the new spin values are obtained one by one with a decimation algorithm; at each step the value is sampled from the marginal probability distribution , which is computed by the BP algorithm conditioned on the values of the previously decimated spins. In each Monte Carlo sweep, the spin vectors are chosen in a random sequential way and are updated according to the above procedure.
Having a quantum Monte Carlo simulation, the simulated QR algorithm starts with a random spin configuration , where with equal probability. We set the reinforcement parameter and couplings , at time step . Then, for each time step we do the following:
Perform Monte Carlo sweeps for equilibration. 2. 2.
Use the last sweeps to estimate the averages . 3. 3.
Update the reinforcement couplings . 4. 4.
Increase the reinforcement parameter . 5. 5.
Compute for . 6. 6.
Report the minimum energy and stop if .
The partition function for the -local QR Hamiltonian is obtained simply by adding the extra reinforcement term, i.e., , to the energy function of the replicated system . The simulation of the -local QR algorithm is similar to the -local QR algorithm except in steps and . Here, in addition to the in step , we need also to compute the average values , and in step , we have to solve the inverse problem of computing the and from the expectation values and . In the Appendix, we describe an approximate algorithm to deal with this inverse problem inverse-advanc-2017 . The idea is to start from and change slightly the parameters depending on the difference in the associated expectation values, i.e. , for a positive and small . We compute the expectation values by the BP algorithm with the parameters . After each step the old parameters are replaced with the new ones, and the process is repeated for steps.
For comparison, we also simulate the standard quantum annealing algorithm with Hamiltonian . Here, we do not have the reinforcement terms in the energy function of the replicated system. Instead the energy function and are replaced with and , respectively. The algorithm is similar to but simpler than the -local QR algorithm, in that steps are replaced with one step which updates . As before, we start from a random spin configuration. Note that at the beginning of the algorithm () we have a system of independent spins , and in each MC sweep, we replace all spins with new ones from the equilibrium probability distribution. Therefore, the first MC sweeps are enough to equilibrate the system at the beginning of the algorithm, even for a sufficiently large inverse temperature .
V Numerical Results and Discussion
In this section we compare the performances of the algorithms introduced in the previous section. As the benchmark, we take the problem of minimizing the energy function of the random regular XORSAT problem with parameters . Let us start from comparing the success probability of the -local QR algorithm with that of the standard QA algorithm.
Figure 1 shows the success probability of the two algorithms for different relevant parameter values in the algorithms. The success probability here refers to the fraction of times that an algorithm provides a zero-energy spin configuration satisfying all the constraints. Each time we take an independently generated random instance of the problem, which is identified with the random structure of the interaction graph and the random values of the couplings . We run the algorithms for a sufficiently large number of problem instances to obtain a reasonable stationary value for the success probability. The number of samples ranges from a few hundreds to at most ten thousands depending on the problem size, As expected, we observe that decreases exponentially with the problem size . The QR algorithm, however, exhibits much better performances than the QA algorithm for different parameter values. We recall that by adding the reinforcement to the Hamiltonian we are in fact increasing the minimal energy gap of the system in the annealing process QR-pra-2017 ; that is because the reinforced Hamiltonian is assigning lower energies to the more probable states.
Figure 2 displays more results from the -local QR algorithm to see how the algorithm parameters affect the success probability. Note that for the best performances are observed for (i.e., ). Moreover, the behavior of the algorithm is not very sensitive to the values of and . In Fig. 3, we compare the efficiencies of the -local and -local QR algorithms for a larger number of imaginary-time slices and longer annealing times. We observe a small improvement in the success probability and computation time of the local QR algorithm by considering the -local interactions in the wave function. Here, the quality of the approximate inverse algorithm in the -local algorithm is very crucial. The difference in the performances of the two local algorithms is expected to be more pronounced if we employ more accurate inverse algorithms. Finally, for comparison, in Fig. 4 we also report the success probability of a powerful classical optimization algorithm (reinforced BP), which is described in the Appendix. This shows that by adding a local reinforcement to the quantum annealing algorithm, one can achieve performances that are better than or comparable to those of the classical algorithm.
VI Conclusion
We employed the path-integral quantum Monte Carlo to simulate the behavior of the quantum reinforcement algorithms in optimization of a hard constraint satisfaction problem. We observed that local quantum reinforcements can significantly improve the success probability of the standard quantum annealing algorithm. The performance of the simulated quantum reinforcement algorithm can systematically be improved by considering more accurate representations of the system wave function (e.g., tensor networks tn-siam-2008 ; tn-anp-2014 ; tn-arxiv-2018 ) in the annealing process, and by utilizing more efficient approximations for estimating the wave-function parameters from the measurements.
In this paper, we assumed the quantum system is close to the thermal equilibrium as the Hamiltonian changes with time. This means that in practice the equilibration time should be smaller than the time scale of changing the Hamiltonian. Moreover, we did not consider the effect of measurements, which are needed for implementing the reinforcement, on the quantum state of the system. In this sense, the simulated quantum reinforcement algorithm which was presented in this paper is closer to a classical optimization algorithm. A more realistic simulation of the quantum annealing process with reinforcement, should consider an open quantum system which also interacts with a classical (or even quantum) controller. The controller is to adjust the reinforcement Hamiltonian, which depends on the outcomes of the necessary (weak) measurements, e.g., measurements of the local magnetizations DK-pra-1999 ; Qestimation-prl-2006 ; Qcontrol-book . This is the subject of our future study.
There are quantum annealers that provide hardware support for solving an optimization spin-glass problem qa-nature-2011 ; qa-nc-2013 . An experimental implementation of the quantum annealing algorithm on such devices first needs a mapping of the optimization problem to the Ising model with two-spin interactions lucas-fn-2014 . In addition, one also needs to embed the interactions of the Ising Hamiltonian onto the interaction graph of the specified device. Each of the above steps requires a polynomial number of auxiliary spins to be added to the system, and thus increases the size of the necessary device choi-qi-2008 ; choi-qi-2011 ; sg-prx-2015 . The quantum reinforcement algorithm could increase this complexity by adding other ancillary spins to the system for an indirect or weak measurement of the local magnetizations and correlations.
Appendix A Bethe approximation and Belief Propagation (BP) equations
Consider an interacting system of binary variables with the following energy function
[TABLE]
The interaction pattern of the variables is identified with the neighborhood subsets and . Here, gives the set of variables in constraint , and is the set of constraints involving variable . The partition function for this problem reads as follows,
[TABLE]
where the inverse temperature parameter is absorbed in the couplings .
Assuming that the interaction graph is locally treelike, the local averages and can be written in terms of the cavity probabilities MM-book-2009 ,
[TABLE]
Here is the probability of state for variable in the absence of interaction , and is the message that variable receives from interaction factor to satisfy the interaction. The and are normalization constants. The cavity messages are governed by the Bethe equations,
[TABLE]
with the normalization constants and . The cavity equations are solved by iteration starting from random initial values for the cavity messages. Then, the messages are used to find the local estimation values from the above equations.
A.1 Solving the inverse problem within the Bethe approximation
The BP algorithm provides an efficient way of estimating the expectation values, given the energy function. This approximation method is useful also in solving the inverse problem of constructing the energy function, here the parameters and , which best describes the given expectation values and . A simple strategy, assuming that there is no error in the , is to find the set of parameters that minimize the differences between the resulting and the given values . The following algorithm tries to solve the above problem with iteration:
- •
Start at time step zero with initial parameters .
- •
For do:
compute the expectation values ; 2. 2.
compute the deviations ; 3. 3.
stop if the maximum deviation is smaller than ; 4. 4.
change the parameters .
Here, we use the BP algorithm to estimate the average values . The parameter is a sufficiently small and positive number.
A.2 The reinforced BP algorithm
The Bethe approximation also provides an approximate algorithm to find a solution to the XORSAT problem. A solution is a spin configuration which satisfies all the XORSAT constraints, i.e. for all the , with . To this end, one introduces the reinforced term to the energy function. The reinforcement parameter is assumed to increase slowly with the number of algorithm iterations. More precisely, the reinforced BP (rBP) equations for the cavity messages at iteration are
[TABLE]
The small external fields , with a magnitude much less than one, are to break the high symmetry of the problem. The indicator function is one if constraint is satisfied, otherwise, it is zero. Moreover, the local marginal probabilities are given by
[TABLE]
The equations are solved by iteration starting from random initial messages and updating them according to the above equations for at most iterations. At each iteration, we update all the cavity and local marginals. We also introduce damping to the iterative process, i.e., at each step the messages are updated as follows: with a damping parameter . We set and increase the reinforcement parameter linearly with the number of iterations as . After each iteration, a candidate spin configuration for solution is obtained by looking at the local marginal probabilities . The algorithm stops when the candidate configuration is a solution to the problem.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1(1) Monasson, Remi, et al. ”Determining computational complexity from characteristic ‘phase transitions’.” Nature 400.6740 (1999): 133.
- 2(2) Mezard, Marc, Giorgio Parisi, and Riccardo Zecchina. ”Analytic and algorithmic solution of random satisfiability problems.” Science 297.5582 (2002): 812-815.
- 3(3) Sutton, Richard S., and Andrew G. Barto. Introduction to reinforcement learning. Vol. 135. Cambridge: MIT Press, 1998.
- 4(4) Braunstein, Alfredo, and Riccardo Zecchina. ”Learning by message passing in networks of discrete synapses.” Physical review letters 96.3 (2006): 030201.
- 5(5) Krzakala, Florent, et al. ”Gibbs states and the set of solutions of random constraint satisfaction problems.” Proceedings of the National Academy of Sciences 104.25 (2007): 10318-10323.
- 6(6) Semerjian, Guilhem. ”On the freezing of variables in random constraint satisfaction problems.” Journal of Statistical Physics 130.2 (2008): 251-293.
- 7(7) Dall’Asta, Luca, Abolfazl Ramezanpour, and Riccardo Zecchina. ”Entropy landscape and non-Gibbs solutions in constraint satisfaction problems.” Physical Review E 77.3 (2008): 031118.
- 8(8) Mezard, Marc, Thierry Mora, and Riccardo Zecchina. ”Clustering of solutions in the random satisfiability problem.” Physical Review Letters 94.19 (2005): 197205.
