Convergence of Digitized-Counterdiabatic QAOA: circuit depth versus free parameters

Recently, Digitized-Counterdiabatic (CD) Quantum Approximate Optimization Algorithm (QAOA) has been proposed to make QAOA converge to the solution of an optimization problem in fewer steps, inspired by Trotterized counterdiabatic driving in continuous-time quantum annealing. In this paper, we critically revisit this approach by focusing on the paradigmatic weighted and unweighted one-dimensional MaxCut problem. We study two variants of QAOA with first and second-order CD corrections. Our results show that, indeed, higher order CD corrections allow for a quicker convergence to the exact solution of the problem at hand by increasing the complexity of the variational cost function. Remarkably, however, the total number of free parameters needed to achieve this result is independent of the particular QAOA variant analyzed.

Given a Hamiltonian   , which encodes the solution of a hard binary optimization task [20], the main idea is to start from a trivial -qubit wavefunction and let it evolve by repeatedly applying two kinds of unitaries: a simple one, generated by a transverse-field mixer Hamiltonian   , providing quantum fluctuations independently to each particle, and a hard one, generated by the target many-body interacting Hamiltonian   .
To start, a quantum processor is employed to natively embed a parametric quantum circuit where each unitary acts for a certain time, to be optimized minimizing a cost function.The "time" parameters are known as angles in the QAOA paradigm, and are optimized using traditional computational routines on a classical computer.The cost function is the expectation of   over the circuit state.In QAOA, the quantum processing unit is used as a hardware accelerator to speed-up the computation of the cost function.Therefore, the QAOA is a hybrid classicalquantum algorithm, and it has been recently implemented on different quantum platforms [21][22][23][24].
Given enough expressiveness, the QAOA circuit represents an approximation of the target ground state that becomes better and better the more parameters are employed.It has been proven that QAOA is computationally universal [25,26] and equivalent, in the infinite-depth limit  → ∞ (with  the number of QAOA steps), to adiabatic quantum computing (AQC) [27][28][29][30][31].In fact, QAOA was originally proposed as a Trotterized, digital version of AQC where the Trotter error arising from the noncommuting operators   and   is zero a Present affiliation: Dipartimento di Fisica "E.Pancini", Università degli Studi di Napoli "Federico II", Complesso Universitario M. S. Angelo, via Cintia 21, 80126, Napoli, Italy b procolo.lucignano@unina.itwhen the integration time step is infinitesimal.Thus, the adiabatic theorem sets bounds on the performance of QAOA the large  [32] regime.However, when the number of parameters grows, classical optimization routines often struggle to find good minima due to the appearance of exponentially vanishing gradients of the cost function, a phenomenon known as barren plateaus [33].Even though avoiding these plateaus might prove to be impossible in the case of spin glass Hamiltonians [12,[34][35][36], smart choices of the initial condition of the minimization process [37][38][39][40][41] or artificial intelligence [42][43][44][45] can help circumvent this issue.
Moreover, in the era governed of noisy intermediate-scale quantum devices [46], low-depth QAOA circuits are much more practical since they can be physically implemented in real devices and are more robust against noise [47,48].For small values of , the analogy between QAOA and digitized AQC breaks down and QAOA has to be considered as a completely separate heuristic optimization method.
Recently, many QAOA variants have emerged to enhance its performance [41,[49][50][51][52][53][54][55][56].A non-exhaustive list of these variants includes: QAOA+ [57], which enhances the conventional QAOA by incorporating an extra problem-independent layer with multiple parameters; adaptive-bias QAOA [58], which adds local fields to the QAOA operators to decrease computation time; adaptive QAOA [13], a version of QAOA that iteratively selects mixers based on a systematic gradient criterion; recursive-QAOA [59], which aims to reduce the problem size by eliminating unnecessary qubits following a non-local scheme.This proliferation of variants highlights the ongoing effort to refine and extend QAOA for improved adaptability and efficiency in diverse quantum computing applications.
In addition, several strategies partly inspired by diabatic quantum computation have been ported to the QAOA language to further enhance its performance [60,61].Successful results have been achieved, for instance, by adding unitaries generated by a pool of local operators [62], adding  - interactions [63], using reinforcement learning [64,65], qubit-dependent angles like in multi-angle QAOA [66], or, ultimately, taking into account Trotterization errors via nextorder Baker-Hausdorff-Campbell (BHC) expansion [67,68].The latter scheme has been named digitized-counterdiabatic QAOA since it exploits operators arising from the Lie alge-bra of   and   to improve the algorithm, similarly to the nested commutator expansion of the adiabatic gauge potential used for shortcuts to adiabaticity in the adiabatic computing paradigm [69].This approach resulted in a recent experimental demonstration of quantum integer factorization using a trapped-ion quantum processor [70], suggesting that the key to unlock quantum advantage may rely on these hybrid schemes including corrections beyond first-order.Yet, there is still no clear understanding of these counterdiabatic corrections in QAOA and many open questions remain.The existing literature to this date mostly focused on first-order counterdiabatic corrections (referred to as QAOA-CD in the following) [71].
Here, we will make a step forward and also discuss the secondorder correction to the BHC formula (QAOA-2CD).We will give more details in the following sections, where we numerically address some of the open points of counterdiabatic QAOA, focusing our attention on the paradigmatic MaxCut problem for which QAOA had been originally proposed [1].
We consider one-dimensional (1D) chains of  spins with uniform or random interaction strengths, which can be easily mapped onto the 1D Ising model.Thanks to the Jordan-Wigner transformations, we can switch to a fermionic representation of the system Hamiltonian and run simulations with a reasonable computational effort [ ()] even in the presence of disorder [72].
The rest of this paper is organized as follows.We discuss the properties of the MaxCut Hamiltonian in Sec.II and review QAOA and its counterdiabatic corrections in Sec.III.In Sec.IV, we show the results of our numerical analysis for selected instances.The main finding here is that, even though counterdiabatic corrections allow to decrease the circuit depth  if compared to standard QAOA, the number of angles necessary for convergence to a given tolerance remains the same.We finally draw our conclusions in Sec.V.

II. MAXCUT MODEL
In graph theory, a graph is a set of vertices connected by edges.Given a graph, the maximum cut is a line that cuts the largest number of edges between two disjoint sets of vertices, such that the cut size (defined as the number of broken edges) is at least the size of any other cut.Finding this maximum cut is the NP-hard problem known as MaxCut.This problem can be expressed in a quadratic unconstrained binary optimization (QUBO) form and mapped to an Ising Hamiltonian [20].Thus, finding the maximum cut is equivalent to finding the ground state of the corresponding Ising Hamiltonian.This problem can be tackled using techniques from statistical and quantum physics, such as quantum and simulated annealing [16,27,30,[73][74][75][76][77][78][79][80][81], or QAOA.In what follows, we will focus on the latter.
We start defining the antiferromagnetic Ising model Hamiltonian, where angular brackets denote sites connected by a graph edge,    are Pauli matrices, and  is the number of vertices.We will express energies in units of the (positive) exchange coupling  and omit the latter, when unnecessary, for ease of notation.The minimum energy configuration of Eq. ( 1) corresponds to the maximum cut of the assigned graph, with the cutting line separating positive from negative spins.This model can be generalized assigning different weights to the various edges, which is usually named weighted MaxCut problem, described by the Hamiltonian Depending on the specific choice of the couplings  ,  , and on the graph structure, we can address several models.In this manuscript, we mostly focus on three specific cases: (i) the uniform antiferromagnetic Ising chain with periodic boundary conditions (PBC), known as ring of disagrees since spins are anti-aligned in the ground state; (ii) the uniform antiferromagnetic Ising chain with open boundary conditions (OBC); (iii) the Ising chain with OBC and random couplings.For all these models we analyze chains with  = 10, 16, 20 spins.

II.1. Ring of disagrees
As mentioned, the ring of disagrees is a one-dimensional chain of spin-1/2 particles with nearest-neighbor antiferromagnetic couplings.For this type of system, Eq. ( 1) becomes where the couplings between nearest neighbours are set to  ,+1 = 1 ∀.Periodic boundary conditions imply that   + =    ∀.For this specific model, analytical results regarding standard QAOA are available [1,82].Thus, we will use this model as a test bed for our analysis.

II.2. Open chain
For the open chain with uniform couplings   =  = 1 ∀, Eq. (1) becomes In this case, there are no analytical predictions as opposed to the PBCs case, and some of the considerations that are discussed in the literature regarding the ring of disagrees of Eq. ( 3) are not applicable to the open chain.

II.3. Random couplings
Another model studied in this paper is the open chain with random coupling energies, that we choose to be uniformly distributed [  = U ( [−1, 1]), where U indicates an uniform distribution in the given range].  becomes For each chain we generate  = 20 random instances and repeat our analysis for all of them.For all these models our goal is to compare QAOA, QAOA-CD and QAOA-2CD to figure out which algorithm is the most advantageous.

III. QAOA AND ITS VARIANTS
In this section we briefly outline the main concepts and equations underlying the QAOA algorithm and its variants used throughout the paper.
Conventional QAOA [1] consists in  repeated applications of two unitaries defined as   () =  − , where  is a parameter, to be optimized, and  is either the target Hamiltonian   or a the transverse-field Hamiltonian defined as where    is the Pauli matrix acting on the  th qubit.We choose as starting state the ground state of   , which, in the computational eigenbasis of the Pauli matrices    , reads and a variational wavefunction where  ( ) (, ) =    ()   () and  labels the number of QAOA steps.The ground-state wavefunction of   is then approximated minimizing the energy function with respect to the 2 variational parameters ì  = ( 1 , ...,   ), ì  = ( 1 , ...,   ): In the limit  → ∞,   ( ì  * , ì  * ) →  GS and | ( ) ( ì  * , ì  * )⟩ → | GS ⟩ where  GS and | GS ⟩ are the true ground state energy and wavefunction of   , respectively.In some special cases, it is possible to achieve the exact solution in a finite number of iterations  [1,82].Even when this is not the case, often just few iterations allow one to get a good approximate solution, whose accuracy can be quantified by the residual energy, defined as with its straightforward generalizations to QAOA-CD and QAOA-2CD, defined later.Here,  max (min) is the largest (smallest) eigenvalue of   .As such,   res measures the difference between the minimum energy at the -th step and the numerically exact ground-state energy, normalized with respect to the full (numerically exact) spectrum width  max −  min .

III.1. QAOA-CD
In this work, the point is modifying the QAOA algorithm to improve its performances at fixed number of iterations .The main idea is to include, at each iteration, new unitaries inspired by the missing terms of the BHC expansion.In particular, the Zassenhaus formula [83] reads where ,  ∈ R and, for each pair of operators  and  ,   (,  ) are homogeneous Lie polynomials in  and  .
For  = 2 we have In what we denote as QAOA-CD, we keep the  = 2 term in Eq. ( 12) and write, following Eq.( 13), each unitary operator of the algorithm as where The expectation of   over the variational wavefunction now depends on 3 parameters instead of the 2 parameters of regular QAOA.The cost function in this case reads At each step , the 3 parameters ( ì  * , ì  * , ì  * ) minimize the cost functional of Eq. ( 16) and | ( ) ( ì  * , ì  * , ì  * )⟩ is the approximate ground state.

III.2. QAOA-2CD
While the expansion of Eq. ( 12) has recently been studied [62,67], higher order corrections are still unexplored.In this paper we want to consider, alongside the operator given by Eq. ( 15), a new operator inspired by the next-order expansion of Eq. ( 12).The Lie polynomial given by the third order of Eq. ( 12) is We get what we call QAOA-2CD.In particular, we define the unitary operator at  th step as where The cost function   ( ì , ì , ì , ì , ì ) readily generalizes Eq. ( 16).Notice that in this case we consider five variational parameters per QAOA-2CD step, hence the total number of free angles in this variant of the algorithm is 5.
A question arises on whether the parameters resulting from the -step minimization might be used to guess the starting parameters at the the ( +1)-th step.Within all three frameworks, QAOA, QAOA-CD and QAOA-2CD, we adopt the INTERP recipe of Ref. [84].Taking as an example the ì 's, it can be shown that a good starting guess at the step  + 1 is given by the linear interpolation where  denotes the -th component of the vector,  = 1, . . .,  + 1, ì  *  is the -th component of the ì  as obtained from the minimization at the -th step.It is assumed that ì = 0. We will see in the next sections that, while this recipe well performs in most cases, random chains are more efficiently handled starting from scratch at each step .

IV. RESULTS
In this section, we critically discuss the main outcomes obtained within the QAOA-CD and QAOA-2CD frameworks.
To analyze the quality of our algorithms, we use as control parameter at the -th step the residual energy as defined in Eq. (11).
Before proceeding further, an important remark has to be done as far as the counterdiabatic corrections are concerned.The QAOA-CD and QAOA-2CD cost functions,   ( ì , ì , ì ) [Eq.( 16)] and   ( ì , ì , ì , ì , ì ), respectively depend on 3 and 5 parameters.These are conceived based on the intuition that adding higher order terms in the BHC expansion [85] reduces the Trotter error.In principle, according to the Zassenhaus formula of Eq. ( 12),   ,   and   are not free parameters but rather they are related to   and   by the following relations: If these constraints are assumed, the above-mentioned cost functions depend, at the -th step, on 2 parameters.The variants of QAOA-CD and QAOA-2CD, where Eqs. ( 21) are taken into account, will be referred to, in the following, as QAOA-CD-2 and QAOA-2CD-2, respectively.
A question arises about why to adopt the more computationally expensive QAOA-CD and QAOA-2CD, which require a minimization of a function depending on 3 and 5 parameters, instead of the (at least apparently) more advantageous QAOA-CD-2 and QAOA-2CD-2, where the minimization is carried out with respect to only two parameters per step.To answer this question, we carried out several tests, comparing the two approaches.An example is shown in Fig. 1, where the residual energy, as a function of the number of steps, is reported.We take, as a case study, a chain of  = 20 spins with OBC and uniform couplings (  = 1 ∀).We see that, at fixed , QAOA-CD-2 and QAOA-2CD-2 exhibit the worst performances, thus requiring a much larger number of iterations to approach the ground-state energy below a fixed threshold.
Such an odd behavior is easily explained in terms of cost function landscapes.It turns out that the cost function of QAOA-CD-2 and QAOA-2CD-2 have very complicated landscapes, if compared with QAOA-CD and QAOA-2CD.This is shown in Fig. 2, where we compare the cost function for  = 1 for both the QAOA-CD-2 and the QAOA-CD for the same systems as that of Fig. 1.For  = 1 the cost function in the case of the QAOA-CD-2 depends on the two parameters (, ) while for the QAOA-CD it depends on three independent parameters (, , ).To show the latter in a two-dimensional plot we fix  at the value it takes at the minimum of the cost function.Fig. 2 clearly shows that QAOA-CD-2 exhibits a much more complicated energy landscape if compared with QAOA-CD.The non-periodic sequence of light and dark regions makes it likely to fall in local minima, preventing the minimization algorithm to catch or even approach the global minimum.Moreover, because of the constraints of Eq. ( 21), the cost function loses its periodicity with respect to the 's and 's parameters, thus widely enlarging the portion of the - plane to be explored in the search for the global minimum.
Based on these observations, we will only focus on QAOA-CD and QAOA-2CD in the following.

IV.1. Ring of disagrees
In this section, we apply QAOA to the ring of disagrees.According to the QAOA, the functional to be minimized is obtained from Eqs. ( 3) and (9) as where we have defined As detailed in Appendix B, in Eq. ( 23) only sites within a subgraph, smaller in size than  (if 2 + 2 < ), are coupled to each other [1].As such, in place of the full Hamiltonian and trial wave function, we can define the reduced operators where   is the subgraph which the reduced operators act on and |+⟩  is an eigenstate of    .In the previous equations, we omit the dependence on the index  because, for each site , the translational invariance of the problem ensures that all   graphs are equal.As  increases, when the subgraph   coincides with or contains the graph representing the system, the problem converges to a solution: at this point, the QAOA variational problem contains the number of parameters required to exactly describe the problem and thus to find the exact solution.This is schematically sketched in Fig. 3.
Following Ref. [1] (see also Appendix C), the partition of the starting graph in subgraphs of dimension 2 + 2 allows to conjecture an upper bound at step  to the residual energy,   upper .It turns out that   upper = 0 if 2 ≥ , that is, when the dimension of the subgraph exceeds that of the starting graph.On the other hand, if 2 < From the previous discussion, we can infer that the number of steps needed to reach full convergence is /2 (( − 1)/2) for even (odd) number of spins.The same conclusion can be drawn also using Jordan-Wigner transformations, discussed next.
Following the previous discussion, we can predict the step at which full convergence shows up, i. e., the first step  that verifies the inequality 2 ≥ .In Fig. 4 we compare the residual (green curve) approaches, for a chain of  = 10 spins and uniform couplings, as a function of the step  (a) and the number of adopted parameters   (b).We can observe that all algorithms converge with the same number of parameters.energy of Eq. ( 11), calculated within the QAOA framework, with its conjectured values for a chain of  = 10 spins, PBC and uniform couplings.The main result, here, is that the numerical outcomes fully agree with the theoretical prediction, in particular as far as the step at which full convergence (zero residual energy) is observed ( = 5 for the specific investigated system).
As with the QAOA, in the QAOA-CD and QAOA-2CD approaches, for the ring of disagrees, the involved operators couple only sites belonging to subgraphs, and thus convergence occurs in a finite number of steps .We can also identify reduced -dependent operators for these two algorithms.In Fig. 5 we show the residual energy, for the same system as that of Fig. 4, for all three approaches as a function of both the step  (left panel) and the number of variational parameters involved in the calculation,   = , where  = 2, 3, 5 for QAOA, QAOA-CD and QAOA-2CD respectively.We observe that the number of steps  required to reach convergence gets lower for the QAOA-CD and QAOA-2CD algorithms, if compared with conventional QAOA [panel (a)].Nevertheless, in terms of the number of variational parameters involved in the calculation, it turns out that the residual energy goes to zero at the same value of   independently of the kind of algorithm used [panel (b)].

IV.1.1. Jordan-Wigner transformations
A rigorous justification of these observations can be found in terms of Jordan-Wigner (J-W) transformations [86].They allow to express spin operators   ,   and   , in terms of spinless fermions such as where †  and   are the fermionic creation and annihilation operators.These transformations usually map spin Hamiltonians onto nonlocal fermionic models, due to the presence of the strings   's.However, in the specific case of the Ising model the terms containing the   's cancel out and the Hamiltonian can be expressed in terms of local (on-site and nearest neighbors) operators, so we have Both Hamiltonians do not contain the   terms and are bilinear in the fermionic operators.The inherent translation invariance allows for a Fourier transform to be carried out on Eq. ( 28): After the transformation, the following basis (30) allows rewriting the Hamiltonian, at fixed , in terms of the basis of Pauli operators.It turns out that the resulting Hamiltonian only couples c and c †  to c− and c † − .As a consequence, the problem is recast into the solution of a set of two-level problems.In particular, for even  we can write where  ∈ N and k = (0, sin   , cos   ) , This equation can be easily generalized to odd  [82].In this way we have transformed the original Hamiltonian   describing a ring of  spins into an operator acting on /2 (( − 1)/2 if  is odd [82]) independent 1/2-spins, quantized with respect to a new axis, identified by k, within the Bloch sphere.These are referred to as pseudo-spins, to highlight the difference between the new "fictitious" spins and the "true" spins of the starting problem.This transformation is valid for any bilinear and local operator [82].
Using this transformation, it is possible to deduce that the number of   parameters required for convergence of the QAOA is  for a system with an even number of spins and  −1 for a system with an odd number of spins [82].The reason is that, for a system made up of a single spin, QAOA converges in a single step to the true ground state.In other words, any point on the surface of the Bloch sphere can be reached with at most two rotations around non collinear axes.Jordan-Wigner transformations map the interacting spin system to a system of noninteracting pseudo-spins in the reciprocal space, and, for each of them, a single QAOA step with just two parameters ensures convergence.Therefore, the number of parameters is   = 2(/2) (  = 2[( − 1)/2]) for even (odd) .This is sketched in Fig. 3 for 6-and 7-spin chains, but is valid for all values of .
Higher-order corrections to QAOA are expressed by Eqs. ( 15) and ( 19), which require higher-order commutators We can also apply J-W transformation to these terms: and, for QAOA-2CD, and All these terms are bilinear fermionic operators, hence they can be written in the form 2 k′′ • σ for any real numbers  and  and with a suitable choice of the unit vectors k′ and k′′ .
Eq. ( 38) readily generalizes the hypothesis stated for Eq. ( 31), according to which the convergence parameters are  or  − 1 depending on whether the chain is even or odd.Indeed, the two Hamiltonians given by Eqs.(31) and Eq. ( 38) share the same form.Hence, even if counterdiabatic terms (first or second order) are added, the same number of parameters   of the QAOA is required for convergence in the case of the ring of disagrees.This is consistent with the results shown in the right panel of Fig. 5.

IV.2. Open chain
Let us now consider a chain with open boundary conditions.Along the lines of the PBC problem, it is possible to apply Jordan-Wigner transformations also to this system.However, unlike the PBC case, it is not possible to recast the Hamiltonian in the form of Eq. ( 31), since the model of Eq. ( 4) is not translationally invariant.
A direct consequence is that it is not possible to infer the number of parameters necessary for convergence and that there is no analytical approach that can establish a priori that the number of these parameters must be identical for the three approaches.However, the outcomes of our calculations bring out that, as shown in the left panel of Fig. 6, the efficiency in terms of number of steps needed to reach convergence improves, for the open chain, when moving from QAOA to QAOA-CD to QAOA-2CD and, at any , we observe  res (QAOA) ≥  res (QAOA-CD) ≥  res (QAOA-2CD).Moreover, despite the lack of analytical evidence, our results indicate that the number of parameters   necessary for convergence at a given tolerance remains the same in the three approaches, and also the minimum value of the cost function remains the same even before convergence, as clearly shown in Fig. 6(b).
Let us take as an example the QAOA residual energy at the step  = 20 (  = 40),  res ≈ 2.8 × 10 −2 .A similar value is reached, within the QAOA-CD approach, at the step  = 10 (  = 30), whereas for the QAOA-2CD it occurs at the step  = 6 (  = 30).Figure 6(b) shows that, if we plot the residual energies as a function of   , all curves almost collapse onto each other.However, the QAOA-CD and QAOA-2CD show a slight advantage in the convergence to the solution, with respect to the simple QAOA.We can conclude that, while QAOA-2CD does not provide any sizable advantage over QAOA-CD in terms of number of parameters   , it converges with fewer steps .For the ring of disagrees it has been argued and analytically demonstrated [82] that the number of the parameters needed to reach convergence is the same for each algorithm that can be expressed in terms of noninteracting pseudo-spins.On the other hand, in the case of the open chain, this is not an obvious result since the lack of translational invariance does not allow one to write the model in terms of noninteracting pseudo-spins.

IV.3. Random couplings
In this section we extend our approach to an open chain with random couplings.We consider the Hamiltonian of Eq. ( 5) where   is a random variable uniformly distributed in [−, ] with  = 1.We consider spin chains with  = 10, 16, 20 spins.For fixed number of spins we analyze  = 20 instances.As expected, the three algorithms behave differently depending on the particular random instance considered, as some instances might be easier to optimize than some others.Therefore, it makes more sense to perform a statistical study to understand the average performances of QAOA and its variants for chains of different lengths.In particular, we study the residual energy of Eq. (11).At every step , each instance has different couplings and thus the optimization routines yields different residual energy  res .
First, in Fig. 7, we show our results for standard QAOA.We observe that, due to the simplicity of the cost function, the random instances have low variance with respect to the mean value (shown by the thick red line).When  increases, the residual energy decreases for all instances, exhibiting a vanishing variance, and the optimization converges to a good solution in all analyzed cases.Second, we turn our attention to the counterdiabaticallyassisted methods, QAOA-CD and QAOA-2CD.We repeat the optimization for the same  = 20 instances for a fair comparison.While running our numerical optimization in this random case, we observed that the INTERP method [see Eq. ( 20)], which works well for QAOA to select the initial angle for a warm-start of the optimization routine, is not well-suited to this case.The INTERP method allows one to build angles with smooth components and is motivated by the fact that QAOA angles must converge to smooth quantum annealing schedules in the limit  → ∞ [37].In order to do so and optimize the angles at step , one has to know the optimal angles at step (  − 1).Ultimately, this means that one needs to know the full optimization history for all the steps  = 1, . . .,  − 1, to optimize the angles at step .However, in the CD case and for the values of  that we have analyzed, we obtained much better results, in terms of residual energy and its variance, by using a brute-force optimization starting from  0 = 20 different initial angles for each value of .On the one hand, in this way we do not enforce any smoothness of the components of the optimized angles.On the other hand, by doing so we are not forced to know the entire optimization history and we can just optimize each QAOA step independently of the previous ones.For this reason, in this case we show our results obtained without INTERP.We summarize our results in Fig. 8.The different rows correspond to  = 10, 16, 20, respectively.The first column corresponds to QAOA-CD and the second column to QAOA-2CD.We can see indeed that in all analyzed cases  all the residual energies fall close to the mean value and that both methods converge to good approximate solutions within few steps .
We now compare the average residual energies of all QAOA variants for the analyzed system sizes.We show our results in Fig. 9 In each panel, we show the average residual energy of the three methods using solid lines; the shaded areas around the lines represent values that lie within one standard deviation from the corresponding mean, computed over all the instances at each value of .A plot of the standard deviations as a function of  is also shown in the insets of each panel.At the average level, we observe the same features also found in the uniform case: in particular, we see that QAOA-CD and QAOA-2CD systematically improve QAOA for all values of .Moreover, the standard deviations of the three methods are comparable with each other for all values of  and one order of magnitude smaller than the corresponding mean value.
We can take a look at the average step  required for convergence up to a fixed tolerance in the three methods.For instance, in Fig. 9 we plot the line corresponding to  res = 10 −2 and see what the required  for convergence is in the three cases.Here we explicitly comment the case of  = 10 but similar results hold for the other sizes as well.We see that, in order to achieve that level of residual energy, QAOA needs  = 12 steps, QAOA-CD needs  = 10 steps, while QAOA-2CD needs  = 5 steps.This fact confirms that adding counterdiabatic corrections to QAOA is able to speed-up convergence, in terms of the number of steps , even in the random case.This is in line with existing results about this subject [62,71].These findings contribute to quantum control research by providing valuable insights and innovative strategies, expanding our knowledge of control techniques in quantum systems [87].
Finally, we can study the residual energy as a function of the number of parameters   , similarly to what we have done in the uniform case.In Fig. 10, we show our results for  = 20.Also in this random case, we see that the average residual energy over all analyzed instances is the same, among the three methods, for any fixed number of parameters   .While applicable to the simple case at hand, these results require further investigation to determine their relevance for harder problems [88].

V. CONCLUSIONS
In this manuscript we critically assessed the practical advantage of digitized-counterdiabatic QAOA.By investigating two variants of QAOA with first and second-order counterdiabatic corrections, we evaluated their performance and convergence properties in the case of the MaxCut optimization problem.
Our results support the claim that incorporating counterdiabatic unitaries can lead to significant improvements in the efficiency of QAOA in terms of of the step  required for convergence.Indeed, by increasing the complexity of the variational cost function, we observed enhanced convergence towards exact solutions of the optimization problem under consideration.This finding highlights the potential of QAOA-CD and QAOA-2CD to speed-up the optimization process, reducing the required number of steps.
On the other hand, a noteworthy observation from our study is that the total number of variational parameters needed to achieve convergence remains independent of the specific QAOA variant analyzed.Convergence improvements appear to be significant, however it is important to consider the tradeoff between quantum complexity (i.e., the complexity of the quantum circuit that one has to realize) and classical complexity, associated with the more intricate cost function to be minimized.Balancing these complexities becomes crucial when considering the applicability of counterdiabatic techniques in real-world scenarios.
This observation prompts further investigation into the trade-offs and limitations of counterdiabatic approaches in quantum optimization algorithms.Future studies can explore alternative optimization problems domains and evaluate the scalability of counterdiabatic QAOA protocols to larger instances.By understanding the interplay between quantum and classical complexities, we can refine the utilization of counterdiabatic QAOA for a wide range of practical quantum computing applications.subgraph which is contained within the original graph.This subgraph is denoted as   .
Let us consider a ring of disagrees with  sites.C as To derive the general expression of   and the expression in Eq. ( 24), we start with the case  = 1 and follow the discussion at the beginning of Appendix A.
In Eq. (A3), valid for  = 1, we see that the involved spin operators are associated with the sites  − 1, ,  + 1 and  + 2. This allows us to consider subgraphs like the one shown in Fig. 11(a).The vertices  and  + 1 are connected with each other and with only one other vertex each: the subgraph considered has 4 vertices and 3 edges and has no periodic boundary conditions.We call this subgraph  1 .
It is necessary to emphasize that, while the operator   of Eq. (3) at step  = 1 involves the graph  1 , the operator   of Eq. ( 6), at step  = 1, involves a graph, which we call  ′ 1 , composed by only the sites  and  + 1: this is evident because   is a one-body operator.Therefore, the reduced operator of   will be In Eq. (A2) we see that the only term remaining after the explicit calculation of Eq. (A1) are the terms with    and   +1 : Eq (B1) in this sense is a generalization at  > 1 of the term exp(−  ) in Eq. (A2).So, in general, we call  ′ 1 the subgraph which the operator in Eq. (B1) acts on.The QAOA operator    () thus becomes Considering Eq. (A3), the reduced operator of   instead becomes In this case, the graph to be considered is instead the one depicted above because the terms that do not commute with the reduced operator are those that have    and   +1 and thus Finally, the initial state becomes given by the tensor product of the states involving only the sites associated with  1 .
For  = 2, instead, we have to consider the subgraph  2 [see Fig. 11(b)], while the graph  ′ 2 involves the sites  − 1, ,  + 1,  + 2, which coincides with the graph  1 .It is clear that the number of involved sites increases with .
For a generic  the subgraph considered becomes like in Fig. 11(c).So, for  > 1,  ′  ≡  −1 .The operators are then written as in Eq. ( 24), from which the QAOA operators can be calculated.
Thanks to the translational invariance of the model, the expectation value  (  )  [see Eq. ( 23)] at fixed  and  is the same whatever the pair of neighbouring sites considered.Moreover, for this type of graph, it has been conjectured [1,82] that the minimum of the cost function is independently of .Therefore, for the whole ring, the minimum of the cost function reads We now want to verify Eq. (B6) at least for the case  = 1.The states and unit operators can be explicitly written as where the minimum is in line with Eq. (B6).
Based on this argument, it is also possible to predict the step  * at which the QAOA converges.In fact, convergence is achieved when the subgraph   becomes bigger than the entire spin chain [1].Thus, in general, for an even-spin chain, QAOA converges when 2 * = , so when  ≥ /2,  ≥  /2 = −. (B12) When  is odd, it is no longer possible to find a value of  * such that 2 * = .However, the smallest subgraph that covers the entire original spin chain corresponds to 2 * = ( − 1), where   = − + 2. We can conclude that, for a generic ring of  sites for  <  (B13) This line of reasoning may be expanded to encompass QAOA-CD and QAOA-2CD, as demonstrated herein.We start from Eq. ( 23): in standard QAOA, this equation allows us to define the reduced graphs of Eq. (24).We can extend this study to QAOA-CD and QAOA-2CD.The explicit form of Eq. ( 35), Eq. ( 36) and Eq.(37)

(B15)
To demonstrate that we can restrict the study of Eq. ( 23) to subgraphs of the system for QAOA-CD, we observe that (B18) Equation (B18) allows us to identify the subgraph consider in QAOA-2CD: a graph with 6 + 2 vertices and 6 + 1 edges.In Fig. 5(a), we see that QAOA converges for a 10-spin chain at step  1 = 5, in this case we consider a subgraph of 2 1 + 2 = 12 vertices that is the first subgraph containing the starting graph.QAOA-CD converges at step  2 = 3: here, the subgraph has 4 2 + 2 = 14 vertices.For the same reason, QAOA-2CD converges at step  3 = 2, its subgraph has 6 3 + 2 = 14 verices.To ensure the validity of our findings, it is important to note that this study holds under the assumption of a periodic chain with boundary conditions.This is due to the translational invariance property that results in all terms in Eq. ( 23) being equivalent for every .In the case of an open or disordered chain, this property does not hold, and the results discussed in the main text are nontrivial.
The subgraph study for QAOA-CD and QAOA-2CD is valid also for the ring of disagrees because (only in this case) we can define operators in Eq. (B17) and in Eq. (B18).For the open/disordered chain, we cannot define Eq. (B17) and Eq.(B18) because the terms of the sum in Eqs.(B14) and (B15) do not commute.Thus, while QAOA is a local algorithm in the sense that it always acts on a part of the system [59], the same is not true for QAOA-CD and QAOA-2CD.

FIG. 1 .
FIG.1.Residual energy for a graph of  = 20 spins with OBC and uniform couplings.The results of the QAOA-CD-2 and QAOA-2CD-2 (depending both on 2 parameters) and of QAOA-CD and QAOA-2CD (depending on 3 and 5 parameters, respectively) are shown.The latter two exhibit the best performance in the convergence rate towards the ground state and, at any , produce lower residual energies.

1 FIG. 2 .
FIG. 2. Cost function in the - plane at step  = 1 for a graph of  = 20 spins with OBC and uniform couplings.Both (a) QAOA-CD-2 and (b) QAOA-CD are shown.In (b), the cost function depends also on , which has been fixed to the value it takes at the minimum.The left panel shows an evidently much more complex landscape.Moreover, releasing the constraints of Eqs.(21) in the right panel makes the function periodic with respect to  and , thus restricting the region of the - plane where the minimization has to be carried out.

FIG. 3 .
FIG. 3. The effective subgraphs at different steps  involved in the calculation of the functional  ()  for the chains composed by  = 6 (left) and  = 7 (right) spins, respectively.The sites coloured in purple highlight the  and  +1 sites.The dashed red, orange and green curves enclose the subgraph at steps  = 1, 2 and 3, respectively.For  = 3 the coloured areas contain the sites that are considered more than once because the subgraph covers the entire original graph.

FIG. 6 .FIG. 7 .
FIG.6.Residual energy for an open chain of  = 20 spins with uniform couplings as a function of (a) the number of steps  and (b) the number of parameters involved in the calculation at the th step,   (  = 2, 3, 5 for QAOA, QAOA-CD, QAOA-2CD, respectively).We see that QAOA-CD and QAOA-2CD converge with fewer steps and fewer parameters than QAOA.

FIG. 10 .
FIG.10. res versus number of parameters   for  = 20.We can see that the trend of QAOA-CD and QAOA-2CD are similar to that of QAOA.

FIG. 11 .
FIG. 11.(a) Representation of a subgraph at the step  = 1.(b) Representation of a subgraph at the step  = 2. (c) Representation of a subgraph for a generic .