Open Access
ARTICLE
IQAOA for Two Routing Problems: A Methodological Contribution with Application to TSP and VRP
1 LIRMM (Laboratoire d’informatique, de robotique et de microélectronique de Montpellier), CNRS (Centre National de la Recherche Scientifique), Université de Montpellier, Montpellier, 34095, France
2 Université Clermont Auvergne, Clermont Auvergne INP, UMR 6158 LIMOS (Laboratoire d’Informatique de Modélisation et d’Optimisation des Systèmes), Aubière, 63178, France
* Corresponding Author: Philippe Lacomme. Email:
Journal of Quantum Computing 2024, 6, 25-51. https://doi.org/10.32604/jqc.2024.048792
Received 18 December 2023; Accepted 19 July 2024; Issue published 25 October 2024
Abstract
The paper presents a novel quantum method for addressing two fundamental routing problems: the Traveling Salesman Problem (TSP) and the Vehicle Routing Problem (VRP), both central to routing challenges. The proposed method, named the Indirect Quantum Approximate Optimization Algorithm (IQAOA), leverages an indirect solution representation using ranking. Our contribution focuses on two main areas: 1) the indirect representation of solutions, and 2) the integration of this representation into an extended version of QAOA, called IQAOA. This approach offers an alternative to QAOA and includes the following components: 1) a quantum parameterized circuit designed to simulate string vectors on a quantum processor, 2) a classical meta-optimization method executed on a classical computer, and 3) the computation of the average cost for each string vector, achieved through a well-established algorithm from the operations research community tailored to the specific problem. IQAOA provides an efficient means to address quantum optimization problems by combining quantum and classical computation methods. Its primary advantage lies in deriving a quantum circuit that requires significantly fewer gates, making it suitable for execution on current noisy quantum computing platforms. Through numerical experiments employing IQAOA, we successfully solved instances of the 10-customer Traveling Salesman Problem (TSP) using the IBM simulator. To our knowledge, this is the largest application of a QAOA-based approach to solving the TSP. Additionally, IQAOA enables the resolution of the Vehicle Routing Problem (VRP) by leveraging the Split algorithm, which transforms a TSP permutation into a corresponding VRP solution.Keywords
Quantum optimization emerges as a promising and innovative discipline with substantial potential implications in the domain of operations research. This burgeoning frontier affords the opportunity to address minimization through quantum metaheuristics, presenting a notably efficacious approach that circumvents the prevalent issue encountered by conventional local search algorithms—namely, the propensity to become trapped in local minima. The effectiveness of methods based on Simulated Annealing, a common technique in the field of operations research, relies on gradually reducing a parameter ‘t’ to zero, which aids in overcoming potential energy barriers. Different metaheuristic approaches employ diverse strategies to prevent premature convergence to local minima while maintaining robust capabilities for thorough exploration of the search space. Among these various metaheuristic techniques, which encompass a wide range of methods like memetic algorithms, GRASP (Greedy Randomized Adaptive Search Procedure), and VNS (Variable Neighborhood Search), the Simulated Annealing method stands out. Together, these metaheuristic techniques expand the toolkit available for addressing optimization challenges in the ever-evolving field of operations research.
Viewed through the lens of quantum mechanics, quantum fluctuations exhibit similarities to thermal fluctuations. What distinguishes quantum mechanics from classical methodologies is the capacity of waves to penetrate potential energy barriers—a concept elucidated by Martoňák et al. in 2004 [1]. In recent times, the quantum physics community has introduced several quantum metaheuristics, culminating in a family of quantum approximate algorithms. Among these, the Adiabatic-based Algorithms stand out, offering an approximate resolution to the Schrödinger equation formulated by Schrödinger in 1926 [2]. Recently, Reference [3] introduced a new class of algorithms centered around alternating between two distinct sets of operators: the Hamiltonian and the mixing Hamiltonian. This alternating process gives rise to Quantum Approximate Optimization Algorithms, commonly known as QAOA. These algorithms represent a hybrid approach wherein the classical computer explores the search space to optimize a set of parameters, while a quantum device handles the evaluation of probability distributions. It’s worth noting that QAOA doesn’t account for local search considerations but offers a comprehensive exploration of the entire search space. This ground-breaking work was further expanded upon in the notable publication by Hadfield in 2018 [4]. In their research, they introduced a new ansatz specifically designed to facilitate the exploration of the feasible subspace, ensuring inherent satisfaction of hard constraints. This approach bears resemblance to classical methodologies in the Operations Research (OR) community, involving a meticulous definition of classical operations, such as qubit permutations within the qubit-string used for solution modeling.
The TSP received a lot of attention for decades since it is the corner stone of all routing problems since it is emblematic of a broad category of optimization problems in classical computation, specifically within the realm of combinatorial optimization. Analysis of recent publications in quantum resolution of TSP permit to clarify the difference between the theoretical capabilities of quantum computing and the practical realities of applying these technologies to classical TSP optimization. Numerous quantum optimization algorithms have been investigated for the TSP: the recent publication of [5] propose a state-of-the-art of all QAOA based approaches investigated in gate-bases quantum computers. They provide numerical experiments with different QAOA mixer for 5 nodes TSP. Note that not only QAOA received attention, but also Grover since [6] introduces a quantum algorithm for the Traveling Salesman Problem (TSP) based on the Grover Adaptive Search (GAS). The method has been successfully applied to the resolution of one seven-node TSP using the Qiskit library. Lately, in 2024, the last investigations permit to solving 6 nodes TSP. For example, Reference [7] propose a two-step quantum search algorithm with two distinct operators for preparing the initial state and solving TSP. The algorithm first amplifies an equal superposition state of all feasible solutions of TSP and subsequently amplifies the optimal solution states among these feasible solution states. Larger instances can be addressed only by decomposition methods due to the large number of qubit required or due to the large number of gates. Reference [8] elaborate combination of two decomposition methods, namely graph shrinking and circuit cutting. Graph shrinking reduces the problem size before encoding into QAOA circuits, while circuit cutting decomposes quantum circuits into fragments for execution on medium-scale quantum computers. For a TSP with seven cities, the algorithm retrieves the optimum solution by consecutively running two 7-qubit QAOA circuits.
2 Indirect Quantum Approximate Optimization Algorithms (IQAOA)
2.1 Mapping Function in OR Field
A significant challenge in Operations Research (OR) lies in developing consistent models that exclusively represent solutions. The focused exploration of feasible subspaces has garnered attention within the Operations Research community for numerous years, proving successful in various research domains and yielding highly efficient metaheuristics. For instance, in Job-Shop Scheduling, a prevalent indirect representation relies on the Bierwith vector [9], which can be efficiently transformed (in
In summary, it is pertinent to highlight that many Operations Research (OR) problems find effective solutions through the utilization of indirect solution representations. The core concept involves exploring not the entire array of solutions, but rather a set of representations (such as the set of giant tours for VRP or the set of Bierwith’s vectors for Job-Shop, for instance). These objects, employed for indirect solution representation, typically take the form of vectors, enabling the formulation of mapping functions that operate within
2.2 Indirect Representation of Solutions: Proposition for Permutations
Within combinatorics, the Lehmer code offers an alternate means of encoding every possible permutation within a sequence composed of n numbers. This code serves as an exemplary system for enumerating permutations and stands as a prime illustration of an inversion table. The term “Lehmer code” honors Lehmer [14], although its existence traces back to at least 1888 [15]. Numerous methods exist for establishing this direct mapping, with the Lehmer code, also known as the inversion table, representing the most classical among them. An algorithmic depiction of this mapping was initially introduced in [16]. Indirect representations can leverage the one-to-one relationship between permutations and the so-called subexceedant functions, consequently associating a single integer number with the rank of the permutation.
Assume
Obviously the following remarks holds (subexceedant function):
This property justifies the term ‘subsequent function’ a term that can be found, for example, in [17].
Moreover we have:
Let us note
Let us note
Algorithm 1. Conversion of
Example
Let us consider
To conclude,
□
Conversely, given a subexceedant function
Algorithm 2. Computation of
Example
Let us
At iteration 1 the number
At iteration 2 the number
At iteration 3 the number
At iteration 4 the number
At iteration 5 the number
At iteration 6 the number
To conclude,
□
Reverse Example
Let us
2.3 Indirect Representation of Solutions: Bijection with Permutation over Interval
One-to-one correspondence with a permutation over the interval
Property
For any
And
□
Example
For example, we have:
And
For example, we have
For a set of
• we can compute the subexceedant function by decomposing
• we can compute the permutation
• we can compute the cost of any permutation
For convenience we denote:
This allows us to define the mapping function that associates a permutation with each rank
Quantum Approximate Optimization Algorithms [18] take advantage of alternations between the cost function investigation which is modeled by a Hamiltonian
where the energy is defined by
2.5 Modelling Rank and Search Space Investigation
IQAOA seeks to solve a hard optimization problem i.e., minimizing or maximizing one objective function
2.6 Search Space Investigation
The
The quantum computer is used to construct the state:
For a fixed
The binary representation of rank
and the
Then the circuit is:
And to conclude:
The algorithm description is illustrated in Fig. 3 that is included in a main loop iterative method introduced in the next section.
IQAOA efficiency strongly relies on some key-points:
• The capacity to provide a significant ratio between the estimation of
• the last distribution
• The availability of one dedicated methods to compute the
• The number of qubits
Let us note that the expectation value
2.7 C_GRASP
Investigation of the optimal parameters required powerful local search, or meta-heuristic based approaches including but not limited to Cobyla, Genetic Algorithm, GRASP × ELS… with performances that are related to the problem under consideration. In the OR (Operationnal Research) community the GRASP × ELS has been proved to be the more adequate for a large class of problems. The GRASP × ELS is a fusion of two powerful algorithms: GRASP (Greedy Randomized Adaptive Search Procedure) [20] and ELS (Evolutionary Local Search) [11,21]. This combination joins the strengths of both methods. The multi-start strategy of GRASP relies on a greedy randomized heuristic that generates the set of initial solutions (
The second component is ELS, an extension of ILS (Iterated Local Search) introduced by [22]. In each iteration (
Remark 1.
An efficient implementation of C_GRASP × ELS for Continuous GRASP × ELS required a neighbouring system that consists in a proper definition of
Remark 2.
For efficiency reason C_GRASP × ELS can be used to optimize simultaneously
Remark 3.
Depending on the desired probability distribution, it is necessary to choose the right criteria or criteria to minimize. Among all these criteria, we can mention, without aiming to be exhaustive:
• Minimization of the expectation value of the distribution that provides insight into the central tendency;
• Minimization of the decile, i.e., minimization of the data set part that contain 10% of the data;
• Minimization of the expectation value of the decile, i.e., expectation value of the data that contain 10% of the data;
• Minimization of the quartile, i.e., minimization of the data set part that contain
• Minimization of the expectation value of the quartile, i.e., expectation value of the data that contain 25% of the data.
The quartile and the decile are used for summarizing the central tendency and spread of a dataset. Both quartile and decile provide a way to assess the distribution and variability of data while also identifying potential outliers and extreme values. To obtain a probability distribution that concentrates probabilities on low-cost solutions and avoids having a large number of values with residual probabilities, one can consider combinations of both the mean and a criterion related to the mean trend (e.g., decile or quartile, for instance). The numerical tests conducted and presented below demonstrate that it is possible to obtain a probability distribution that concentrates on high-quality solutions close to the optimal solution and even on the optimal solution itself. These tests are performed on instances ranging from 6 to 10 clients with different types of objectives to minimize and various parameters. It is worth noting that the parameters used were determined after a brief numerical study but were not subject to a specific investigation, which would be beyond the scope of this publication. The indirect QAOA we introduce permit to define very compact quantum circuit with a very small number of gates favoring the execution on real quantum computing however, in the NISQ era simulator with no noise is the common way to perform experimentation. All the experiments have been achieved using Qiskit (IBM) using the simulator. The quality of quantum gates strongly influences of all quantum algorithm.
3.1 Resolution of a TSP with 6 Customers
The total number of permutations is 720 but there is only 53 different costs and the distance between customers are introduced in Table 2. A sampling of permutations permits to show that the high quality solutions have a very low probability (Fig. 6). Note that the higher probabilities are related to very low quality solutions: some solution with a cost about 800 and 900 have a probability greater than
The instance has 12 optimal solutions listed in Table 3 that shows the correspondence between rank, permutation and cost.
C_GRASP × ELS is executed with the following parameters:
• Minimization of the expectation value of the decile plus the expectation value of the distribution.
• The sampling of
• The parameters
• The parameters
• Both
• The quantum circuit is parametrized with
•
•
The landscape of the function, with ranks represented on the x-axis, is not a smooth landscape that facilitates the search for local minima (Fig. 7). However, the C_GRASP
The sampling with
The details provided in Table 4 confirm what the visual representation suggests, namely very high probabilities concentrated on low-cost solutions, thus demonstrating the effectiveness of the IQAOA method in solving this 6-customers TSP problem.
3.2 Resolution of a TSP with 8 Customers
The total number of permutations is 40,320 but there are only 833 different costs and the distance between customers are introduced in Table 5.
The optimal solution is 108 avec the related family permutation is:
The experiments were carried out with:
• The parameters
• The parameters
The instance encompasses 16 optimal solutions that value 108 meaning that uniform sampling gives a probability about 0.039% to find one optimal solution (Fig. 9).
The representations of the distributions in Figs. 9 and 10 show that the probability distribution has been significantly altered to concentrate on high-quality solutions. It should be noted that the median is 306, which means that 50% of the data corresponds to solutions with costs lower than 306. The final sampling achieved at the end of the optimization gives probability of 4.2% associated with 108. The fact that the probability distribution only marks certain solutions, and that this distribution is very different from a uniform distribution, is clearly visible in the diagram of Fig. 11, where the various possible ranks are represented on the x-axis.
It is difficult to give a representation of the function to minimize. However, Fig. 12 gives a partial representation of
3.3 Resolution of a TSP with 9 Customers
The experiments were carried out with:
• The parameters
• The parameters
The distances used are introduced in Table 6. The optimal solution is 137 avec the related family permutation is:
3.4 Resolution of a TSP with 10 Customers
A 10-customer instance is introduced in Appendix A and B results meet the results obtained with smaller instances.
The vehicle routing problem (VRP) extends the TSP by including a demand
The final sampling achieved at the end of the optimization gives probability of 13% to have a solution lower than 151 (Fig. 14) which is 6 times better that the probability to find 108 by one uniform random sample (Fig. 15).
The optimal solution is
We have introduced the IQAOA approach, which utilizes an indirect representation of permutations. Our findings provide valuable insights into the performance of IQAOA and propose promising strategies for its practical implementation on near-term quantum devices. This is a new approach in quantum and one of the first inclusion of indirect solution modelisation into a quantum process. To the best of our knowledge, this is the first quantum solution for the 10-customer TSP. The inclusion of indirect coding within the QAOA framework gives rise to the IQAOA approach, requiring a highly specialized technique for angle optimization and the ability to leverage the potential of well-established meta-heuristics within the OR community.
Acknowledgement: Special thanks to Kevin Espiguinha and Samy Dif for preliminary discussion on Lehmer representation.
Funding Statement: The authors received no specific funding for this study.
Author Contributions: The authors confirm contribution to the paper as follows: study conception and design: Philippe Lacomme and Eric Bourreau; data collection: all authors; analysis and interpretation of results: Gérard Fleury and Eric Bourreau; draft manuscript preparation: Philippe Lacomme and Gérard Fleury. All authors reviewed the results and approved the final version of the manuscript.
Availability of Data and Materials: The data that support the findings of this study are available from the corresponding author, Philippe Lacomme, upon reasonable request.
Ethics Approval: Not applicable.
Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.
References
1. R. Martoňák, G. E. Santoro, and E. Tosatti, “Quantum annealing of the traveling-salesman problem,” Phys. Rev., vol. 70, no. 5, 2004, Art. no. 057701. doi: 10.1103/PhysRevE.70.057701. [Google Scholar] [PubMed] [CrossRef]
2. E. Schrödinger, “An ondulatory theory of the mechanics of atoms and molecules,” Phys. Rev., vol. 28, no. 6, pp. 1049–1070, 1926. doi: 10.1103/PhysRev.28.1049. [Google Scholar] [CrossRef]
3. E. Farhi, J. Goldstone, S. Gutmann, and L. Zh, “The quantum approximate optimization algorithm and the sherrington-kirkpatrick model at infinite size,” 2022, arXiv:1910.08187v4. [Google Scholar]
4. S. Hadfield, “Quantum algorithms for scientific computing and approximate optimization” Ph.D. thesis, Columbia University, USA, 2018. [Google Scholar]
5. W. Y. Qian, R. A. M. Basili, M. M. Eshaghian-Wilner, A. Khokhar, G. Luecke and J. P. Vary, “Comparative study of variations in quantum approximate optimization algorithms for the traveling salesman problem,” Entropy, vol. 25, no. 8, 2023, Art. no. 1238. doi: 10.3390/e25081238. [Google Scholar] [PubMed] [CrossRef]
6. J. Zhu, Y. Gao, H. Wang, T. Li, and H. Wu, “A realizable GAS-based quantum algorithm for traveling salesman problem,” 2022, arXiv:2212.02735. [Google Scholar]
7. R. Sato, G. Cui, K. Saito, H. Kawashima, T. Nikuni and S. Watabe, “Design of two-step quantum search algorithm for solving traveling salesman problems,” 2024, arXiv:2405.07129. [Google Scholar]
8. L. S. Herzog et al., “Improving quantum and classical decomposition methods for vehicle routing,” 2024, arXiv:2404.05551. [Google Scholar]
9. C. Bierwith, “A generalized permutation approach to jobshop scheduling with genetic algorithms,” OR Spektrum, vol. 17, no. 2–3, pp. 87–92, 1995. doi: 10.1007/BF01719250. [Google Scholar] [CrossRef]
10. J. E. Beasley, “Route-first cluster-second methods for vehicle routing,” Omega, vol. 11, no. 4, pp. 403–408, 1983. doi: 10.1016/0305-0483(83)90033-6. [Google Scholar] [CrossRef]
11. C. Prins, P. Lacomme, and C. Prodhon, “Order-first split-second methods for vehicle routing problems: A review,” Transp. Res. Part C: Emerg. Technol., vol. 40, no. 1, pp. 179–200, 2014. doi: 10.1016/j.trc.2014.01.011. [Google Scholar] [CrossRef]
12. G. B. Dantzig and J. H. Ramser, “The truck dispatching problem,” Manage. Sci., vol. 6, no. 1, pp. 80–91, 1959. doi: 10.1287/mnsc.6.1.80. [Google Scholar] [CrossRef]
13. A. Cheng, M. Gen, and Y. Tsumjimura, “A tutorial survey of job-shop scheduling problems using genetic algorithms–representations,” Comput. Indust. Eng., vol. 30, no. 4, pp. 983–997, 1996. doi: 10.1016/0360-8352(96)00047-2. [Google Scholar] [CrossRef]
14. D. H. Lehmer, “Teaching combinatorial tricks to a computer,” in Proc. Sympos. Appl. Math. Comb. Anal., Amer. Math. Soc., vol. 10, pp. 179–193, 1960. doi: 10.1090/psapm/010. [Google Scholar] [CrossRef]
15. C. A. Laisant, “Sur la numération factorielle, application aux permutations,” Bulletin De La Société Mathématique De France, vol. 2, pp. 176–173, 1888. doi: 10.24033/bsmf.378. [Google Scholar] [CrossRef]
16. D. Knuth, “The art of computer programming,” in Sorting and Searching, 2nd ed., USA: Addison-Wesley, 1981, vol. 3. [Google Scholar]
17. F. Rakotondrajao, “Permutation by number of fixed points and anti-excedances,” Africa Mathematica, vol. 23, no. 1, pp. 121–133, 2012. doi: 10.1007/s13370-011-0025-y. [Google Scholar] [CrossRef]
18. E. Farhi and J. Goldstone, “A quantum approximate optimization algorithm,” Quantum Phys.. arXiv:1411.4028. 2014. [Google Scholar]
19. T. Kadowaki and H. Nishimori, “Quantum annealing in the transverse Ising model,” Phys. Rev. E, vol. 58, no. 5, pp. 5355–5363, 1998. doi: 10.1103/PhysRevE.58.5355. [Google Scholar] [CrossRef]
20. T. A. Feo and M. G. C. Resende, “Greedy randomized adaptive search procedures,” J. Glob. Optim., vol. 6, no. 2, pp. 109–133, 1995. doi: 10.1007/BF01096763. [Google Scholar] [CrossRef]
21. S. Wolf and P. Merz, “Evolutionary local search for the super-peer selection problem and the p-hub median problem,” in HCI/ICCV 2007, T. Bartz-Beielstein, Ed., Springer, Heidelberg: LNCS, 2007, vol. 4771, pp. 1–15. [Google Scholar]
22. H. R. Lourenço, O. C. Martin, and T. Stutzle, “Iterated local search,” in Handbook of Metaheuristics, F. Glover and G. A. Kochenberger, Eds., Boston, MA: Springer, 2003, vol. 57. doi: 10.1007/0-306-48056-5_1. [Google Scholar] [CrossRef]
23. Y. Ruan, S. Marsh, X. Xue, Z. Liu, and J. Wang, “The quantum approximate algorithm for solving traveling salesman problem,” Comput. Mater. Continua, vol. 63, no. 3, pp. 1237–1247, 2020. doi: 10.32604/cmc.2020.010001. [Google Scholar] [CrossRef]
24. T. Stollenwerk and S. Hadfield, “Measurement-based quantum approximate optimization,” 2024, arXiv:2403.11514v1. [Google Scholar]
25. G. Fleury and P. Lacomme, “A technical note for the 91-clauses SAT resolution with indirect QAOA based approach,” 2024, arXiv:2402.00065v1. [Google Scholar]
Appendix A. Resolution of one 10-Customer Instance
The experiments were carried out with:
• The parameters
• The parameters
The distances used are introduced in Table A1 and they define a asymmetric TSP with 10 customers. The optimal solution is 102 avec the related family permutation is:
It is worth noting that defining the number of samples based on the number of iterations makes sense. This is particularly relevant for high-quality solutions that are close to the optimal one, where the probability of making incorrect comparisons (given that we only have estimates of both quartile energy and average value) should be lower compared to situations where the solutions under consideration have lower quality. The following parameters are used:
• The parameters
• The parameters
At each ELS iterations the number of sampling is increased of 10 units starting with 40 samplings. The results are those of Fig. A2 and are relevant even if the process of convergence should require more iterations.
Appendix B. Example of Circuits
The Fig. A3 gives the general circuit representation for rank encoding that is composed on successive application of
It could be possible to investigate difference expression for
or
or
or
which are inspired by the usual VQE proposals. Depending on the instances, depending on the problems and considering the previous published works on VQE, it seems reasonable that
Cite This Article
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.