A study of the performance of classical minimizers in the Quantum Approximate Optimization Algorithm

https://doi.org/10.1016/j.cam.2021.113388Get rights and content

Abstract

The Quantum Approximate Optimization Algorithm (QAOA) was proposed as a way of finding good, approximate solutions to hard combinatorial optimization problems. QAOA uses a hybrid approach. A parametrized quantum state is repeatedly prepared and measured on a quantum computer to estimate its average energy. Then, a classical optimizer, running in a classical computer, uses such information to decide on the new parameters that are then provided to the quantum computer. This process is iterated until some convergence criteria are met. Theoretically, almost all classical minimizers can be used in the hybrid scheme. However, their behaviour can vary greatly in both the quality of the final solution and the time they take to find it.

In this work, we study the performance of twelve different classical optimizers when used with QAOA to solve the maximum cut problem in graphs. We conduct a thorough set of tests on a quantum simulator both, with and without noise, and present results that show that some optimizers can be hundreds of times more efficient than others in some cases.

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 CH (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 CH is diagonal in the computational basis so we start with another Hamiltonian IH whose ground state |ϕ is easy to find and prepare (usually, |ϕ=|+n). Then, we consider the parametrized quantum state |β,γ=eiβpIHeiγ

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 CH, for QAOA of depth level p=1. We start by fixing some notation.

Definition 1

Let n and t be natural numbers, and let HMt×n(F2) be the incidence matrix of an undirected graph with no loops. This means that the graph consists of n vertices and t edges Eν={iν,jν} (with iνjν), with Hνiν=Hνjν=1, and zero elsewhere. We define the cost Hamiltonian CH=ν=1tCν, where Cν=ZiνZjν.

For simplicity, since p=1,

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)

  • NielsenM.A. 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....
  • GroverL.K.

    A fast quantum mechanical algorithm for database search

  • Venegas-AndracaS.E.a.
  • CombarroE.F. et al.

    Quantum walks for the determination of commutativity of finite dimensional algebras

    J. Comput. Appl. Math.

    (2019)
  • FarhiE. et al.

    Quantum Computation By Adiabatic Evolution

    (2000)
  • FarhiE. et al.

    A quantum adiabatic evolution algorithm applied to random instances of an NP-complete problem

    Science

    (2001)
  • McGeochC.C.

    Adiabatic Quantum Computation and Quantum Annealing

    (2014)
  • D-wave quantum computers

    (2020)
  • FarhiE. et al.

    A quantum approximate optimization algorithm

    (2014)
  • ZhouL. et al.

    Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices

    Phys. Rev. X

    (2020)
  • GuerreschiG.G. et al.

    QAOA for max-cut requires hundreds of qubits for quantum speed-up

    Sci. Rep.

    (2019)
  • ShaydulinR. et al.

    Evaluating quantum approximate optimization algorithm: A case study

  • CrooksG.E.

    Performance of the quantum approximate optimization algorithm on the maximum cut problem

    (2018)
  • WillschM. et al.

    Benchmarking the quantum approximate optimization algorithm

    Quantum Inf. Process.

    (2020)
  • AlamM. et al.

    Analysis of quantum approximate optimization algorithm under realistic noise in superconducting qubits

    (2019)
  • StreifM. et al.

    Forbidden subspaces for level-1 QAOA and IQP circuits

    (2020)
  • HadfieldS. et al.

    Quantum approximate optimization with hard and soft constraints

  • OstroswkiJ. et al.

    Lower bounds on circuit depth of the quantum approximate optimization algorithm

    (2020)
  • VikstålP. et al.

    Applying the quantum approximate optimization algorithm to the tail assignment problem

    (2019)
  • AruteF. et al.

    Quantum approximate optimization of non-planar graph problems on a planar superconducting processor

    (2020)
  • GuerreschiG.G. et al.

    Practical optimization for hybrid quantum-classical algorithms

    (2017)
  • WierichsD. et al.

    Avoiding local minima in variational quantum eigensolvers with the natural gradient optimizer

    (2020)
  • NanniciniG.

    Performance of hybrid quantum-classical variational heuristics for combinatorial optimization

    Phys. Rev. E

    (2019)
  • SuzukiM.

    Generalized Trotter’s formula and systematic approximants of exponential operators and inner derivations with applications to many-body problems

    Comm. Math. Phys.

    (1976)
  • DezaM. et al.

    Applications of cut polyhedra—II

    J. Comput. Appl. Math.

    (1994)
  • PoljakS. et al.

    Maximum cuts and large bipartite subgraphs

  • KarpR.

    Reducibility among combinatorial problems

  • Cited by (27)

    • Implementing Graph-Theoretic Feature Selection by Quantum Approximate Optimization Algorithm

      2024, IEEE Transactions on Neural Networks and Learning Systems
    • Redesign of the Last Mile Delivery Network Using Quantum Alternating Operator Ansatz

      2024, 2024 16th International Conference on COMmunication Systems and NETworkS, COMSNETS 2024
    View all citing articles on Scopus
    View full text