A study of the performance of classical minimizers in the Quantum Approximate Optimization Algorithm
Introduction
Quantum computing [1] is a computational paradigm in which subatomic particle properties such as superposition, entanglement and interference are exploited to obtain algorithms which offer speed-ups over classical algorithms. For instance, Shor’s algorithm [2] is a quantum method that can factor an integer in time which is polynomial in the number of bits of the input while the best classical algorithm that we currently have is superpolynomial, and Grover’s algorithm [3] and some quantum walks [4], [5] attain a quadratic speed-up in the black-box model over any possible classical algorithm for searching an element in an unsorted list.
A fruitful topic of research has been the use of quantum computing for solving combinatorial optimization problems. One of the most popular approaches has been that of quantum adiabatic computing [6], [7]. In this model, a quantum system is initialized to a certain, well-known state and then it is made to evolve following a slowly changing Hamiltonian until it reaches the ground state of another Hamiltonian that codes the solution to our problem. Although this model is equivalent to the paradigm of quantum circuits and it is, thus, universal, its most popular incarnation has been through the use of the restricted version called quantum annealing [8], for instance in D-Wave’s quantum computers [9].
The Quantum Approximate Optimization Algorithm (QAOA) [10] can be seen as a discretization of quantum adiabatic computing in which a target Hamiltonian and a mixer Hamiltonian are used in alternate steps to drive the evolution of the system to a (ground) state that encodes a solution to the optimization problem under study. Since its introduction, the properties of QAOA have been (and still are) the subject of intense study [11], [12], [13], [14], [15], [16], [17] and it has been applied to several different optimization problems [18], [19], [20], [21].
QAOA follows a hybrid classical-quantum scheme. The classical computer is used to determine the optimal values in a parametrized quantum state that has a high overlap with (a good approximation to) the solution of our optimization problem. Then, a quantum computer is used to prepare that quantum state with the optimal parameters found by the classical algorithm. When that state is measured, a good solution is found with high probability.
Theoretically, the optimal parameters for the quantum state can be obtained efficiently with a classical algorithm for some problems [10]. However, although the exact method has asymptotical polynomial complexity, in practice its running time can be rather large. Thus, an iterative approach is usually adopted instead. The classical computer starts with a guess of the optimal parameters and uses the quantum computer to evaluate the expected value of the quantum state for those parameters. Then, a classical minimizer or maximizer is used to obtain the optimal values. Throughout this process, the quantum computer is used as a black-box capable of providing (estimations of) the expected values of the quantum state for different values of the parameters.
Although QAOA has been the subject of many research papers, not so much attention has been paid to the influence of the choice of classical optimizer in the efficacy and efficiency of the method and, to a prospective user of the algorithm it can be difficult to select the most appropriate minimizer among the many existing ones. In this work, we focus exactly on that problem and we study the performance of twelve different classical optimizers when used together with QAOA to solve the maximum cut problem in graphs, with the aim of providing a guide to help in choosing the best minimizer to use with QAOA. We conduct a series of numerical experiments in a quantum simulator, both with and without noise, and analyse the results in terms of quality of the solution and of the computation time needed to achieve it. This shows that some optimizers can be hundreds of times faster than others while attaining approximations to the solution of similar quality, so the choice of the classical optimizer should be a key factor when using QAOA. Partial studies of the performance of optimizers for QAOA have been conducted before, but only with a fraction of the twelve methods that we examine in this work (for instance, in [22] and [23] three optimizers are studied, while five are considered in [24]).
The rest of the paper is organized as follows. In Section 2 we present the mathematical formulation of QAOA and we show how approximate solutions to NP-hard problems such as Max-Cut can be found with it and in Section 3 we derive the analytical expression of the expected energy for some of the cases we study in this paper. In Section 4, we introduce the classical optimizers that we have used in under study and present some of their main properties. In Section 5 we describe the settings of our experiments and present and analyse the results we have obtained. Finally, in Section 6 we raise some conclusions and propose ideas for future work.
Section snippets
QAOA and the Max-Cut problem
The objective of QAOA is to find a good approximation of the ground state of a given Hamiltonian (below, we will show how we can use this Hamiltonian to encode instances of NP-hard optimization problems). In the general case, this problem is very difficult to solve even when is diagonal in the computational basis so we start with another Hamiltonian whose ground state is easy to find and prepare (usually, ). Then, we consider the parametrized quantum state
Analytic study of the first level QAOA for Max-Cut
In this section we obtain an explicit expression for the energy expectation related to the cost Hamiltonian , for QAOA of depth level . We start by fixing some notation.
Definition 1 Let and be natural numbers, and let be the incidence matrix of an undirected graph with no loops. This means that the graph consists of vertices and edges (with ), with , and zero elsewhere. We define the cost Hamiltonian
For simplicity, since ,
Classical optimizers
In principle, any optimizer that does not need the explicit expression of the function to minimize (but only uses it as black-box to evaluate its values at some points) can be used in conjunction with QAOA. In this work, we have focused on those optimizers that are included in version 0.7.3 of the Aqua module [30] of IBM’s Qiskit quantum programming language [31]. This is, probably, the most popular quantum programming language nowadays and the Aqua module natively implements QAOA. For this
Numerical experiments
To test the performance of the different classical optimizers that we are considering in this work, we have conducted a series of experiments on quantum simulators. We have focused on the Max-Cut problem since, in addition to being NP-hard, it has been widely studied in connection to QAOA. We have started by studying 3-regular graphs (that is, graphs whose vertices all have degree exactly 3), which were the particular graph family for which the properties of QAOA were first investigated [10]
Conclusions and future work
In this paper, we have conducted a study of the influence of the choice of classical optimizer in the performance of the Quantum Approximate Optimization Algorithm. We have run experiments with the Max-Cut problem and different sizes of graphs (both 3-regular and not) using a quantum simulator with and without noise. We have used the 12 optimizers included in the Aqua module of IBM’s Qiskit framework, which is more than twice the number of minimizers studied in previous works.
Our results show
Acknowledgements
This work was supported in part by the MINECO, Spain under Grant MTM-2017-83506-C2-2-P, by the MICINN, Spain under Grant RTI2018-098085-B-C44, and by the Gobierno del Principado de Asturias, Spain under grants FC-GRUPIN-IDI/2018/000193 and FC-GRUPIN-IDI/2018/000226.
References (56)
- et al.
Quantum Computation and Quantum Information: 10th Anniversary Edition
(2011) - P. Shor, Algorithms for quantum computation: Discrete logarithms and factoring, in: Proceedings of FOCS, 1994, pp....
A fast quantum mechanical algorithm for database search
- et al.
Quantum walks for the determination of commutativity of finite dimensional algebras
J. Comput. Appl. Math.
(2019) - et al.
Quantum Computation By Adiabatic Evolution
(2000) - et al.
A quantum adiabatic evolution algorithm applied to random instances of an NP-complete problem
Science
(2001) Adiabatic Quantum Computation and Quantum Annealing
(2014)D-wave quantum computers
(2020)- et al.
A quantum approximate optimization algorithm
(2014)
Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices
Phys. Rev. X
QAOA for max-cut requires hundreds of qubits for quantum speed-up
Sci. Rep.
Evaluating quantum approximate optimization algorithm: A case study
Performance of the quantum approximate optimization algorithm on the maximum cut problem
Benchmarking the quantum approximate optimization algorithm
Quantum Inf. Process.
Analysis of quantum approximate optimization algorithm under realistic noise in superconducting qubits
Forbidden subspaces for level-1 QAOA and IQP circuits
Quantum approximate optimization with hard and soft constraints
Lower bounds on circuit depth of the quantum approximate optimization algorithm
Applying the quantum approximate optimization algorithm to the tail assignment problem
Quantum approximate optimization of non-planar graph problems on a planar superconducting processor
Practical optimization for hybrid quantum-classical algorithms
Avoiding local minima in variational quantum eigensolvers with the natural gradient optimizer
Performance of hybrid quantum-classical variational heuristics for combinatorial optimization
Phys. Rev. E
Generalized Trotter’s formula and systematic approximants of exponential operators and inner derivations with applications to many-body problems
Comm. Math. Phys.
Applications of cut polyhedra—II
J. Comput. Appl. Math.
Maximum cuts and large bipartite subgraphs
Reducibility among combinatorial problems
Cited by (27)
A review on Quantum Approximate Optimization Algorithm and its variants
2024, Physics ReportsNew coding scheme to compile circuits for Quantum Approximate Optimization Algorithm by genetic evolution
2023, Applied Soft ComputingGenetic algorithms as classical optimizer for the Quantum Approximate Optimization Algorithm
2023, Applied Soft ComputingImplementing Graph-Theoretic Feature Selection by Quantum Approximate Optimization Algorithm
2024, IEEE Transactions on Neural Networks and Learning SystemsRedesign of the Last Mile Delivery Network Using Quantum Alternating Operator Ansatz
2024, 2024 16th International Conference on COMmunication Systems and NETworkS, COMSNETS 2024