Benchmarking the Quantum Approximate Optimization Algorithm

The performance of the quantum approximate optimization algorithm is evaluated by using three different measures: the probability for finding the ground state, the energy expectation value, and a ratio closely related to the approximation ratio. The set of problem instances studied consists of weighted MaxCut problems and 2-satisfiability problems. The Ising model representations of the latter possess unique ground states and highly-degenerate first excited states. The quantum approximate optimization algorithm is executed on quantum computer simulators and on the IBM Q Experience. Additionally, data obtained from the D-Wave 2000Q quantum annealer is used for comparison, and it is found that the D-Wave machine outperforms the quantum approximate optimization algorithm executed on a simulator. The overall performance of the quantum approximate optimization algorithm is found to strongly depend on the problem instance.


I. INTRODUCTION
The Quantum Approximate Optimization Algorithm (QAOA) is a variational method for solving combinatorial optimization problems on a gate-based quantum computer [1].After reformulating the combinatorial optimization problem of interest in terms of finding the true ground state of a Hamiltonian, the QAOA uses the machinery of quantum theory to solve the latter problem by adopting a specific variational ansatz for the trial wave function.This ansatz is specified in terms of a gate circuit and involves 2p parameters (see below) which have to be optimized by running a minimization algorithm on a conventional computer.
Alternatively, the QAOA can be viewed as a form of quantum annealing (QA) using discrete time steps.In the limit that these time steps become vanishingly small (i.e p → ∞), the adiabatic theorem [2] guarantees that quantum annealing yields the true ground state, providing at least one theoretical example for which the QAOA yields the correct answer.In addition, there exists a special class of models for which QAOA with p = 1 solves the optimization problem exactly [3].In general, for finite p, there is no guarantee that the QAOA solution corresponds to the solution of the original combinatorial optimization problem.
The interest in the QAOA largely stems from the fact that for small problems, it can be executed on existing quantum hardware [4,5] and it is expected to show quantum supremacy on near-term devices [6].The aim of this paper is to present a critical assessment of the QAOA, based on results obtained by simulation, running the QAOA on the IBM Q Experience, and a comparison with data produced by the D-Wave 2000Q quantum annealer.
The paper is structured as follows: In Sec.II we in-troduce the 2-SAT [7] and MaxCut [7] problems which are used to benchmark the QAOA and review the basic elements of the QAOA and QA.Section III discusses the procedures to assess the performance of the QAOA and to compare it with QA.The results obtained by using simulators, the IBM Q Experience, and the D-Wave 2000Q quantum annealer are presented in Sec.IV.Section V contains our conclusions.

II. THEORETICAL BACKGROUND A. The 2-SAT Problem
Solving the 2-satisfiability (2-SAT) problem amounts to finding a true/false assignment of N Boolean variables such that a given expression is satisfied [7].Such an expression consists of arbitrarily many conjunctions of clauses that consist of disjunctions of pairs of the Boolean variables (or their negations), respectively.Neglecting irrelevant constants, problems of this type can be mapped onto the quantum spin Hamiltonian where σ z i denotes the Pauli z-matrix of spin i with eigenvalues z i ∈ {−1, 1}.In the basis that diagonalizes all σ z i (commonly referred to as the computational basis), Hamiltonian Eq. ( 1) is a function of the variables z i .For the class of 2-SAT problems that we consider, this cost function is integer valued.Minimizing this cost function answers the question whether there exists an assignment of N Boolean variables that solves the 2-SAT problem and provides this assignment.
In this paper, we consider a collection of 2-SAT problems that, in terms of Eq. ( 1), possess a unique ground state and a highly-degenerate first-excited state and, for the purpose of solving such problems by means of the D-Wave quantum annealer, allow for a direct mapping onto the Chimera graph [8][9][10].

B. The MaxCut Problem
Given an undirected graph G with vertices i ∈ V and edges (i, j) ∈ E, solving the MaxCut problem yields two subsets S 0 and S 1 of V such that S 0 ∪S 1 = V , S 0 ∩S 1 = ∅, and the number of edges (i, j) with i ∈ S 0 and j ∈ S 1 is as large as possible [7].In terms of a quantum spin model, the solution of the Maxcut problem corresponds to the lowest energy eigenstate of the Hamiltonian where the eigenvalue z i = 1 (−1) of the σ z i operator indicates that vertex i belongs to subset S 0 (S 1 ).Clearly, the eigenvalues of Eq. ( 2) are integer valued.
The weighted MaxCut problem is an extension for which the edges (i, j) of the graph G are weighted by weights w ij .The corresponding Hamiltonian reads Obviously, Eq. ( 3) is a special case of Eq. (1).

C. Quantum Annealing
Quantum annealing was proposed by Kadowaki and Nishimori as a quantum version of simulated annealing [11].The working principle is that an N -spin quantum system is prepared in the state |+ ⊗N which is the ground state of the initial Hamiltonian H init = −H 0 , where and σ x i is the Pauli x-matrix for spin i.The Hamiltonian of the system changes with time according to where t a is the total annealing time, A(s = 0) 1, B(s = 0) ≈ 0 and A(s = 1) ≈ 0, B(s = 1) 1 (in appropriate units) and H fin is the Hamiltonian corresponding to the discrete optimization problem (e.g. the MaxCut or the 2-SAT problem considered in this paper).
According to the adiabatic theorem [2,12], if the annealing time t a is long enough (t a → ∞), the system stays in the ground state of H(s), i.e., at the end of the annealing process, the system is in the ground state of the problem Hamiltonian which corresponds to the solution of the optimization problem.In this paper, we use the D-Wave 2000Q to perform the quantum annealing experiments.

D. Quantum Approximate Optimization Algorithm
In this section, we recall the basic elements of the QAOA [1].
Consider an optimization problem for which the objective function is given by C(z) = j C j (z), where z = z 1 z 2 . . .z N , z i ∈ {−1, 1}, and typically, each of the C j (z) depends on a few of the z i only.Such a problem can be represented by an Ising Hamiltonian H C which is diagonal in the σ z -basis and for which the ground state energy, denoted by E (0) C , corresponds (up to an irrelevant constant) to the minimum of C(z).
The QAOA works as follows.The quantum computer is prepared in the state |+ ⊗N , i.e. the uniform superposition of all computational basis states, which can be achieved by applying the Hadamard gates H ⊗N to |0 ⊗N .The next step is to construct a trial state according to where γ = (γ 1 , . . ., γ p ), β = (β 1 , . . ., β p ) and If the eigenvalues of H C (H 0 ) are integer-valued, we may restrict the values of the γ i (β i ) to the interval [0, 2π] ([0, π]) [1].In the case of the weighted MaxCut problem (see Eq. 3), the γ i cannot be restricted to the interval [0, 2π], in general.The parameter p in Eq. ( 6) determines the number of independent parameters of the trial state.Modifications of the QAOA also allow for different mixing operators than the one given in Eq. ( 8) [13].
If we let p → ∞ and take γ and β according to a quantum annealing schedule (see also Appendix A), the trial state is identical to the ground state of H C .For finite p, the QAOA only differs from other variational methods of estimating ground state properties [14][15][16][17][18] by the restriction to wave functions of the form of Eq. (6).
As for all variational methods, γ and β are determined by minimizing the cost function.In the case at hand, we minimize the expectation value of the Hamiltonian H C , that is as a function of ( γ, β) and denote where min denotes a (local) minimum obtained numerically.In practice, this minimization is carried out on a conventional digital computer, whereas the quantum computer produces z's according to the probability distribution | z| γ, β | 2 .If we want to search for the optimal ( γ, β) by minimizing E p ( γ, β), we can estimate E p ( γ, β) through When using the quantum computer simulator, the state vector | γ, β is known and can be used to compute the matrix element directly.Obviously, for a complex minimization problem such as Eq. ( 9), it may be difficult to ascertain that the minimum found is the global minimum.Once γ * and β * have been determined, repeated measurement in the computational basis of the state | γ * , β * of the quantum computer yields a sample of z's.In the ideal but exceptional case that | γ * , β * is the ground state of H C , the measured z is a representation of that ground state.In the other case, there is still a chance that the sample contains the ground state.Moreover, one is often not only interested in the ground state but also in solutions that are close.The QAOA produces such solutions because even if | γ * , β * is not the ground state, it is likely that z's for which C(z) ≤ E p ( γ * , β * ) are generated.
We consider three measures for the quality of the solution, namely (M1) the probability for finding the ground state (called success probability in what follows) which should be as large as possible, (M2) the value of E p ( γ * , β * ) which should be as small as possible, and (M3) the ratio defined by which should be as close to one as possible and indicates how close the expectation value E p ( γ * , β * ) is to the optimum.For the set of problems treated in this paper, the eigenvalues of the problem Hamiltonian can take negative and positive values.We denote the smallest and largest eigenvalues by E min and E max , respectively.As a consequence, the ratio E p ( γ * , β * )/E min can have negative and positive values.By subtracting the largest eigenvalue E max , we shift the spectrum to be non-positive and the ratio r is thus non-negative with 0 ≤ r ≤ 1.
In computer science, a ρ-approximation algorithm is a polynomial-time algorithm which returns for all possible instances of an optimization problem, a solution with cost value V such that where V is the cost of the optimal solution [19].For randomized algorithms, the expected cost of the solution has to be at least ρ times the optimal solution [20].The constant ρ is called performance guarantee or approximation ratio.The ratio r corresponds to the left-hand side of the definition of the approximation ratio ρ (Eq.( 13)).Since we cannot investigate all possible problem instances, we use r only as a measure for the subset of instances that we have selected.
As measures (M1) and (M3) require knowledge of the ground state of H C , they are only useful in a benchmark setting.In a real-life setting, only measure (M2) is of practical use.For the simplest case p = 1 and a trianglefree (connectivity) graph, the expectation value of the Hamiltonian can be calculated analytically.The result is given by where the products are over those vertices that share an edge with the indicated vertex.For h i = 0 and J ij = 1/2, Eq. ( 15) is the same as Eq. ( 15) in Ref. [21], up to an irrelevant constant contribution.We use Eq. ( 15) as an independent check for our numerical results.

III. PRACTICAL ASPECTS
We adopt two different procedures for testing the QAOA.For p = 1, we evaluate E p (γ, β) for points (γ, β) on a regular 2D grid.We create the corresponding gate circuit using Qiskit [22] and execute it on the IBM simulator and the IBM Q Experience [23].
For the QAOA with p > 1, we perform the procedure shown in Fig. 1.Given p and values of the parameters β and γ, a computer program defines the gate circuit in the Jülich universal quantum computer simulator (JUQCS) [24] format.JUQCS executes the circuit and returns the expectation value of the Hamiltonian H C in the state | γ, β (or the success probability).This expectation value (or this success probability) in turn is passed to a Nelder-Mead minimizer [25,26] which proposes new values for β and γ.This procedure is repeated until E p ( γ, β) (or the success probability) reaches a stationary value.Obviously, this stationary value does not need to be the global minimum of E p ( γ, β) (or the success probability).In particular, if E p ( γ, β) (or the success probability as a function of γ and β) has many local minima, the algorithm is likely to return a local minimum.This however is a problem with minimization in general and is not specific to the QAOA.In practice, we can only repeat the procedure with different initial values of ( γ, β) and retain the solution that yields the smallest E p ( γ, β) (or the highest success probability).For the 18-variable problems, the execution time of a single cycle, as depicted in Fig. 1, is less than a second for small p and even for p ≈ 40 − 50, the execution of a cycle takes about one second.The execution time of the complete optimization then depends on how many cycles are needed for convergence.
For the QAOA, many (hundreds of) evaluations N ev of E p ( γ, β) are necessary for optimizing the parameters γ and β.A point that should be noted is that we obtain the success probability for the QAOA from the state vector and that with little effort, we can calculate E p ( γ, β) in that state when using the simulator.In contrast, when using a real quantum device, in practice E p ( γ, β) is estimated from a (small) sample of N S values of z|H C |z .Therefore, using the QAOA on a real device only makes sense if the product N S • N ev is much smaller than the dimension of the Hilbert space of 2 N .Otherwise the amount of work is comparable to exhaustive search over the 2 N basis states of the Hilbert space.
For the quantum annealing experiments on the D-Wave quantum annealer, we distribute several copies of the problem instance (that is the Ising Hamiltonian Eq. ( 14)) on the Chimera-graph and repeat the annealing procedure to collect statistics about the success probability and the ratio r.Since we can put 244 (116, 52) copies of the 8-variable (12-variable, 18-variable, respectively) instances simultaneously on the D-Wave 2000Q, we only need 250 (500, 1000, respectively) repetitions for proper statistics to infer the success probability.If we are not interested in estimating the success probability but only need the ground state to be contained in the sample, much less repetitions are necessary.

IV. RESULTS
A. QAOA with p = 1 Figures 2 and 3 show the success probability and the expectation value E 1 (γ, β), i.e., after applying the QAOA for p = 1, as a function of γ and β for a 2-SAT problem with 8 spins and for a 16-variable weighted MaxCut problem, respectively, as obtained by using the IBM Q simulator.The specifications of the problem instances are given in Appendix B. With the simulator, the largest success probability that has been obtained for the 8-variable 2-SAT problem is about 10% and about 2% for the 16variable weighted MaxCut problem.We find that regions with high success probability correspond to small energy expectation values, as expected (see Figs. 2 and 3).However, the values of (γ, β) for which the success probability is the largest and E 1 (γ, β) is the smallest differ slightly.
As mentioned earlier, if the Hamiltonian Eq. ( 14) does not have integer eigenvalues, which is the case for the weighted MaxCut problem that we consider (see Eq. ( 3)), the periodicity of E 1 (γ, β) with respect to γ is lost.Therefore, the search space for γ increases severely.Moreover, the landscape of the expectation value E 1 (γ, β) exhibits many local minima.Fortunately, for the case at hand, it turns out that the largest success probability can still be found for γ ∈ [0, 2π].Plots with a finer γ grid around the largest success probability and the smallest value of E 1 (γ, β) are shown in Figs.4a and 4b, respectively.Clearly, using a simulator and for p = 1, it is not difficult to find the largest success probability or the smallest E 1 (γ, β), as long as the number of spins is within the range that the simulator can handle.
The results for the same 8-variable 2-SAT problem instance shown in Fig. 2, but obtained by using the quantum processor IBM Q 16 Melbourne [23], are shown in Fig. 5.To obtain an estimate of the success probability, for each pair of β and γ, we performed seven runs of 8192 samples each.Note that in this case, the total number of samples per grid point (57344) is much larger than the number of states 2 8 = 256.Thus, we can infer the success probability with very good statistical accuracy.However, such an estimation is feasible for small system sizes only.By comparing Fig. 2 and Fig. 5, we conclude that the IBM Q Experience results for the success probability do not bear much resemblance to those obtained by the simulator.However, the IBM Q Experience results for E 1 (γ, β) show some resemblance to those obtained by the simulator.It seems that at this stage of hardware development, real quantum computer devices have serious problems producing data that are in qualitative agreement with the p = 1 solution Eq. ( 15).Figures 6 and 7 show the distributions of z|H C |z where the states z are samples generated with probability | z|γ, β | 2 for the values of γ and β that maximize the p = 1 success probability (black, "QAOA -G") and minimize E 1 (γ, β) (blue, "QAOA -E") for the 8-variable 2-SAT problem and the 16-variable weighted MaxCut problem, respectively.For comparison, we also show the corresponding distributions obtained by random sampling (green).Although for p = 1, the QAOA enhances the success probability compared to random sampling, for the 16-variable MaxCut problem, the probability of finding the ground state is less than 2%, as shown in Fig. 7.
From these results we conclude that as the number of variables increases, the largest success probability that can be achieved with the QAOA for p = 1 is rather small.Moreover, the p = 1 results obtained on a real gate-based quantum device are of very poor quality, suggesting that the prospects of performing p > 1 on such devices are, for the time being, rather dim.However, we can still use JUQCS to benchmark the performance of the QAOA for p > 1 on an ideal quantum computer by adopting the procedure sketched in Fig. 1.Simulations of the QAOA on noisy quantum devices are studied in Ref. [27].

B. QAOA for p > 1
Figure 8 shows results produced by combining JUQCS and the Nelder-Mead algorithm [25,26] which demonstrate that for p = 10 and the 18-variable 2-SAT problem instance 2 (see Appendix B), there exist γ and β which produce a success probability of roughly 40%.The minimization of the success probability starts with values for ( γ, β) which are chosen such that γ 1 = γ 1 and β 1 = β 1 , where γ 1 and β 1 denote the optimal values for the success probability extracted from the p = 1 QAOA simulation data, and all other γ i and β i are random.From Fig. 8(a), we conclude that the Nelder-Mead algorithm is effective in finding a minimum of the success probability (the spikes in the curves correspond to restarts of the search procedure).As can be seen in Fig. 8(b), the energy expectation E p=10 also converges to a stationary value as the number of Nelder-Mead iterations increases.The values of β i and γ i at the end of the minimization process are shown in Fig. 8(c,d).
Note that the use of the success probability as the cost function to be minimized requires the knowledge of the ground state, i.e. of the solution of the optimization problem.Obviously, for any problem of practical value, this knowledge is not available but for the purpose of this paper, that is for benchmarking purposes, we consider problems for which this knowledge is available.
When the function to be optimized has many local optima, the choice of the initial values can have a strong influence on the output of the optimization algorithm.We find that the initialization of the γ i 's and β i 's seems to be crucial for the success probability that can be obtained, suggesting that there are many local minima or stationary points.This is illustrated in Fig. 9 where we show the results of minimizing the success probability starting from γ i 's and β i 's taken from a linear annealing scheme (see Appendix A), for the same problem as the one used to produce the data shown in Fig. 8. Looking at Fig. 8(a,b), we see that the final success probability is 38.6% and E p=10 ≈ −14.22,whereas from Fig. 9(a,b), we deduce that the final success probability is only 8.5% and E p=10 ≈ −12.16.For comparison, the actual ground state energy is E (0) C = −19.Comparing also Figs. 8(c,d) and Fig. 9(c,d) clearly shows the impact of the initial val- ues of the γ i 's and β i 's on the results of the values after minimization.
For this particular 18-variable 2-SAT problem, minimizing the energy expectation E p=10 instead of the success probability did not lead to a higher success probability.In fact, the success probability only reached 0.1% and E p=10 ≈ −14.97 (data not shown).Although this energy expectation value and the initial value for the case shown in Fig. 9 (E p=10 ≈ −14.36) are better than the final expectation value in the case presented in Fig. 8, the success probabilities are much worse.From these results, we conclude that the optimization of γ and β with respect to the energy expectation value may in general result in different (local) optima than would be obtained by an optimization with respect to the success probability.Possible reasons for this might be that the energy landscape has (many) more local minima than the landscape of the success probability has local maxima or that the positions of the (local) minima in the energy landscape are not aligned with (local) maxima of the landscape of the success probability.
Figure 10 shows results for a 16-variable weighted Max-Cut problem for which minimizing E p=10 improves the success probability.The initialization is done according to the linear annealing scheme (see Appendix A).This is a clear indication that for finite p, the QAOA can be viewed as a tool for producing optimized annealing schemes [28,29].For this problem, the success prob- ability after 6000 Nelder-Mead iterations is quite large (≈ 85.6%).At the end of the minimization procedure, the γ i 's and β i 's deviate from their initial values (see Fig. 10(c,d)) but, as a function of the QAOA step i, show the same trends, as in Fig. 9.This suggests that the QAOA may yield γ i 's and β i 's that deviate less and less from their values of the linear annealing scheme as p increases.This observation is confirmed by the results shown in Fig. 11 for an 8-variable 2-SAT problem instance.We set p = 50 and use the linear annealing scheme to initialize the γ i 's and β i 's (see Appendix A) which yields a success probability of about 82.7%.Although we are using E p=50 as the function to be minimized, Fig. 11(b) shows that the success probability at the end of the minimization process is close to one.Further optimization of the γ i 's and β i 's in the spirit of the QAOA shows that small deviations of γ i 's and β i 's from the linear annealing scheme increase the success probability to almost one.Not surprisingly, this indicates that if the initial γ i 's and β i 's define a trial wave function which yields a good approximation to the ground state, the variational approach works well [18].
All in all, we conclude that the success of the QAOA strongly depends on the problem instance.While the investigated 8-variable 2-SAT problem and the 16-variable MaxCut problem work well, the success of the (also for quantum annealing hard) 2-SAT problem with 18 variables is rather limited.

TABLE I.
Results produced by the D-Wave 2000Q (DW 2000Q 2 1 chip) in comparison to the QAOA for various 2-SAT problem instances.Performance measures are the success probability and the ratio r.For the QAOA, parameter optimization uses the energy expectation value Ep as the function to be minimized, as if the QAOA was executed on a real device.The γi's and βi's (i = 1, . . ., p − 1) are initialized with the optimal values obtained from the minimization for p − 1 steps and γp = βp = 0.
Variables Success probability (%) ratio r (problem D-Wave QAOA D-Wave QAOA number) 3 µs 30 µs p = 1 p = 5 3 µs 30 µs p = 1 p = 5 Since the QAOA results produced by a real quantum device are of rather poor quality, for comparing the QAOA to quantum annealing on the D-Wave quantum annealer, we eliminate all device errors of the former by using simulators to perform the necessary quantum gate operations.
Table I summarizes the simulation results of the QAOA for p = 1 and p = 5 in comparison to the data obtained from the D-Wave 2000Q for 2-SAT problems with 8, 12 and 18 variables.Both the success probability and the ratio r are shown.We present data for annealing times of 3 µs (approximately the real time it takes the IBM Q Experience to return one sample for the p = 1 QAOA quantum gate circuit) and 30 µs.The results for the QAOA with p = 2, 3, 4, 5 steps are obtained by initializing the γ i 's and β i 's (i = 1, . . ., p − 1) with the optimal values obtained from the minimization for p−1 steps and setting γ p = β p = 0.
From Table I, we conclude that using the D-Wave, the probability of sampling the ground state (i.e. the unique solution of the 2-SAT problem) is much larger than the one obtained from running the QAOA on a simulator.Accordingly, the ratio r is also higher.However, the ratios r obtained from the D-Wave data show stronger variation with the particular problem instance (for 12 and 18 spins) than the ratios obtained from the QAOA which seem to systematically increase with the problem size for p = 5.The increase of the ratio r from the QAOA for p = 1 to the QAOA for p = 5 is much larger than the increase of the ratio r for the D-Wave 2000Q when using a ten times longer annealing time.On the other hand, the ratio r obtained from the D-Wave data is, in most cases, significantly larger than the one obtained from the QAOA.The D-Wave results and the QAOA results for p = 5 exhibit similar trends: for many of the 12-and 18spin problem instances, the success probabilities of the QAOA are roughly one tenth the probabilities obtained from the D-Wave machine for annealing times of 3µs, indicating that problem instances which are hard for the D-Wave machine are also hard for the QAOA with a small number of steps.

V. CONCLUSION
We have studied the performance of the quantum approximate optimization algorithm by applying it to a set of instances of 2-SAT problems with up to 18 variables and a unique solution, and weighted MaxCut problems with 16 variables.
For benchmarking purposes, we only consider problems for which the solution, i.e. the true ground state of the problem Hamiltonian is known.In this case, the success probability, i.e. the probability to sample the true ground state, can be used as the function to be minimized.This is the ideal setting for scrutinizing the performance of the QAOA.In a practically relevant setting, the true ground state is not known and one has to resort to minimizing the expectation value of the problem Hamiltonian.Furthermore, on a real device, this expectation value needs to be estimated from a (small) sample.Using a simulator, one can dispense of the sampling aspect.Our simulation data shows that the success of the QAOA based on minimizing the expectation value of the problem Hamiltonian strongly depends on the problem instance.
For a small number of QAOA steps p = 1, . . ., 50, the QAOA may be viewed as a method to determine the 2p parameters in a particular variational ansatz for the wave function.For our whole problem collection, we find that the effect of optimizing the p = 1 wave function on the success probability is rather modest, even when we run the QAOA on the simulator.In the case of a nontrivial 8-variable 2-SAT problem, for which the p = 1 QAOA on a simulator yields decent results, the IBM Q Experience produced rather poor results.
There exist 2-SAT problems for which the p = 5 QAOA performs satisfactorily (meaning that the success probability is much larger than 1%), also if we perform the simulation in the practically relevant setting, that is we minimize the expectation of the problem Hamiltonian, not the success probability.We also observed that (local) maxima of the success probability and (local) minima of the energy expectation value seem not always to be sufficiently aligned.
Quantum annealing can be viewed as a particular realization of the QAOA with p → ∞.This suggests that we may use for instance a linear annealing scheme to initialize the 2p parameters.For small values of p, after minimizing these parameters, depending on the problem instance, they may or may not resemble the annealing scheme.For the case with p = 50 studied in this paper, they are close to their values of the linear annealing scheme, yielding a success probability that is close to one.Summarizing, the performance of the QAOA varies considerably with the problem instance, the number of parameters 2p and their initialization.
For the set of problem instances considered, taking the success probability as a measure, the QAOA cannot compete with quantum annealing.The ratio r, which also requires knowledge of the true ground state, is a less sensitive measure for the algorithm performance.Therefore it shows less variation from one problem instance to another.But the ratios r obtained from the QAOA (using a simulator) are, with a few exceptions, still significantly smaller than those obtained by quantum annealing on a real device.

6 FIG. 3 .
FIG. 3. (color online)Same as Fig. 2 except that instead of the 8-variable 2-SAT problem instance 19, we solve a 16variable MaxCut problem given in table II in Appendix B.

FIG. 4 .FIG. 5 .
FIG. 4. (color online)The same as Fig.3except that the part containing the maximum success probability is shown on a finer grid.

FIG. 8 .
FIG. 8. (color online) Simulation results of the p = 10 QAOA applied to the 18-variable 2-SAT problem instance no. 2 (see Appendix B).Shown are (a) the success probability, (b) the energy E10 = E10( γ, β) as a function of the iteration steps of the Nelder-Mead algorithm, during the minimization of the success probability, (c) the values βi and (d) the values γi for i = 1, . . ., 10 as obtained after 14000 Nelder-Mead iterations.The initial values of ( γ, β) are chosen such that β1 = β * 1 and γ1 = γ * 1 , where β * 1 and γ * 1 are the optimal values extracted from the p = 1 QAOA minimization of the success probability, and all other βi and γi are random.For this 2-SAT problem, the actual ground state energy is E (0) C = −19.

FIG. 9 .
FIG.9.(color online) Same as Fig.8except that the initial values are chosen according to a linear annealing scheme (dashed (blue) line).Values after optimization are marked by (green) crosses.

FIG. 10
FIG. 10. (color online) Same as Fig. 8 except that (i) the results are for the 16-variable weighted MaxCut problem instance, (ii) the initial values are chosen according to a linear annealing scheme (dashed (blue) line), and (iii) the energy expectation value Ep=10 is taken as the cost function for the Nelder-Mead minimization procedure.The actual ground state energy is E (0) C = −17.7.Values after optimization are marked by (green) crosses.

FIG. 11
FIG. 11. (color online) Same as Fig. 8 except that (i) the results are for the 8-variable 2-SAT problem instance 19, (ii) the initial values are chosen according to a linear annealing scheme (dashed (blue) line), and (iii) the energy expectation value Ep=50 is taken as the cost function for the Nelder-Mead minimization procedure.The actual ground state energy is E (0) C = −9.

TABLE II .
The 16-variable weighted MaxCut problem instance.