This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Quantum Goemans-Williamson Algorithm with the Hadamard Test and Approximate Amplitude Constraints

Taylor L. Patti [ Department of Physics, Harvard University, Cambridge, Massachusetts 02138, USA NVIDIA, Santa Clara, California 95051, USA    Jean Kossaifi NVIDIA, Santa Clara, California 95051, USA    Anima Anandkumar Department of Computing + Mathematical Sciences (CMS), California Institute of Technology (Caltech), Pasadena, CA 91125 USA NVIDIA, Santa Clara, California 95051, USA    Susanne F. Yelin Department of Physics, Harvard University, Cambridge, Massachusetts 02138, USA
Abstract

Semidefinite programs are optimization methods with a wide array of applications, such as approximating difficult combinatorial problems. One such semidefinite program is the Goemans-Williamson algorithm, a popular integer relaxation technique. We introduce a variational quantum algorithm for the Goemans-Williamson algorithm that uses only n+1n{+}1 qubits, a constant number of circuit preparations, and poly(n)\text{poly}(n) expectation values in order to approximately solve semidefinite programs with up to N=2nN=2^{n} variables and MO(N)M\sim O(N) constraints. Efficient optimization is achieved by encoding the objective matrix as a properly parameterized unitary conditioned on an auxilary qubit, a technique known as the Hadamard Test. The Hadamard Test enables us to optimize the objective function by estimating only a single expectation value of the ancilla qubit, rather than separately estimating exponentially many expectation values. Similarly, we illustrate that the semidefinite programming constraints can be effectively enforced by implementing a second Hadamard Test, as well as imposing a polynomial number of Pauli string amplitude constraints. We demonstrate the effectiveness of our protocol by devising an efficient quantum implementation of the Goemans-Williamson algorithm for various NP-hard problems, including MaxCut. Our method exceeds the performance of analogous classical methods on a diverse subset of well-studied MaxCut problems from the GSet library.

]taylorpatti@g.harvard.edu

Refer to caption
(a) Controlled-unitary objective function
Refer to caption
(b) Controlled-unitary population balancing
Refer to caption
(c) Estimating Hadamard Test loss function terms
Refer to caption
(d) Estimating Pauli string amplitude constraints
Figure 1: Diagram of HTAAC-QSDP for the Goemans-Williamson algorithm with n=3n=3 non-auxiliary qubits. (1(a)) A classical problem of NN variables (here an NN-vertex MaxCut problem where N=8N=8). The weight matrix WW is used to generate the unitary UWU_{W}, which is rotated about the angle α\alpha and implemented as a controlled-unitary conditioned on the n+1n{+}1th-qubit (auxilary qubit). (1(b)) The population-balancing unitary UPU_{P} is generated by the diagonal matrix PP, which offsets the asymmetric edge weights on certain vertices in proportion to some constant β\beta. (1(c)) The Hadamard Test is used to efficiently evaluate the objective function and population balancing constraints. The nn-qubit state |ψ=UV|𝟎|\psi\rangle=U_{V}|\mathbf{0}\rangle is prepared with a variational quantum circuit UVU_{V}. Although UVU_{V} can, in general, be made of any set of parameterized nn-qubit quantum gates, in this work, we use the circuits described in Sec. 3.1. The n+1n+1th (auxilary) qubit is initialized as (|0i|1)/2(|0\rangle-i|1\rangle)/\sqrt{2}. Subsequently, the Hadamard Test is carried out: UWU_{W} or UPU_{P} is implemented as a controlled-unitary conditioned on the auxilary qubit, which is then measured to compute σn+1W,t=Im[ψ|UW|ψ]\langle\sigma_{n+1}\rangle_{W,t}=\text{Im}[\langle\psi|U_{W}|\psi\rangle] or σn+1P,t=Im[ψ|UP|ψ]\langle\sigma_{n+1}\rangle_{P,t}=\text{Im}[\langle\psi|U_{P}|\psi\rangle]. (1(d)) The M=2nM=2^{n} SDP amplitude constraints constraints are approximately enforced with only mpoly(n)m\sim\text{poly}(n) Pauli string constraints (Eq. 13). These are computed by collecting nn-qubit Pauli-zz measurements and using marginal statistics to estimate the mm expectation values.

1 Introduction

Semidefinite programming (SDP) is a variety of convex programming wherein the objective function is extremized over the set of symmetric positive semidefinite matrices 𝕊+\mathbb{S}^{+} [1]. Typically, an NN-variable extremization problem is upgraded to an optimization over NN vectors of length NN, which form the semidefinite matrices of 𝕊+\mathbb{S}^{+}. A versatile technique, SDP can be used to approximately solve a variety of problems, including combinatorial optimization problems (e.g., NP-hard problems, whose computational complexity grows exponentially in problem size) [2], and is heavily used in fields such as operations research, computer hardware design, and networking [3, 4]. In many such cases, semidefinite programs (SDPs) are integer programming relaxations, meaning that the original objective function of integer variables is reformed as a function of continuous vector variables [5], such as the Goemans-Williamson algorithm [6]. This allows the SDP to explore a convex approximation of the problem. Although such solutions are only approximate, SDPs are useful because they can be efficiently solved with a variety of techniques. These include interior-point methods, which typically run in polynomial-time in the number of problem variables NN and constraints MM [7]. In recent years, more efficient versions of these classical methods have been developed [8, 9].

An additional advantage of optimization with SDPs is that many have performance guarantees in the form of approximation ratios. Approximation ratios are a provable worst-case ratio between the value obtained by an approximation algorithm and the ground truth global optimum [10]. In short, SDPs represent an often favorable compromise between computational complexity and solution quality.

Table 1: Comparison of common quantum methods for classical optimization. The number of potential variables NN and constraints MM are given in terms of qubits nn. Whether or not the method provides guarantees on its solutions is discussed, as is its suitability for near-term quantum devices, (i.e., fewer than hundreds of qubits with limited error correction [11]). Our Hadmard Test objective function and Approximate Amplitude Constraint Quantum SDP (HTAAC-QSDP, Fig. 1) ensures SDP approximation ratios, is suitable for near-term variational quantum devices, and provides efficient objective function evaluation (via the Hadamard Test) and constraints (via a second Hadamard Test and O(n2)O(n^{2}) Pauli string constraints).
\topruleMethod NN, MM Scaling Solution Guarantee Near-Term Devices
Quantum Adiabatic [12, 13, 14] nn If Infinitely Slow Sometimes
Quantum Annealing [15, 16] nn No Yes
QAOA [17] nn Sometimes Yes
Boson Sampling [18] nn No Yes
QSDPs [19, 20, 21, 22, 23] 2n2^{n} SDP Approx. Ratios No
Variational QSDPs [24] 2n2^{n} SDP Approx. Ratios Yes
HTAAC-QSDP (Ours) 2n2^{n} SDP Approx. Ratios Yes, poly(n)\text{poly}(n) exp. vals./epoch

Despite the favorable scaling of classical SDPs, they still become intractable for high-dimensional problems. A variety of quantum SDP algorithms (QSDPs) that sample nn-qubit Gibbs states to solve SDPs with up to N=2nN=2^{n} variables and MO(N)M\sim O(N) constraints have been devised [19, 20, 21, 22, 23] (Table 1), as have methods for approximately preparing Gibbs states with near-term variational quantum computers [25, 26, 27]. The former of these algorithms are based on the Arora-Kale method [28] and provide up to a quadratic speedup in NN and MM. However, they scale significantly poorer in terms of various algorithm parameters, such as accuracy, and are not suitable for near-term quantum computers. Quantum interior-point methods have also been proposed [29, 30], in close analogy to the leading family of classical techniques.

Variational methods have long played a role in quantum optimization protocols [31] (Table 1), such as adiabatic computation [12, 13, 14], annealing [15, 16], the Quantum Approximate Optimization Algorithm (QAOA) [17], and Boson Sampling [18]. However, only recently have variational QSDPs been proposed [24, 32]. Patel et al [24] addresses the same optimization problems as the quantum Arora-Kale and interior-point based methods, but instead uses variational quantum circuits, which are more feasible in the near-term. Like other SDPs, this method offers specific performance guarantees in the form of approximation ratios [10]. While exact methods are efficient for some SDPs, for worst-case problems (e.g., problems with a large number of constraints MM, such as MaxCut) they may require the estimation of up to O(2n)O(2^{n}) observables per training epoch. Although it has been demonstrated that solving NP-hard optimization problems on variational quantum devices does not mitigate their exponential overhead, problems such as MaxCut may still retain APX hardness and are upper bounded by the same approximation ratio of classical methods [33]. Likewise, while parameterized quantum circuits can form Haar random 22-designs that result in barren plateaus [34], numerous methods of avoiding, mitigating, or and perturbing these systems to effectuate a more trainable space have been developed [35, 36, 37].

[Uncaptioned image]

Our Approach: We propose a new variational quantum algorithm for approximately solving QSDPs that uses Hadamard Test objective functions and Approximate Amplitude Constraints (HTAAC-QSDP, Fig. 1).

Theorem 1

HTAAC-QSDP for the Goemans-Williamson algorithm uses n+1n{+}1 qubits, a constant number of quantum measurements, and O(poly(n))O(\text{poly}(n)) classical calculations to approximate SDPs with up to N=2nN=2^{n} variables.

The details of the HTAAC-QSDP implementation must be engineered to each SDP and, in this work, we focus on the Goemans-Williamson algorithm [6], with particular emphasis on its application to MaxCut. In some cases, our method is nearly an exponential reduction in required expectation values, e.g., for high-constraint problems such as MaxCut. As described in Sec. 2, we achieve this, in part, through a unitary objective function encoding with the Hadamard Test [38] (Fig. 1(a)), which allows for the extremization of the entire NN-dimensional objective by estimating only a single quantum expectation value (Fig. 1(c)). Our quantum Goemans-Williamson algorimth for MaxCut requires M=N2nM=N\leq 2^{n} amplitude constraints, which we effectively enforce with only 1) a constant number of quantum measurements from a second Hadamard Test (Fig. 1(b)) and 2) the estimation of a polynomial number of properly selected, commuting Pauli strings (Fig. 1(d)).

In Sec. 3, we demonstrate the success of the HTAAC-QSDP Goemans-Williamson algorithm (Algorithm 1) by approximating MaxCut [39] for large-scale graphs from the well-studied GSet graph library [40] (Fig. 5). In addition to satisfying the 0.8780.878 MaxCut approximation ratio [6], HTAAC-QSDP achieves cut values that are commensurate with the leading gradient-based classical SDP solvers [41], implying that we reach optima that are very near the global optimum of these SDP objective functions.

Finally, in Sec. 4.1 we discuss the feasibility of the Hadamard encoding. For general SDPs, we establish an upper bound (Theorem 2) on the phase α\alpha of our Hadamard encoding, such that our technique is a high-quality approximation of the original SDP. The purpose of this upper bound is to demonstrate that tractably large values of the unitary phase α\alpha are permissible (i.e., α\alpha need not become arbitrarily small) for encoding a wide variety of large-scale problems. We discuss the known difficulty, and thus usefulness, of graph optimization problems under these conditions. Specifically:

Theorem 2

Our approximate Hadamard Test objective function UWiαWU_{W}\sim i\alpha W (Sec. 2.1) holds for graphs with randomly distributed edges if

α2N4e3=Nξ3,\alpha^{2}\lesssim\frac{N^{4}}{e^{3}}=\frac{N}{\xi^{3}},

where ee is the number of non-zero edge weights and ξ\xi is the average number of edges per vertex.

We can view the criteria of Theorem 2 in two ways: for SDPs with arbitrarily many variables NN, the size of α\alpha can be kept reasonably large while the Hadamard Test objective function (see Sec. 2.1) remains valid as long as 1) NN does not grow slower than the total number of edges ee, or 2) NN does not grow slower than the the cube of ξ\xi. Both of these conditions hold for graphs that are not too dense, meaning that they are widely satisfiable. For instance, the majority of interesting and demonstrably difficult graphs for MaxCut are relatively sparse [39, 10, 40, 42, 43]. We note that for graphs where edge-density is unevenly distributed, Theorem 2 should hold for the densest region of the graph, i.e., ξ\xi should be the average number of edges per vertex for the most highly connected vertices.

2 Efficient Quantum Semidefinite Programs

The standard form of an NN-variable, MM-constraint SDP is [1, 2]

minimizeX𝕊+W,Xsubject to Aμ,X=bμ,μMX0,\begin{split}&\text{minimize}_{X\in\mathbb{S}^{+}}\hskip 5.69046pt\langle W,X\rangle\\ &\text{subject to }\langle A_{\mu},X\rangle=b_{\mu},\hskip 5.69046pt\forall\mu\leq M\\ &X\succeq 0,\end{split} (1)

where WW is an N×NN\times N symmetric matrix that encodes the optimization problem and AμA_{\mu} (bμb_{\mu}) are N×NN\times N symmetric matrices (scalars) that encode the problem constraints. A,B\langle A,B\rangle denotes the trace inner product

A,B=Tr[ATB]=i,jNAijBij.\langle A,B\rangle=\text{Tr}\left[A^{T}B\right]=\sum_{i,j}^{N}A_{ij}B_{ij}. (2)

In this section, we detail a method of efficient optimization of the above SDP objective and constraints using quantum methods (Fig. 1), specifically by implementing Hadamard Tests and imposing a polynomial number of Pauli constraints. We provide a concrete example in the form of the Goemans-Williamson [6] algorithm for MaxCut [39], as summarized in Algorithm 1.

2.1 The Hadamard Test as a Unitary Objective

In quantum analogy to the objective function of Eq. 1, we wish to minimize W,X\langle W,X\rangle over the nn-qubit density matrices ρ\rho, which are positive semidefinite by definition. We generate these quantum ensembles ρ\rho from an initial density matrix ρ0\rho_{0} such that ρ=UVρ0UV\rho=U_{V}\rho_{0}U_{V}^{\dagger}, where UVU_{V} is a variational quantum circuit. This yields the quantum objective function

minimize W,ρ=Tr[Wρ].\text{minimize }\langle W,\rho\rangle=\text{Tr}\left[W\rho\right]. (3)

Throughout most of this work, we consider pure states such that ρ0=|00|\rho_{0}=|0\rangle\langle 0| and |ψ=UV|0|\psi\rangle=U_{V}|0\rangle, although we detail the case of mixed quantum states in Sec. 2.6. In the case of pure states, Eq. 3 yields

minimize ψ|W|ψ.\text{minimize }\langle\psi|W|\psi\rangle. (4)

The Hadamard Test (Fig. 1(c)) is a quantum computing subroutine for arbitrary nn-qubit states |ψ|\psi\rangle and nn-qubit unitaries UU [38]. It allows the real or imaginary component of the 2n2^{n}-state inner product ψ|U|ψ\langle\psi|U|\psi\rangle to be obtained by estimating only a single expectation value σn+1z\langle\sigma_{n+1}^{z}\rangle, which is the zz-axis Pauli spin on the n+1n{+}1th (auxiliary) qubit. For example, to obtain the imaginary component of ψ|U|ψ\langle\psi|U|\psi\rangle, we prepare the quantum state |ψ12(|0i|1)|\psi\rangle\otimes\frac{1}{\sqrt{2}}(|0\rangle-i|1\rangle) and apply a controlled-UU from the n+1n{+}1th qubit to |ψ|\psi\rangle, followed by a Hadamard gate on the n+1n{+}1th qubit. This produces the state

12[(IiU)|ψ|0+(I+iU)|ψ|1]\frac{1}{2}\left[(I-iU)|\psi\rangle\otimes|0\rangle+(I+iU)|\psi\rangle\otimes|1\rangle\right] (5)

upon which projective measurement yields

σn+1z=Im[ψ|U|ψ].\langle\sigma_{n+1}^{z}\rangle=\text{Im}\left[\langle\psi|U|\psi\rangle\right]. (6)

Rather than estimate the N2nN\leq 2^{n} expectation values required to characterize ρ\rho and optimize the loss function of Eq. 3, our method encodes the NN-dimensional objective matrix WW as the imaginary part of an nn-qubit unitary UW=exp(iαW)U_{W}=\exp(i\alpha W) (Fig. 1(a)). Here, the phase α\alpha is a constant scalar. UWU_{W} is then conditioned on the n+1n{+}1th (or auxilary) qubit as a controlled-unitary. We then use the Hadamard Test to calculate the objective term in the loss function

σn+1zW=Im[ψ|UW|ψ]=Im[UW,ρ].\langle\sigma_{n+1}^{z}\rangle_{W}=\text{Im}\left[\langle\psi|U_{W}|\psi\rangle\right]=\text{Im}\left[\langle U_{W},\rho\rangle\right]. (7)

The intuition for this objective function is that, for sufficiently small α\alpha, Im[UW]αW\text{Im}[U_{W}]\approx\alpha W. By restricting ourselves to quantum circuits with real-valued output states, we render the single expectation value σn+1zW\langle\sigma_{n+1}^{z}\rangle_{W} proportional to the objective function of Eq. 3, which requires NN expectation values to estimate. In Sec. 4.1, we analytically prove that, for many optimization problems, α\alpha has a practical upper bound such that Im[UW]αW\text{Im}[U_{W}]\approx\alpha W with a reasonably large α\alpha, even for arbitrarily large WW.

Refer to caption
Figure 2: The cut values CQC_{Q} obtained by the HTAAC-QSDP Goemans-Williamson algorithm with order-k2k\leq 2 Pauli constraints compared to max(CSDP)\text{max}(C_{\text{SDP}}), the best results of classical gradient-based SDPs (specifically, interior points methods) [41]. Our performance on the skewed binary and integer graphs narrowly exceeds that of the classical method (max(CSDP)<CQ\text{max}(C_{\text{SDP}})<C_{Q}), while the classical method narrowly outperforms our quantum method for the toroid graphs (max(CSDP)>CQ\text{max}(C_{\text{SDP}})>C_{Q}). Overall, the performance of our HTAAC-QSDP implementation and its classical counterpart are commensurate. HTAAC-QSDP exceeds the CQ/CMAX>0.878C_{Q}/C_{\text{MAX}}>0.878 MaxCut approximation ratio (red dashed line) for all graphs, where CMAXC_{\text{MAX}} is the true MaxCut of the graph. In this work, we assume CMAXC_{\text{MAX}} as the largest-known cuts of the GSet graphs, which were obtained from intensive and repeated heuristic searches [44]. The quantum mixed state implementation detailed in Sec. 2.6 is depicted in dark blue. It furnishes a higher rank solution and has marginally improved performance.

2.2 Quantum Goemans-Williamson Algorithm

We now illustrate how Im[UW]\text{Im}[U_{W}] can be a close approximation of αW\alpha W, including for optimization problems with an arbitrarily large number of variables NN. For concreteness, we select the NP-complete problem MaxCut [39], and specifically focus on the corresponding NP-hard optimization problem [45]. This problem is of particular interest due to its favorable 0.8780.878-approximation ratio with semidefinite programming techniques, notably the Goemans-Williamson algorithm [6], for which we now derive an efficient quantum implementation. The Goemans-Williamson algorithm is also applicable to to numerous other optimization problems, such as MaxSat and Max Directed Cut [6].

For a MaxCut problem with NN vertices viv_{i}, vjv_{j}, let WW be the matrix that encodes the up to N(N1)/2N(N-1)/2 non-zero edge weights in its entries WijW_{ij}. As the vertices lack self-interaction, Wii=0W_{ii}=0. The optimization problem is then defined as

maximize j<iWij1vivj2subject to vi=±1,\begin{split}&\text{maximize }\sum_{j<i}W_{ij}\frac{1-v_{i}v_{j}}{2}\\ &\text{subject to }v_{i}=\pm 1,\end{split} (8)

which can be mapped to the classical SDP with M=NM=N constraints

minimizeX𝕊+W,Xsubject toXii=1,iN.\begin{split}&\text{minimize}_{X\in\mathbb{S}^{+}}\hskip 5.69046pt\langle W,X\rangle\\ &\text{subject to}\hskip 5.69046ptX_{ii}=1,\hskip 5.69046pt\forall i\leq N.\end{split} (9)
Table 2: MaxCut statistics for all 800800-vertex graphs studied by the leading gradient-based classical SDP (interior points) method [41]. The highest known MaxCut values (CMAXC_{\text{MAX}}, found by intensive heursitics [44]) are greater the highest results obtained by the classical method (max(CSDP)\text{max}(C_{\text{SDP}})), but the approximation ratio max(CSDP)/CMAX>0.878\text{max}(C_{\text{SDP}})/C_{\text{MAX}}>0.878 is satisfied. The largest cut values of our HTAAC-QSDP Goemans-Williamson algorithm (max(CQ)\text{max}(C_{Q})) are comparable with max(CSDP)\text{max}(C_{\text{SDP}}), as are the average results (mean(CQ)\text{mean}(C_{Q})).
\topruleGraph CMAXC_{\text{MAX}} max(CSDP)\text{max}(C_{\text{SDP}}) max(CQ)/max(CSDP)\text{max}(C_{Q})/\text{max}(C_{\text{SDP}}) mean(CQ)/max(CSDP)\text{mean}(C_{Q})/\text{max}(C_{\text{SDP}})
G11 564564 542542 0.9670.967 0.9400.940
G12 556556 540540 0.9820.982 0.9530.953
G13 582582 564564 0.9720.972 0.9330.933
G14 30643064 29222922 1.0111.011 1.0001.000
G15 30503050 29382938 1.0091.009 0.9960.996
G20 941941 838838 1.0071.007 0.9830.983
G21 931931 841841 1.0011.001 0.9780.978

As described by Eq. 3, we can transform the optimization portion of Eq. 9 by substituting the classical positive semidefinite matrix XX for the quantum density operator ρ\rho. The solution to the SDP is then stored in |ψ|\psi\rangle, i.e., vi=sign(ψi)v_{i}=\text{sign}(\psi_{i}) (for more details, see Sec. 2.3). As detailed in Sec. 2.1, the evaluation of this objective function can be optimized by estimating a single expectation value with the Hadamard Test. Likewise, we now introduce a quantum alternative to the constraint Xii=1X_{ii}=1 from Eq. 9. First, note that due to the orthonormality of quantum states, the exact quantum equivalent of Eq. 9 is

ρii=1/2nN1.\rho_{ii}=1/2^{n}\leq N^{-1}. (10)

This rescaling changes neither the effectiveness nor the guarantees of the semidefinite program, because the salient feature of the constraint is that all of the quantum states have the same amplitude magnitude |ψi||\psi_{i}|, such that all of the vertices are of equal magnitude and none are disproportionately favored. The solutions ρ\rho and XX differ only by a constant factor, such that ρ=X/2n\rho=X/2^{n}. This yields the quantum MaxCut SDP

minimizeW,ρsubject toρii=2n,iN.\begin{split}&\text{minimize}\hskip 5.69046pt\langle W,\rho\rangle\\ &\text{subject to}\hskip 5.69046pt\rho_{ii}=2^{-n},\hskip 5.69046pt\forall i\leq N.\end{split} (11)

As graph weights are real-valued and symmetric (i.e., Wij=WjiW_{ij}=W_{ji}), WW is Hermitian. We can thus use it as the generator of UWU_{W} such that (Fig. 1(a))

UW=exp(iαW)=l(iα)ll!Wl=I+iα1!Wα22!W2iα33!W3+𝒪(W4).\begin{split}&U_{W}=\exp(i\alpha W)=\sum_{l}\frac{(i\alpha)^{l}}{l!}W^{l}\\ &=I+\frac{i\alpha}{1!}W-\frac{\alpha^{2}}{2!}W^{2}-\frac{i\alpha^{3}}{3!}W^{3}+\mathcal{O}(W^{4}).\end{split} (12)

As WW is real, the odd powers of ll in Eq. 12 are the imaginary components. The condition that Im[UW]W\text{Im}[U_{W}]\propto W is upheld iff, for the vast majority of variables i,ji,j, αWijα36(W3)ij\alpha W_{ij}\gg\frac{\alpha^{3}}{6}(W^{3})_{ij}. Note that, when this condition holds, σn+1zW\langle\sigma^{z}_{n+1}\rangle_{W} approximates W\langle W\rangle with only vanishing error and a rescaling by α\alpha. In Sec. 4.1, we prove Theorem 2, demonstrating that this condition is achievable with a tractable α\alpha (i.e., α\alpha larger than some fixed finite value that is constant in problem size NN) for a wide variety of graphs.

Next, we note that enforcing the M=N2nM=N\leq 2^{n} amplitude constraints ρii=2n,iN\rho_{ii}=2^{-n},\hskip 2.84544pti\leq N would require the estimation of all zz-axis Pauli strings of order knk\leq n (all Pauli strings with knk\leq n Pauli-zz operators) of the state |ψ|\psi\rangle. This would be a total of N1N-1 expectation values. As an alternative to this large overhead, HTAAC-QSDP proposes the use of Approximate Amplitude Constraints (Fig. 1(d)). For example, consider the set of m=n(n1)/2+nn2/2m=n(n-1)/2+n\sim n^{2}/2 Pauli strings of length k2k\leq 2

σaz,ρ=0,anσazσbz,ρ=0,ba,a,bn,\begin{split}&\langle\sigma_{a}^{z},\rho\rangle=0,\hskip 5.69046pt\forall a\leq n\\ &\langle\sigma_{a}^{z}\sigma_{b}^{z},\rho\rangle=0,\hskip 5.69046pt\forall b\neq a,\hskip 5.69046pta,b\leq n,\end{split} (13)

where σaz\sigma_{a}^{z} are the Pauli zz-operators on the aath qubit. We can use these equalities as partial constraints for the nn-qubit output state |ψ|\psi\rangle. This set of mn2/2m\sim n^{2}/2 constraints approximates the same restrictions as the set of M=NM=N constraints of Eq. 11 by limiting quantum correlations, as these indicate subsets of states with unequal populations. That is, each such zz-axis Pauli string is the difference of the total populations of two equal partitions of state space. To gain intuition, let us consider a two-qubit state |ψ=[ψ00,ψ01,ψ10,ψ11]T|\psi\rangle=[\psi_{00},\psi_{01},\psi_{10},\psi_{11}]^{T} and the k=1k=1 Pauli string σ0zI\sigma_{0}^{z}\otimes I. Using the constraints for Eq. 13, we enforce the equality |ψ00|2+|ψ01|2=|ψ10|2+|ψ11|2|\psi_{00}|^{2}+|\psi_{01}|^{2}=|\psi_{10}|^{2}+|\psi_{11}|^{2} which, while not fully enforcing the constraints of Eq. 11 (e.g., not enforcing that all states have equal populations), does enforce equal populations among a subset of states. This results in a lighter-weight and more flexible set of constraints. As an example, σ0zI\sigma_{0}^{z}\otimes I promotes all state components to be populated by disallowing states where the first qubit is in a computational basis state, such as |00|00\rangle or 12(|00+|01)\frac{1}{\sqrt{2}}(|00\rangle+|01\rangle). Likewise, the k=2k=2, zz-axis Pauli string σ0zσ1z\sigma_{0}^{z}\otimes\sigma_{1}^{z} constraint produces the equality |ψ00|2+|ψ11|2=|ψ01|2+|ψ10|2|\psi_{00}|^{2}+|\psi_{11}|^{2}=|\psi_{01}|^{2}+|\psi_{10}|^{2}, which would, for example, disallow the Bell State (|00+|11)/2(|00\rangle+|11\rangle)/\sqrt{2}. We highlight that the Pauli string constraints of Eq. 13 are commuting, such that they can be estimated as mm different marginal distributions from a single set of nn-qubit zz-axis measurements.

We again emphasize that these k2k\leq 2 constraints only approximately enforce the SDP constraint ρii=2n\rho_{ii}=2^{-n}. Fully satisfying this constraint would require restricting Pauli-zz correlations between any subset of the nn qubits, such that no states of unequal amplitude magnitudes are permitted. Eq. 10 can be fully satisfied if we constrain |ψ|\psi\rangle with all of the Pauli strings of length knk\leq n. However, as there exist nn choose kk zz-axis Pauli strings of order kk, this requires estimating k=1n(nk)=2n1\sum_{k=1}^{n}\left(\begin{smallmatrix}n\\ k\end{smallmatrix}\right)=2^{n}-1 different expectation values and greatly decreases the efficiency of the algorithm. Sec. 3 details that, in practice for 800800-vertex graphs, competitive results are obtained using only k2k\leq 2 constraint terms (Fig. 2 and Table 2), and optimization performance is largely saturated with terms k4k\leq 4 (Fig. 4 and Table 3).

Refer to caption
Figure 3: The cut value estimated by quantum observables CQ\langle C_{Q}\rangle obtained by HTAAC-QSDP vs the true SDP rounded cut value CQC_{Q} for the G11 (toroid), G14 (binary), and G20 (integer) graphs. As with classical SDP methods, low loss function values are correlated with high cut values. The strong correlation between the observable estimated cut and the rounded true cut value not only illustrates the convergence of the HTAAC-QSDP Goemans-Williamson algorithm despite its approximate nature, it also demonstrates its ability to extract cut values of many variables from few measurements.

In order to explicitly see how the mn2/2m\sim n^{2}/2 constraints of Eq. 13 largely enforce the constraint ρii=1/2n\rho_{ii}=1/2^{n}, let us take the example of a three-qubit state (n=3n=3), which can encode up to eight vertices (N=2n=8N=2^{n}=8) using HTAAC-QSDP. Any real-valued n=3n=3 state can be written generically as

|ψ=r,s,p=01ψrsp|ψrsp|\psi\rangle=\sum_{r,s,p=0}^{1}\psi_{rsp}|\psi_{rsp}\rangle

and its constraints from Eq. 13 are

σ1z,ρ=r,s|ψ0rs|2r,s|ψ1rs|2=0σ2z,ρ=r,s|ψr0s|2r,s|ψr1s|2=0σ3z,ρ=r,s|ψrs0|2r,s|ψrs1|2=0σ1zσ2z,ρ=p(s=r|ψrsp|2sr|ψrsp|2)=0σ1zσ3z,ρ=p(s=r|ψrps|2sr|ψrps|2)=0σ1zσ2z,ρ=p(s=r|ψprs|2sr|ψprs|2)=0.\begin{split}&\langle\sigma_{1}^{z},\rho\rangle=\sum_{r,s}|\psi_{0rs}|^{2}-\sum_{r,s}|\psi_{1rs}|^{2}=0\\ &\langle\sigma_{2}^{z},\rho\rangle=\sum_{r,s}|\psi_{r0s}|^{2}-\sum_{r,s}|\psi_{r1s}|^{2}=0\\ &\langle\sigma_{3}^{z},\rho\rangle=\sum_{r,s}|\psi_{rs0}|^{2}-\sum_{r,s}|\psi_{rs1}|^{2}=0\\ &\langle\sigma_{1}^{z}\sigma_{2}^{z},\rho\rangle=\sum_{p}(\sum_{s=r}|\psi_{rsp}|^{2}-\sum_{s\neq r}|\psi_{rsp}|^{2})=0\\ &\langle\sigma_{1}^{z}\sigma_{3}^{z},\rho\rangle=\sum_{p}(\sum_{s=r}|\psi_{rps}|^{2}-\sum_{s\neq r}|\psi_{rps}|^{2})=0\\ &\langle\sigma_{1}^{z}\sigma_{2}^{z},\rho\rangle=\sum_{p}(\sum_{s=r}|\psi_{prs}|^{2}-\sum_{s\neq r}|\psi_{prs}|^{2})=0.\end{split} (14)

Combined with the normalization constraint ψ|ψ=1\langle\psi|\psi\rangle=1, the above system of equations nearly guarantees that Eq. 10 is fulfilled. However, it still permits a small subset of states that do not satisfy Eq. 10 due to three-qubit correlations, e.g.,

|ψ=12[±1,0,0,±1,0,±1,±1,0]T.|\psi^{*}\rangle=\frac{1}{2}\begin{bmatrix}\pm 1,0,0,\pm 1,0,\pm 1,\pm 1,0\end{bmatrix}^{T}.

States with higher-order correlations such as |ψ|\psi^{*}\rangle, which neither satisfy Eq. 10 nor are disallowed by Eq. 13, can be avoided by adding higher-order Pauli string constraints. For the above n=3n=3 example, we would add the k=n=3k=n=3 constraint σ1zσ2zσ3z,ρ=0\langle\sigma_{1}^{z}\sigma_{2}^{z}\sigma_{3}^{z},\rho\rangle=0, which would disallow |ψ|\psi^{*}\rangle as σ1zσ2zσ3z,ρ=1\langle\sigma_{1}^{z}\sigma_{2}^{z}\sigma_{3}^{z},\rho^{*}\rangle=1.

Eq. 10 can also be systematically undermined by the unequal distribution of graph edges among the quantum states. For instance, the asymmetrically distributed edge-weights in skewed graphs (Fig. 5 left and Sec. 3). With such graphs, the minimization of the loss function can lead to outsized state populations for quantum states that encode high-degree (high edge-weight) vertices. Moreover, as the number of classical variables will not generally be a power of two, there will often be quantum states that are not encoded with a classical variable. For example and as detailed in Sec. 3, we use n=10n=10 qubits (2n=10242^{n}=1024 states) to optimize the 800800-vertex (N=800N=800) GSet graphs, such that the states 801801 to 10241024 are absent from the objective function. In such cases, the minimization of the loss function can lead to outsized state populations of quantum states that are present in the optimization function. In principle, these imbalances can be addressed by increasing the magnitude of the Pauli string amplitude constraints, but this is known to cause poor objective function convergence [46].

To redress this systematic skew, we add a population-balancing unitary UPU_{P} (Fig. 1(b)), which is implemented on |ψ|\psi\rangle via a second Hadamard Test (Sec. 2.1, Fig. 1(c)) and adds the loss function term σn+1P\langle\sigma_{n+1}\rangle_{P}. Specifically, UP=exp(iβP)U_{P}=\exp(i\beta P) where PP is some diagonal operator of edge weights Pii=(Pmaxj|ωij|)P_{ii}=-(P_{max}-\sum_{j}|\omega_{ij}|), where β\beta is an adjustable hyperparameter and Pmax=maxi(j|ωij|)P_{max}=\text{max}_{i}(\sum_{j}|\omega_{ij}|) is the maximum magnitude of edge weights for any given vertex. UPU_{P} works to balance the state populations by premiating the occupation of states that are lesser represented by or absent from the objective function σn+1W\langle\sigma_{n+1}\rangle_{W}.

Refer to caption
Figure 4: The effect of including higher-order HTAAC-QSDP Pauli string amplitude constraints in MaxCut optimization on the G11 (toroid), G14 (binary), and G20 (integer) graphs [40]. (Left) the performance of HTAAC-QSDP increases as higher-order Pauli strings are used to constrain state amplitudes. The algorithm’s performance saturates with k4k\approx 4, indicating that the benefits saturate with less than a polynomial number of Pauli string constraints (knk\leq n). As illustrated by this work (e.g., Fig. 2 and Table 2), k=2k=2 (mn2/2m\approx n^{2}/2) is often sufficient for competitive SDP optimization. (Right, solid lines) the variance of state magnitude σρ=var(ρii)=var(|ψi|2)\sigma_{\rho}=\text{var}(\rho_{ii})=\text{var}(|\psi_{i}|^{2}) vs the order kk of Pauli strings constraints. As kk increases, σρ\sigma_{\rho} decreases considerably, although this effect is largely saturated by k4k\approx 4. (Right, dashed line) in the absence of competing dynamics (i.e., σn+1W\langle\sigma_{n+1}\rangle_{W} and σn+1P\langle\sigma_{n+1}\rangle_{P}), the Pauli string constraints are fully enforced such that |ψi|N1/2|\psi_{i}|\rightarrow N^{-1/2} (σρ0\sigma_{\rho}\rightarrow 0) as knk\rightarrow n.

Combining both the efficient Hadamard Test objective function and the Approximate Amplitude Constraints, we can use simple gradient descent-based penalty methods [46] to find the solution. Specifically, we minimize the HTAAC-QSDP loss function for the Goemans-Williamson algorithm

(t)=σn+1W,t+σn+1P,t+λ[jσjz,ρt2+kjσjzσkz,ρt2]\begin{split}&\mathcal{L}(t)=\langle\sigma_{n+1}\rangle_{W,t}+\langle\sigma_{n+1}\rangle_{P,t}\\ &+\lambda\left[\sum_{j}\langle\sigma_{j}^{z},\rho_{t}\rangle^{2}+\sum_{k\neq j}\langle\sigma_{j}^{z}\sigma_{k}^{z},\rho_{t}\rangle^{2}\right]\end{split} (15)

at each time step tt by preparing a quantum state ρt\rho_{t} on a variational quantum computer. The scalar λ\lambda is the penalty hyperparameter. While for simplicity we have chosen a single, time-constant λ\lambda for all constraints, in principle each constraint jj could be parameterized with a distinct λj\lambda_{j}, each of which could also vary as a function of tt. The number of quantum circuit preparations required to optimize our HTAAC-QSDP protocol is constant with respect to the number of qubits nn (and thus to the maximum number of vertices N=2nN=2^{n}), as UW,ρt\langle U_{W},\rho_{t}\rangle and UP,ρt\langle U_{P},\rho_{t}\rangle each require only the Pauli-zz measurement σn+1z\langle\sigma_{n+1}^{z}\rangle on the auxilary qubit, and the mpoly(n)m\sim\text{poly}(n) amplitude constraint terms can be calculated from a single set of nn-qubit measurements on the state |ψ|\psi\rangle. The classical complexity of each training step scales as just mpoly(n)m\sim\text{poly}(n), as one marginal expectation value is calculated from the |ψ|\psi\rangle measurements for each of the mm constraints.

2.3 Retrieving SDP Solutions

At the end of our protocol, the SDP solution is encoded into |ψ|\psi\rangle. Like in other QSDP protocols, |ψ|\psi\rangle may either be used to extract the full NN-variable solution or for less computationally intensive analysis (i.e., to characterize the features of the solution or as an input state for further quantum protocols). For many SDPs, such as MaxCut, a good approximation of the solution (here, cut value) can also be extracted from the expectation values comprising the cost function.

To extract this approximate cut value, we note that Eq. 8 can be rewritten as

Wsum212min(j<iWijvivj),\frac{W_{\text{sum}}}{2}-\frac{1}{2}\text{min}(\sum_{j<i}W_{ij}v_{i}v_{j}), (16)

where Wsum=j<iWijW_{\text{sum}}=\sum_{j<i}W_{ij}. We note that this latter sum can be computed on a quantum device as

Wsum=N20|HnWHn|0,W_{\text{sum}}=\frac{N}{2}\langle 0|H^{\otimes n}WH^{\otimes n}|0\rangle, (17)

where HH is the Hadamard gate, as Hn|0H^{\otimes n}|0\rangle is the positive-phase and equal superposition of all states. Thus, WsumW_{\text{sum}} can be estimated with a Hadamard test where UWU_{W} is applied to the input state, which we here denote σn+1WH\langle\sigma_{n+1}\rangle_{W}^{\otimes H}. Likewise, note that the second summation in Eq. 16 is given by

j<iWijvivj=N2ψ|W|ψ,\sum_{j<i}W_{ij}v_{i}v_{j}=\frac{N}{2}\langle\psi|W|\psi\rangle, (18)

in the case that the constraints are well-enforced. This allows us to estimate the cut value with σn+1W\langle\sigma_{n+1}\rangle_{W}, the Hadamard test using the variationally prepared |ψ|\psi\rangle. Thus, the cost function can be estimated directly as

CQ=N4α(σn+1WHσn+1W).\langle C_{Q}\rangle=\frac{N}{4\alpha}(\langle\sigma_{n+1}\rangle_{W}^{\otimes H}-\langle\sigma_{n+1}\rangle_{W}). (19)

If the full solution |ψ|\psi\rangle is desired, then full real-space tomography of |ψ|\psi\rangle must be conducted by calculating the NN marginal distributions of all knk\leq n Pauli strings along the zz and xx-axes [47], although partial and approximate methods could make valuable contributions [48, 49]. We now show that once |ψ|\psi\rangle is determined, it suffices to assign the partition of each vertex as vi=sign(ψi)v_{i}=\text{sign}(\psi_{i}), or the sign of the state component ψi\psi_{i}.

In classical semidefinite programming algorithms, such as the Goemans-Williamson algorithm [6], the optimal solution XX^{*} is factorized by Cholesky decomposition into the product X=TTX^{*}=T^{\dagger}T, where TT is an upper diagonal matrix. The sign of each vertex viv_{i} is then designated as

vi={1,if𝐭i𝐠01,otherwise,v_{i}=\begin{cases}1,&\text{if}\ \mathbf{t}_{i}\cdot\mathbf{g}\geq 0\\ -1,&\text{otherwise},\end{cases} (20)

where 𝐭i\mathbf{t}_{i} are the column vectors of TT and 𝐠\mathbf{g} is a length-NN vector of normally distributed random variables gj𝒩(0,1)g_{j}\sim\mathcal{N}(0,1).

We define the quantum parallel by noting that as ρ=|ψψ|\rho=|\psi\rangle\langle\psi|, its Cholesky decomposition is simply the 2n×2n2^{n}\times 2^{n} matrix that has the first row ψ|\langle\psi| and and all other entries equal to zero. In this decomposition, Eq. 20 reduces to

vi={1,ifψi×g001,otherwise.v_{i}=\begin{cases}1,&\text{if}\ \psi_{i}\times g_{0}\geq 0\\ -1,&\text{otherwise}.\end{cases} (21)

As MaxCut has 2\mathbb{Z}_{2} symmetry, the cut values are symmetric under inversion, or flipping the sign of all vertices. This makes the sign of the normally distributed g0g_{0} irrelevant to the graph partitioning. Without loss of generality, we can therefore set g0=1g_{0}=1 and classify each vertex as vi=sign(ψi)v_{i}=\text{sign}(\psi_{i}).

2.4 Error Convergence

We now demonstrate that our method has an approximately O(1/t)O(1/t) error convergence rate. Assuming that our loss function \mathcal{L} is a convex function, which is generally only locally and/or approximately satisfied, it has been established that it will converge as O(1/t)O(1/t) for tt iterations if it is LL-Lipschitz continuous [50].

While parameterized quantum circuits are known to be LL-Lipschitz continuous [24, 34], we here, in the name or thoroughness, explicitly demonstrate this for our particular loss function. Specifically, a function f(x)f(x) is LL-Lipschitz continuous if

|f(x)f(y)|L|xy||\nabla f(x)-\nabla f(y)|\leq L|x-y| (22)

for all parameter inputs xx and yy. \mathcal{L} will be LL-Lipschitz continuous if each of its components are independently so.

Starting with the objective function σn+1zW=ψ|UW|ψ\langle\sigma_{n+1}^{z}\rangle_{W}=\langle\psi|U_{W}|\psi\rangle, note that

σn+1zW/θk=i0|U[Vk,U+UWU+]U|0,\partial\langle\sigma_{n+1}^{z}\rangle_{W}/\partial\theta_{k}=i\langle 0|U_{-}^{\dagger}[V_{k},U_{+}^{\dagger}U_{W}U_{+}]U_{-}|0\rangle, (23)

where VkV_{k} is the generator of the unitary matrix parameterized by θk\theta_{k}. Eq. 23 is now composed of two terms, each comprised entirely of normal matrices and vectors, save for perhaps the Hermitian generators VkV_{k}, with some extremal eigenvalue aka_{k}. Then, |σn+1zW/θk|2ak|\partial\langle\sigma_{n+1}^{z}\rangle_{W}/\partial\theta_{k}|\leq 2a_{k} and |kσn+1zWkσn+1zW|4ak|\nabla_{k}\langle\sigma_{n+1}^{z}\rangle_{W}-\nabla_{k}\langle\sigma_{n+1}^{z}\rangle_{W}|\leq 4a_{k}. This proof doubles for the constraint terms, save that we replace the unitary matrix UWU_{W} with some Pauli string observable.

Fig. 6 (left) demonstrates this approximate O(1/t)O(1/t) convergence for the cut value of G11. The approximate nature of this convergence stems from both the discontinuous rounding process and the nonconvexities of the optimization space.

2.5 Extensions to Other SDPs

Table 3: MaxCut statistics for the 800800-vertex graphs G11 (toroid), G14 (skew binary), and G20 (skew integer) for different orders of Pauli string constraints kk. We compare the best cut value max(CSDP)\text{max}(C_{SDP}) produced by the leading classical method [41] compared to those produced by HTAAC-QSDP, with each entry providing the ratio max(CQ)/max(CSDP)\text{max}(C_{Q})/\text{max}(C_{\text{SDP}}) (mean(CQ)/max(CSDP)\text{mean}(C_{Q})/\text{max}(C_{\text{SDP}})). With relatively few Pauli string constraints (k=4k=4), our method exceeds the performance of classical methods on all graphs studied.
\topruleGraph k=2k=2 k=4k=4 k=6k=6 k=8k=8 k=10k=10
G11 0.9670.967 (0.9400.940) 1.0191.019 (0.9840.984) 1.0071.007 (0.9990.999) 1.0111.011 (0.9950.995) 1.0221.022 (0.9980.998)
G14 1.0111.011 (1.0001.000) 1.0211.021 (1.0091.009) 1.0231.023 (1.0101.010) 1.0221.022 (1.0141.014) 1.0231.023 (1.0121.012)
G20 1.0071.007 (0.9830.983) 1.0251.025 (0.9930.993) 1.0321.032 (0.9920.992) 1.0491.049 (1.0001.000) 1.0431.043 (0.9930.993)

As explained above, the Goemans-Williamson algorithm [6] can be applied to numerous other optimization algorithms, such as MaxSat and Max Directed Cut [6]. Moreover, HTAAC-QSDP can be adapted to accommodate the constraints of various other SDPs. The use of our method is particularly advantageous when the constraints of a problem are amenable to being expressed through a tractable number of Pauli strings, or when these constraints can be approximately enforced by such a set of strings. The precise mapping of constraints to limited sets of Pauli strings depends on the problem at hand and may require some engineering. We here provide a few such examples.

2.5.1 Max and Min Bisection

As one example, consider the Min/Max Bisection problems [51]. Min/Max Bisection are particularly relevant to very-large-scale integration (VLSI) for integrated circuit design [52], a vital application area for large-scale SDPs.

The SDPs for estimating the Max Bisection problem has the standard form:

minimizeX𝕊+W,Xsubject toi,jXijN/2,andXii=1,iN.\begin{split}&\text{minimize}_{X\in\mathbb{S}^{+}}\hskip 5.69046pt\langle W,X\rangle\\ &\text{subject to}\hskip 5.69046pt\sum_{i,j}X_{ij}\leq-N/2,\\ &\text{and}\hskip 5.69046ptX_{ii}=1,\hskip 5.69046pt\forall i\leq N.\end{split} (24)

The first constraint is equivalent to requiring that half of the variables of XX be partitioned equally, hence the term “bisection”. In analogy with Eq. 11, Eq. 24 can be written as

minimizeW,ρsubject toi,jρijN/2andρii=2n,iN.\begin{split}&\text{minimize}\hskip 5.69046pt\langle W,\rho\rangle\\ &\text{subject to}\hskip 5.69046pt\sum_{i,j}\rho_{ij}\leq-N/2\\ &\text{and}\hskip 5.69046pt\rho_{ii}=2^{-n},\hskip 5.69046pt\forall i\leq N.\end{split} (25)

The second of these two constraints can be enforced by the Pauli strings constraints of Eq. 13. For large NN and assuming no systematic correlations between the ordering of the vertices, the first constraint can be ensured by adding any single Pauli string constraint

𝒪x=0,\langle\mathcal{O}_{x}\rangle=0, (26)

where 𝒪x\mathcal{O}_{x} is any Pauli string of σx\sigma^{x} operators. To see how Eq. 26 enforces the first constraint of Eq. 11, consider that any operator 𝒪x\mathcal{O}_{x} induces a bit-flip on a subset of qubits, such that each state ψi\psi_{i} is mapped to another state ψi\psi_{i^{\prime}}. This means that 𝒪x=ψ|𝒪x|ψ\langle\mathcal{O}_{x}\rangle=\langle\psi|\mathcal{O}_{x}|\psi\rangle is the sum of 2n12^{n-1} products 2ψiψi2\psi_{i}^{*}\psi_{i^{\prime}}, where for each ii, |ψi|2n/2|\psi_{i}|\approx 2^{-n/2}, as enforced by the Pauli-Z constraints of Eq. 13. If the probability that a random state ψi\psi_{i} of |ψ|\psi\rangle is positive is pp, then in the limit of large NN and uncorrelated vertex assignment

𝒪x=p2+(1p)22p(1p).\langle\mathcal{O}_{x}\rangle=p^{2}+(1-p)^{2}-2p(1-p). (27)

The above yields 𝒪x=0\langle\mathcal{O}_{x}\rangle=0 iff p=1/2p=1/2, which would correspond to the equal partitioning of the vertices required by the Bisection problems. In the case of correlated vertex encodings, the average of several Pauli-XX strings 𝒪x\langle\mathcal{O}_{x}\rangle can be considered. We note that Eq. 26 can be modified to enforce any partition ratio by solving for 𝒪x\langle\mathcal{O}_{x}\rangle (Eq. 27) with the desired pp.

2.5.2 MaxSat

MaxSat problems are another branch of optimization tasks with constraints that focus on equally weighted vertices. In Max kk-Sat problems, the number of logical boolean strings of length kk are maximized over a given set of boolean variables viv_{i} [53]. For example, Max 22-Sat is given by [6]

maximize j<i[aij(1vivj)+bij(1+vivj)]subject to vi=±1,\begin{split}&\text{maximize }\sum_{j<i}\left[a_{ij}(1-v_{i}v_{j})+b_{ij}(1+v_{i}v_{j})\right]\\ &\text{subject to }v_{i}=\pm 1,\end{split} (28)

where aija_{ij} and bijb_{ij} are the coefficients of the problem. To convert this problem into an SDP, we optimize the objective function

minimizeX𝕊+W,Xsubject toXii=1,iN,\begin{split}&\text{minimize}_{X\in\mathbb{S}^{+}}\hskip 5.69046pt\langle W^{-},X\rangle\\ &\text{subject to}\hskip 5.69046ptX_{ii}=1,\hskip 5.69046pt\forall i\leq N,\end{split} (29)

where Wij=aijbijW^{-}_{ij}=a_{ij}-b_{ij}. Note that Eq. 29 is equal to Eq. 9 and that the number of satisfied boolean strings can be extracted from an expectation value like Eq. 19, save that it is now paired with Wsum=j<iWij+W_{\text{sum}}=\sum_{j<i}W^{+}_{ij}, where Wij+=aij+bijW^{+}_{ij}=a_{ij}+b_{ij}.

2.5.3 Correlation Matrix Calculation

Correlation matrices are key to a wide array of statistical applications and can be estimated with limited information using SDPs [54, 55]. In particular, autocorrelation dictates that correlation matrices XX have unit diagonals (Xii=1,iNX_{ii}=1,\hskip 5.69046pt\forall i\leq N), much like MaxCut, Min/Max Bisection, and MaxSat, and can thus be addressed with the rescaled quantum version (ρii=2n\rho_{ii}=2^{-n}, Eq. 10) and approximated by the zz-axis Pauli string constraints. Meanwhile, the extremization of certain correlations (e.g., maximize/minimize XijX_{ij}) and the enforcement of inequality and equality constraints (e.g., 0.2<Xij<0.40.2<X_{ij}<0.4 or Xij=0.4X_{ij}=0.4) can be enforced by additional constraints with either Pauli strings or the tomography of a select few state components.

2.6 HTAAC-QSDP with Mixed Quantum States

We now overview the implementation of the HTAAC-QSDP Goemans-Williamson algorithm with mixed quantum states, such as might occur on a noisy quantum device or by interacting the utilized qubits with a set of unmeasured qubits. While the formalism for measuring Pauli strings on such systems is well known, we demonstrate how the required Hadamard Test remains viable. We start with ρR\rho_{R}, some mixed state equivalent of the variational state |ψ|\psi\rangle. Upon application of the controlled-UWU_{W} (without loss of generality for UPU_{P}) conditioned on the n+1n{+}1th qubit, we obtain the density matrix

12(|00|IρRI+i|01|ρRUWi|10|UWρRI+|11|UWρUW).\begin{split}&\frac{1}{2}(|0\rangle\langle 0|\otimes I\rho_{R}I+i|0\rangle\langle 1|\otimes\rho_{R}U_{W}^{\dagger}\\ -i&|1\rangle\langle 0|\otimes U_{W}\rho_{R}I+|1\rangle\langle 1|\otimes U_{W}\rho U_{W}^{\dagger}).\end{split} (30)

Upon applying a Hadamard gate on the n+1n{+}1th qubit and measuring it along the zz-axis, we obtain

i2Tr[ρRUWUWρR]=Im[Tr[UWρR]],\frac{i}{2}\text{Tr}[\rho_{R}U_{W}^{\dagger}-U_{W}\rho_{R}]=\text{Im}[\text{Tr}[U_{W}\rho_{R}]], (31)

which is proportional to Eq. 3 with the same coefficient α\alpha as prescribed by Eq. 7. This enables not only optimization, but also evaluation of the cut value estimation CQ\langle C_{Q}\rangle (Eq. 19), which is an accurate representation of the true cut value (Fig. 3). Alternatively, the element-wise rounded cut value calculated using Eq. 21 can still be utilized as an approximation to the traditional Goemans-Williamson rounding scheme. Although it would not result in the typical inner-product rounding, the sign of each vertex could still defined as the relative sign between each ψi\psi_{i} and ψ0\psi_{0}.

This mixed state formalism of the HTAAC-QSDP Goemans-Williamson algorithm works not only in principle, but also in practice. Fig. 2 displays the best cut value of a mixed state formalism with otherwise equal parameters (dark blue). The mixed state was generated by adding an unmeasured qubit to the randomly parameterized quantum circuit, which was then traced over prior to minimization and cut classification. The higher rank states moderately improved the performance on most graphs, with a mean higher-rank SDP value of 0.960.96 (G11), 1.011.01 (G14), and 0.980.98 (G20), compared to 0.940.94, 1.001.00, and 0.980.98 in the rank-1 case.

3 Simulations and Results

The viability of our HTAAC-QSDP Goemans-Williamson algorithm is displayed in Fig. 2 and Table 2. We compare CQC_{Q}, the cut values obtained by HTAAC-QSDP, to max(CSDP)\text{max}(C_{SDP}), the best results obtained by the leading gradient-based classical method [41]. We study all of the 800800-vertex MaxCut problems explored in [41] (Table 2) in order to make an extensive comparison with the leading classical gradient-based interior point method. These graphs represent a broad sampling from the well-studied GSet graph library [40]. Graphs G11, G12, and G13 have vertices that are connected to nearest-neighbors on a toroid structure and ±1\pm 1 weights (Fig 5, right), while G14 and G15 (G20 and G21) have binary weights 0 and 11 (integer weights ±1\pm 1) and randomly distributed edge density that is highly skewed towards the lower numbered vertices (Fig 5, left).

HTAAC-QSDP with k2k\leq 2-Pauli term constraints exceeds the performance of its classical counterpart on skewed binary and skewed integer graphs, and falls narrowly short of classical performance on toroid graphs (Fig. 2 and Table 2). The slight differences between the HTAAC-QSDP solution quality and those of the classical solver are typical of comparing different SDP solvers, which often differ slightly in their answers due to different numerical factors, including sparsity tolerance, rounding conventions (especially in the context of degenerate SDP solutions), and other hyperparameters [56]. All trajectories converge above the 0.8780.878-approximation ratio CQ/CmaxC_{Q}/C_{\text{max}} (dashed red line) guaranteed by classical semidefinite programming, where CmaxC_{\text{max}} is the highest known cut of each graph found by intensive, multi-shot, classical heuristics [44]. As SDPs are approximations of the optimization problem, the extremization of the loss function and the figure of merit (here, cut value) are highly correlated, particularly for well-enforced constraints. Fig. 3 demonstrates the strong correlation between the cut values estimated by quantum observables CQ\langle C_{Q}\rangle (Eq. 19) and the fully rounded SDP result CQC_{Q}, indicating that the HTAAC-QSDP Goemans-Williamson algorithm measurement of few quantum observables closely approximates the rounded and composited cut values of all variables.

Refer to caption
Figure 5: The structure of the G11 and G14/G20 GSet graphs, where non-zero edges between two vertices are marked as blue dots. Left) the edges of the toroid graphs (G11, G12, G13) follow a fixed connectivity, with edges extending between neighboring vertices on a torus structure. Right) the skewed graphs have connectivity that is drawn from a random distribution, with edges extending between arbitrary vertices (G14 and G15 binary weights 11 and 0, G20 and G21 integer weights ±1\pm 1). The degrees of each vertex are disproportionately biased towards the vertices of lower index, with edge density decaying as vertex number increases. We compare with all 800800-vertex graphs considered in the leading classical analog [41].

The addition of Pauli string amplitude constraints with k>2k>2 can better enforce Eq. 10, leading to higher-quality solutions to the SDPs. Fig. 4 and Table 3 demonstrate that increasing kk produces moderately higher CQC_{Q} values for the 800800-vertex graphs, until the performance increases saturate k4k\approx 4. Moreover, we note that at kk values 4\approx 4, HTAAC-QSDP outperforms the analogous classical algorithm for all graph types, indicating a well-conditioned solution. Likewise, the population variance (solid lines) σρ=var(|ψi|2)\sigma_{\rho}=\text{var}(|\psi_{i}|^{2}) decreases substantially until saturating near k4k\approx 4 at around σρN1\sigma_{\rho}\approx N^{-1}.

Note that, in the absence of the competing objective function (σn+1zW\langle\sigma_{n+1}^{z}\rangle_{W}) dynamics, all Pauli-zz correlations become restricted as knk\rightarrow n. This results in the complete constraint |ψi|=N1/2,i|\psi_{i}|=N^{-1/2},\hskip 5.69046pt\forall i, such that σρ0\sigma_{\rho}\rightarrow 0 (black dashed line in Fig. 4, left). We can understand this behavior in the context of other penalty methods [57]. In particular, consider the penalty methods formulation q(t,λ)=f(xt)+λtg(xt)q(t,\lambda)=f(x_{t})+\lambda_{t}g(x_{t}), where in our case xtx_{t} are the time-dependent optimized parameters, f(xt)=σn+1zW,tf(x_{t})=\langle\sigma_{n+1}^{z}\rangle_{W,t}, and g(xt)g(x_{t}) represents the constraints. In the limits tt\rightarrow\infty and λt\lambda_{t}\rightarrow\infty, it is known that xtx¯x_{t}\rightarrow\overline{x}, where x¯\overline{x} is the fully enforced solution of the hard constraints in some neighborhood of x0x_{0} [58]. That is, the constraint-only dynamics (black dashed line of Fig. 4) represents the solution quality with respect to constraints in the λt\lambda_{t}\rightarrow\infty limit.

The HTAAC-QSDP Goemans-Williamson algorithm was also tested against the G81 graph, a 20,000 vertex graph with a similar structure to G11-G13, and which is the largest MaxCut graph available that has been benchmarked against classical SDP methods. The average ratio between the HTAAC-QSDP obtained cut value for G81 and that of the classical counterpart was within 1%1\% of the 800800-vertex toroid graphs tested (ratio of 0.930.93). While the requisite circuit-depth for some quantum objective functions is known to grow linearly with the size of the circuit’s Hilbert space [59], this has not been shown for objective functions of the form of Eq. 15. This is in agreement with our observation that, while Hilbert space required to solve the G81 graphs is 3232 times larger than that for G11-G21, it’s circuit-depth is <8<8 times larger. This reduction in requisite circuit-depth could also be due to the influence of constraints, which may effectively limit the degrees of freedom of the quantum circuit, a phenomenon that has been referred to as a “Hamiltonian informed” model [59].

That being said, even if the worst-case exponential bounds for quantum optimization were saturated, that would not preclude them from having lesser overhead than classical SDPs. We note that classically solving an NP-hard problem of 2n2^{n} variables is exponentially hard with respect to the 2n2^{n} variables (that is, it scales as O(22n)O(2^{2^{n}})) and that, while these problems can be classically approximated using polynomial time and memory with respect to the number of variables, this still yields a classical complexity polynomial(2n)\sim\textrm{polynomial}(2^{n}). For instance, the leading classical techniques, interior point methods [56], have a memory cost that scales as O(N4)O(24n)O(N^{4})\sim O(2^{4n}) and a computational cost that scales as O(N2)O(22n)O(N^{2})\sim O(2^{2n}), making them in fact less efficient than the exponential bounds put on some worst-case quantum objective functions of O(2n/2)=O(2n1)O(2n)O(2^{n}/2)=O(2^{n-1})\sim O(2^{n}) memory cost and O(2n1)O(2n)O(2^{n-1})\sim O(2^{n}) computational cost, a quartic and quadratic reduction, respectively.

Even among the lighter-weight yet often less powerful first-order methods, the classical overhead is considerable. For example, the popular branch of projection-based methods has arithmetic and memory complexity of O(23n)O(2^{3n}) and O(22n)O(2^{2n}), respectively, for such 2n2^{n} variable problems [60]. Alternative algorithms, such as the Arora-Kale algorithm, can have time complexity as efficient as O~(M)\tilde{O}(M) [61], although for problems such as MaxCut this still reduces to O~(2n)\tilde{O}(2^{n})). On a similar topic of scale, we note that G81 was optimized with constraints of orders k4k\leq 4, which results in a similar ratio of approximate to exact constraints as that of smaller experiments.

Refer to caption
Figure 6: (Left) The convergence of the cut value for the G11 graph. The cut value approaches its maximum trajectory value as 1/t\sim 1/t, with some fluctuations due to both the discontinuity of the rounding process and the nonconvexities of the optimization space. The error convergence is markedly faster than 1/t1/\sqrt{t}. (Right) Although the general Hilbert space of quantum operators requires 4n4^{n} operators to span (black), in practice, many SDPs of interest, such as toroid graphs, can be encoded with a polynomial number of Pauli strings (gray). Moreover, many of these Pauli terms are relatively insignificant to the problem structure, such that the approximate matrix WapproxW_{\text{approx}} can be encoded with little error using only a fraction of the already reduced operator set (red).

3.1 Simulation Details

All simulations are done using a one-dimensional ring qubit connectivity, such that each qubit has two neighbors and the nnth qubit neighbors the 11st qubit. The circuit ansatz of the simulations for graphs G11-G21 (G81) is 120120 (900900) repetitions of two variationally parameterized yy-axis rotations interleaved with CNOT gates, alternating between odd-even and even-odd qubit control. The TensorLy-Quantum simulator [62, 63] is used for graphs G11-G21111Source code at https://github.com/tensorly/quantum/blob/main/doc/source/examples/htaacqsdp.py., while a modified version of cuStateVec [64] is used for G81. Gradient descent was conducted an ADAM [65] optimizer, with learning rate η=0.01\eta=0.01 (η=0.005\eta=0.005) for graphs G11-G21 (G81), as well as hyperparameters β1=0.9\beta_{1}=0.9, and β2=0.999\beta_{2}=0.999.

The evolution angle α\alpha was set as α=0.01\alpha=0.01 for all graphs. The values of β\beta used in this work were β=1/1.2\beta=1/1.2 for the toroid graphs and β=1/3\beta=1/3 for the skew binary and skew integer graphs. We did not employ a unitary UPU_{P} for the G81 graph. β\beta values should be chosen such that β<1\beta<1, as diagonal entries are always satisfiable (i.e., some population can always be placed on the state, lowering the loss function), in contrast to edge cuts, which are not (i.e., not every edge can be cut with any given partition for general graphs). β\beta values can be tuned on the device in the real time by monitoring the Pauli string constraints and choosing a β\beta that leads to largely satisfied Pauli constraints with relatively small coefficients λ\lambda, such that the convergence of the algorithm is not hindered by large constraints that outweigh the objective function or lead to unstable convergence. In this work, we set λα/m\lambda\propto\alpha/m, to keep the total influence of mm constraint terms in proportion to the objective term σn+1zWαW\langle\sigma_{n+1}^{z}\rangle_{W}\approx\alpha W. Specifically, for the 800800-vertex graphs, we choose λ=100α/m\lambda=100\alpha/m for the toroid and skew binary graphs and λ=50α/m\lambda=50\alpha/m for the skew integer graphs. For the G81 graph, λ=2000α/m\lambda=2000\alpha/m.

4 Theoretical Analysis of Hadamard Test Unitaries

This subsection addresses the implementation of the Hadamard tests found in this work, including the approximation of WW by UWU_{W} with a finite phase α\alpha, the construction of WW for difficult problems, and the implementation of the prescribed Hadamard Tests using ZX-calculus.

4.1 Finite Phase α\alpha for Unitary Objective Function

In this subsection, we derive Theorem LABEL:theorem.general_claims, which we here restate for completeness:

Theorem 1 Our approximate Hadamard Test objective function UWiαWU_{W}\sim i\alpha W (Sec. 2.1) holds for graphs with randomly distributed edges if

α2N4e3=Nξ3,\alpha^{2}\lesssim\frac{N^{4}}{e^{3}}=\frac{N}{\xi^{3}},

where ee is the number of non-zero edge weights and ξ\xi is the average number of edges per vertex.

As discussed above, Theorem 2 can be understood in two ways: that α\alpha satisfies the approximation of Eq. 32 while remaining tractably large for SDPs of arbitrary NN, as long as NN does not 1) grow slower than the total number of edges ee, or 2) grow slower than the the cube of ξ\xi. We again note that Theorem 2 should hold for the densest graph region if the edge density is assymetrically distributed, i.e., ξ\xi should be the average number of edges for the densest vertices. As the conditions of Theorem 2 hold for graphs that are not too dense, they are widely satisfiable as the majority of interesting and demonstrably difficult graphs for MaxCut are relatively sparse [39, 10, 40, 42, 43]. Many classes of graphs for which MaxCut is NP-hard satisfy Theorem 2 with tractably large α\alpha, even for arbitrarily large NN.

As an example, we consider non-planar graphs, for which optimization problems like MaxCut are typically NP-complete. While planar graphs can be solved in polynomial time [66], a graph is guaranteeably non-planar when e>3N6e>3N-6, which reduces to ξ3\xi\geq 3 in the limit of large NN [67]222Other families of easy graphs are even more restrictive, such as graphs that lack a giant component. In the limit of large NN, these graphs only occur in more than a negligible fraction of all possible graphs when d1/Nd\geq 1/N and thus ξ1/2\xi\geq 1/2 [68].. In accordance with Theorem 2, constant values of ξ\xi actually permit α\alpha to grow as N1/2N^{1/2}, while for constant α\alpha ξ\xi can grow as N1/3N^{1/3}, such that our approximation is valid for a wide variety of large-scale non-planar graphs. Indeed, most standard benchmarking graph sets have a small average number of edges per vertex, e.g., ξ=3\xi=3 [40, 42, 43], as sparse edge-density is common among graphs with real-world applications. In fact, solving MaxCut with many classes of dense graphs (i.e., graphs with nearly all non-zero edges) is provably less challenging, and therefore less interesting, than with their relatively sparse counterparts [69].

We here sketch a brief proof of Theorem 2 for Erdös–Rényi random graphs [70] with edge weights Wij𝒰[0,b]W_{ij}\sim\mathcal{U}_{[0,b]}, where 𝒰[0,b]\mathcal{U}_{[0,b]} is the uniform distribution on the interval [0,b][0,b]. The edge density of a graph is described as d=e/Ed=e/E, where ee is the number of non-zero edges ee and E=N(N1)/2E=N(N-1)/2 is the number of total possible edges. We provide a detailed proof of this and other graph types in the Appendix A.

Proof sketch of Theorem 2:

  • The Hadamard Test encoding is a good approximation when UWiαWU_{W}\propto i\alpha W.

  • This is satisfied when α33!|W3|ijα1!|W|ij\frac{\alpha^{3}}{3!}|W^{3}|_{ij}\ll\frac{\alpha}{1!}|W|_{ij} for typical edges between vertices ii,jj.

  • The mean of the non-zero elements in WW is Wij¯=b/2\overline{W_{ij}}=b/2 333The mean value of all elements of WW is Wij¯=db/2\overline{W_{ij}}^{\prime}=db/2, however the relevant comparison is between the elements of W3W^{3} and the non-zero elements of WW..

  • Elements (W3)ij(W^{3})_{ij} are the sum of N2\sim N^{2} terms WijWjkWklW_{ij}W_{jk}W_{kl}, with expectation value WijWjkWkl¯=b3d3/8\overline{W_{ij}W_{jk}W_{kl}}=b^{3}d^{3}/8. That is, the additive error between the Hadamard encoding terms and the matrix elements WijW_{ij} scales as b3d3/8b^{3}d^{3}/8.

  • α33!(W3)ij¯α1!Wij¯α224/(N2b2d3)\frac{\alpha^{3}}{3!}\overline{(W^{3})_{ij}}\ll\frac{\alpha}{1!}\overline{W_{ij}}\rightarrow\alpha^{2}\ll 24/(N^{2}b^{2}d^{3}).

  • Substituting d=2e/N(N1)2e/N2d=2e/N(N-1)\approx 2e/N^{2} and ξ=e/N\xi=e/N, we obtain Theorem 2.

4.2 Construction of WW

While some optimization problems of O(2n)O(2^{n}) variables may only be represented by graphs WW of O(4n)O(4^{n}) distinct Pauli strings, we here illustrate that there are many interesting (indeed, NP-hard optimization problems) for which this is not the case. In particular, we focus on the MaxCut problem and discuss toroid and Erdos Renyi random graphs.

Toroid graphs, or graphs that can be embedded on a toroid such that none of the edges connecting vertices cross, have a regular, yet still three-dimensional (non-planar), topological structure [71]. While encoding difficult problems, these data sets can often be represented in just poly(n)\text{poly}(n) Pauli strings, as is the case with the 8-100 tourus family to which G11 pertains (Fig. 6, right, gray). What is more, the number of Pauli strings can be reduced even further by instead constructing an approximate operator WapproxW_{\text{approx}} and permitting a small amount of error |WapproxW|¯/|W|¯0.015\overline{|W_{\text{approx}}{-}W|}/\overline{|W|}\leq 0.015 (Fig. 6, right, red). The population balancing graphs PP are a similar subset of structured graphs, whose diagonality renders them expressible with Pauli strings of only zz-axis and identity gates.

Likewise, we can use similarly few terms to construct Erdös–Rényi random graphs, in which edges between any two vertices are equally likely and occur with probability pp [70]. As Pauli strings are a spanning set, these same statistics are replicated when such strings are chosen randomly. Moreover, we note that each Pauli string adds O(2n)O(2^{n}) edges, such that the graph is rapidly populated.

4.3 Construction of Controlled Unitaries

The construction of unitary rotations UWU_{W} and UPU_{P} follows naturally from ZX calculus [72]. Specifically, Pauli Gadgets can be used to generalize unitary rotations from the qubit to which they are applied to multiple qubits through the use of O(n)O(n) CNOT gates, one on either size of each qubit and its rotated counterparts in a conjugated ladder scheme [73]. Moreover, rotations along distinct Pauli axes are achieved by conjugating these qubits with π/2\pi/2 rotation gates along said axis. The gates are selected to match the terms of WW or PP and α\alpha is the phase applied.

As this method generalizes to all rotations, it can also be paired with the controlled gates required for the Hadamard Test. Specifically, the Pauli rotation gate applied to the auxiliary-adjacent qubit is fashioned as a controlled rotation, with the control conditioned on the auxiliary qubit. Moreover, the small values of α\alpha used in this work make the addition of multiple Pauli terms by Trotterization favorable, as the error of this technique is bounded by α2/2\alpha^{2}/2 times the spectral norm [74].

5 Conclusion

The efficient optimization of very large-scale SDPs on variational quantum devices has to the potential to revolutionize their use in operations, computer architecture, and networking applications. In this manuscript, we have introduced HTAAC-QSDP, which uses n+1n+1 qubits to approximate SDPs of up to N=2nN=2^{n} variables and MO(N)M\sim O(N) constraints by taking only a constant number of quantum measurements and a polynomial number of classical calculations per epoch. As we approximately encode the SDP objective function into a unitary operator, the Hadamard Test can be used to optimize arbitrarily large SDPs by estimating a constant number of expectation values. Likewise, we demonstrate that the constraints of many SDPs can also be efficiently enforced with approximate amplitude constraints.

Devising a quantum implementation of the Goemans-Williamson algorithm, we approximately enforce the M=2nM=2^{n} constraints with a population-balancing Hadamard Test and the estimation of as few as mn2/2m\sim n^{2}/2 Pauli string expectation values. We demonstrate our method on a wide array of graphs from the GSet library [40], approaching and often exceeding the performance of the leading gradient-based classical SDP solver on all graphs [41]. Finally, we note that by increasing the order kk of our Pauli string constraints, we improve the accuracy of our results, exceeding the classical performance on all graphs while still estimating only polynomially-many expectation values.

The approximate amplitude constraints of HTAAC-QSDP make it particularly helpful for problems with a large number of constraints MM. The benefits of using the Hadamard Test objective function depend on the original optimization problem. The optimization matrix of many NP-hard problems can be encoded with controlled-unitaries of polynomially-many Pauli terms, such that the Hadamard Test would be efficient to implement. While such cases could instead be optimized by directly estimating polynomially-many different non-commuting expectation values, use of the Hadamard Test circumvents the need to prepare an ensemble of output states for each Pauli term, eliminating these extra circuit preparations. Conversely, optimizing worst-case objective functions with the Hadamard Test would require controlled-unitaries with up to O(2n)O(2^{n}) Pauli terms. While exact implementation of these problems with HTAAC-QSDP on purely gate-based quantum computers would be inefficient, such objective functions could be engineered as the natural time-evolution of quantum devices with rich interactions (e.g., quantum simulators [75, 76, 77] in their future iterations), or by approximate means.

Due to the immense importance of SDPs in scientific and industrial optimization, as well as the ongoing efforts to generate effective quantum SDP methods that are often limited by poor scaling in key parameters such as accuracy and problem size, our work provides a variational alternative with tractable overhead. In particular, the largest SDPs solved via classical methods, which required over 500 teraFLOPs on nearly ten-thousand CPUs and GPUs [78], could be addressed by our method with just 20\sim 20 qubits.

In future work, the techniques of this manuscript can be extended to additional families of SDPs. For instance, SDPs that extremize operator eigenvalues are a natural application for quantum circuits [79]. Similarly, variational quantum linear algebra techniques [80] can potentially be adapted to enforce the more general constraints

Aμ,X=bμ,μM\langle A_{\mu},X\rangle=b_{\mu},\hskip 5.69046pt\forall\mu\leq M

of Eq. 1. In many cases, more general constraints are likewise satisfiable with the Pauli string constraints, as suggested in this work. For instance, when the number of requisite constraints MM is much smaller than the number of variables NN, or, as is the case with our quantum implementation of the Goemans-Williamson algorithm, by enforcing a relatively small subset of the constraints.

6 Acknowledgments

At CalTech, A.A. is supported in part by the Bren endowed chair, and Microsoft, Google, Adobe faculty fellowships. S.F.Y. thanks the AFOSR and the NSF (through the CUA PFC and QSense QLCI) for funding. The authors would like to thank Matthew Jones, Robin Alexandra Brown, Eleanor Crane, Alexander Schuckert, Madelyn Cain, Austin Li, Omar Shehab, Antonio Mezzacapo, Mark M. Wilde, and Patrick J. Coles for useful conversations.

References

  • [1] Stephen P. Boyd and Lieven Vandenberghe. “Convex optimization”. Cambridge Press.  (2004).
  • [2] Michel X. Goemans. “Semidefinite programming in combinatorial optimization”. Mathematical Programming 79, 143–161 (1997).
  • [3] Lieven Vandenberghe and Stephen Boyd. “Applications of semidefinite programming”. Applied Numerical Mathematics 29, 283–299 (1999).
  • [4] Wenjun Li, Yang Ding, Yongjie Yang, R. Simon Sherratt, Jong Hyuk Park, and Jin Wang. “Parameterized algorithms of fundamental np-hard problems: a survey”. Human-centric Computing and Information Sciences 10, 29 (2020).
  • [5] Christoph Helmberg. “Semidefinite programming for combinatorial optimization”. Konrad-Zuse-Zentrum fur Informationstechnik Berlin.  (2000).
  • [6] Michel X. Goemans and David P. Williamson. “Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming”. J. ACM 42, 1115–1145 (1995).
  • [7] Florian A. Potra and Stephen J. Wright. “Interior-point methods”. Journal of Computational and Applied Mathematics 124, 281–302 (2000).
  • [8] Haotian Jiang, Tarun Kathuria, Yin Tat Lee, Swati Padmanabhan, and Zhao Song. “A faster interior point method for semidefinite programming”. In 2020 IEEE 61st annual symposium on foundations of computer science (FOCS). Pages 910–918. IEEE (2020).
  • [9] Baihe Huang, Shunhua Jiang, Zhao Song, Runzhou Tao, and Ruizhe Zhang. “Solving sdp faster: A robust ipm framework and efficient implementation”. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS). Pages 233–244. IEEE (2022).
  • [10] David P. Williamson and David B. Shmoys. “The design of approximation algorithms”. Cambridge University Press.  (2011).
  • [11] Nikolaj Moll, Panagiotis Barkoutsos, Lev S Bishop, Jerry M Chow, Andrew Cross, Daniel J Egger, Stefan Filipp, Andreas Fuhrer, Jay M Gambetta, Marc Ganzhorn, et al. “Quantum optimization using variational algorithms on near-term quantum devices”. Quantum Science and Technology 3, 030503 (2018).
  • [12] Edward Farhi, Jeffrey Goldstone, Sam Gutmann, and Michael Sipser. “Quantum computation by adiabatic evolution” (2000). arXiv:quant-ph/0001106.
  • [13] Tameem Albash and Daniel A. Lidar. “Adiabatic quantum computation”. Rev. Mod. Phys. 90, 015002 (2018).
  • [14] Sepehr Ebadi, Alexander Keesling, Madelyn Cain, Tout T Wang, Harry Levine, Dolev Bluvstein, Giulia Semeghini, Ahmed Omran, J-G Liu, Rhine Samajdar, et al. “Quantum optimization of maximum independent set using rydberg atom arrays”. Science 376, 1209–1215 (2022).
  • [15] Tadashi Kadowaki and Hidetoshi Nishimori. “Quantum annealing in the transverse ising model”. Phys. Rev. E 58, 5355–5363 (1998).
  • [16] Elizabeth Gibney. “D-wave upgrade: How scientists are using the world’s most controversial quantum computer”. Nature541 (2017).
  • [17] Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. “A quantum approximate optimization algorithm”. arXiv (2014). arXiv:1411.4028.
  • [18] Juan M Arrazola, Ville Bergholm, Kamil Brádler, Thomas R Bromley, Matt J Collins, Ish Dhand, Alberto Fumagalli, Thomas Gerrits, Andrey Goussev, Lukas G Helt, et al. “Quantum circuits with many photons on a programmable nanophotonic chip”. Nature 591, 54–60 (2021).
  • [19] Fernando G. S. L. Brandão, Amir Kalev, Tongyang Li, Cedric Yen-Yu Lin, Krysta M. Svore, and Xiaodi Wu. “Quantum SDP Solvers: Large Speed-Ups, Optimality, and Applications to Quantum Learning”. 46th International Colloquium on Automata, Languages, and Programming (ICALP 2019) 132, 27:1–27:14 (2019).
  • [20] Joran Van Apeldoorn and András Gilyén. “Improvements in quantum sdp-solving with applications”. In Proceedings of the 46th International Colloquium on Automata, Languages, and Programming (2019).
  • [21] Joran van Apeldoorn, Andràs Gilyèn, Sander Gribling, and Ronald de Wolf. “Quantum sdp-solvers: Better upper and lower bounds”. Quantum 4, 230 (2020).
  • [22] Fernando G.S.L. Brandão and Krysta M. Svore. “Quantum speed-ups for solving semidefinite programs”. In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS). Pages 415–426.  (2017).
  • [23] Fernando G.S L. Brandão, Richard Kueng, and Daniel Stilck França. “Faster quantum and classical SDP approximations for quadratic binary optimization”. Quantum 6, 625 (2022).
  • [24] Dhrumil Patel, Patrick J. Coles, and Mark M. Wilde. “Variational quantum algorithms for semidefinite programming” (2021). arXiv:2112.08859.
  • [25] Anirban N. Chowdhury, Guang Hao Low, and Nathan Wiebe. “A variational quantum algorithm for preparing quantum gibbs states” (2020). arXiv:2002.00055.
  • [26] Taylor L Patti, Omar Shehab, Khadijeh Najafi, and Susanne F Yelin. “Markov chain monte carlo enhanced variational quantum algorithms”. Quantum Science and Technology 8, 015019 (2022).
  • [27] Youle Wang, Guangxi Li, and Xin Wang. “Variational quantum gibbs state preparation with a truncated taylor series”. Physical Review Applied 16, 054035 (2021).
  • [28] Sanjeev Arora, Elad Hazan, and Satyen Kale. “The multiplicative weights update method: A meta-algorithm and applications”. Theory of Computing 8, 121–164 (2012).
  • [29] Iordanis Kerenidis and Anupam Prakash. “A quantum interior point method for lps and sdps”. ACM Transactions on Quantum Computing1 (2020).
  • [30] Brandon Augustino, Giacomo Nannicini, Tamás Terlaky, and Luis F. Zuluaga. “Quantum interior point methods for semidefinite optimization” (2022). arXiv:2112.06025.
  • [31] M. Cerezo, Andrew Arrasmith, Ryan Babbush, Simon C. Benjamin, Suguru Endo, Keisuke Fujii, Jarrod R. McClean, Kosuke Mitarai, Xiao Yuan, Lukasz Cincio, and Patrick J. Coles. “Variational quantum algorithms”. Nature Reviews Physics 3, 625–644 (2021).
  • [32] Kishor Bharti, Tobias Haug, Vlatko Vedral, and Leong-Chuan Kwek. “Noisy intermediate-scale quantum algorithm for semidefinite programming”. Phys. Rev. A 105, 052445 (2022).
  • [33] Lennart Bittel and Martin Kliesch. “Training variational quantum algorithms is np-hard”. Phys. Rev. Lett. 127, 120502 (2021).
  • [34] Jarrod R. McClean, Sergio Boixo, Vadim N. Smelyanskiy, Ryan Babbush, and Hartmut Neven. “Barren plateaus in quantum neural network training landscapes”. Nature Communications 9, 4812 (2018).
  • [35] Carlos Ortiz Marrero, Mária Kieferová, and Nathan Wiebe. “Entanglement-induced barren plateaus”. PRX Quantum 2, 040316 (2021).
  • [36] Taylor L. Patti, Khadijeh Najafi, Xun Gao, and Susanne F. Yelin. “Entanglement devised barren plateau mitigation”. Phys. Rev. Res. 3, 033090 (2021).
  • [37] Arthur Pesah, M. Cerezo, Samson Wang, Tyler Volkoff, Andrew T. Sornborger, and Patrick J. Coles. “Absence of barren plateaus in quantum convolutional neural networks”. Phys. Rev. X 11, 041011 (2021).
  • [38] Dorit Aharonov, Vaughan Jones, and Zeph Landau. “A polynomial quantum algorithm for approximating the jones polynomial”. Algorithmica 55, 395–421 (2009).
  • [39] Clayton W. Commander. “Maximum cut problem, max-cutmaximum cut problem, max-cut”. Pages 1991–1999. Springer US. Boston, MA (2009).
  • [40] Steven J. Benson, Yinyu Yeb, and Xiong Zhang. “Mixed linear and semidefinite programming for combinatorial and quadratic optimization”. Optimization Methods and Software 11, 515–544 (1999).
  • [41] Changhui Choi and Yinyu Ye. “Solving sparse semidefinite programs using the dual scaling algorithm with an iterative solver”. Manuscript, Department of Management Sciences, University of Iowa, Iowa City, IA52242 (2000). url: web.stanford.edu/ yyye/yyye/cgsdp1.pdf.
  • [42] Angelika Wiegele. “Biq mac library – a collection of max-cut and quadratic 0-1 programming instances of medium size”. Alpen-Adria-Universität Klagenfurt (2007). url: biqmac.aau.at/biqmaclib.pdf.
  • [43] Stefan H. Schmieta. “The dimacs library of mixed semidefinite-quadratic-linear programs”. 7th DIMACS Implementation Challenge (2007). url: http://archive.dimacs.rutgers.edu.
  • [44] Yoshiki Matsuda. “Benchmarking the max-cut problem on the simulated bifurcation machine”. Medium (2019). url: medium.com/toshiba-sbm/benchmarking-the-max-cut-problem-on-the-simulated-bifurcation-machine-e26e1127c0b0.
  • [45] R. M. Karp. “Reducibility among combinatorial problems”. Springer US. Boston, MA (1972).
  • [46] Dimitri P Bertsekas. “Constrained optimization and lagrange multiplier methods”. Academic press.  (1982).
  • [47] G Mauro D’Ariano, Matteo GA Paris, and Massimiliano F Sacchi. “Quantum tomography”. Advances in imaging and electron physics 128, 206–309 (2003).
  • [48] Alessandro Bisio, Giulio Chiribella, Giacomo Mauro D’Ariano, Stefano Facchini, and Paolo Perinotti. “Optimal quantum tomography”. IEEE Journal of Selected Topics in Quantum Electronics 15, 1646–1660 (2009).
  • [49] Max S. Kaznady and Daniel F. V. James. “Numerical strategies for quantum tomography: Alternatives to full optimization”. Phys. Rev. A 79, 022109 (2009).
  • [50] Javier Peña. “Convergence of first-order methods via the convex conjugate”. Operations Research Letters 45, 561–564 (2017).
  • [51] Alan Frieze and Mark Jerrum. “Improved approximation algorithms for maxk-cut and max bisection”. Algorithmica 18, 67–81 (1997).
  • [52] Clark David Thompson. “A complexity theory for vlsi”. PhD thesis. Carnegie Mellon University.  (1980). url: dl.acm.org/doi/10.5555/909758.
  • [53] Chu Min Li and Felip Manya. “Maxsat, hard and soft constraints”. In Handbook of satisfiability. Pages 903–927. IOS Press (2021).
  • [54] Nicholas J Higham. “Computing the nearest correlation matrix—a problem from finance”. IMA journal of Numerical Analysis 22, 329–343 (2002).
  • [55] Tadayoshi Fushiki. “Estimation of positive semidefinite correlation matrices by using convex quadratic semidefinite programming”. Neural Computation 21, 2028–2048 (2009).
  • [56] Todd MJ. “A study of search directions in primal-dual interior-point methods for semidefinite programming”. Optimization methods and software 11, 1–46 (1999).
  • [57] Roger Fletcher. “Penalty functions”. Mathematical Programming The State of the Art: Bonn 1982Pages 87–114 (1983).
  • [58] Robert M Freund. “Penalty and barrier methods for constrained optimization”. Lecture Notes, Massachusetts Institute of Technology (2004). url: ocw.mit.edu/courses/15-084j-nonlinear-programming-spring-2004.
  • [59] Eric Ricardo Anschuetz. “Critical points in quantum generative models”. In International Conference on Learning Representations.  (2022). url: openreview.net/forum?id=2f1z55GVQN.
  • [60] Amir Beck. “First-order methods in optimization”. SIAM.  (2017).
  • [61] Sanjeev Arora and Satyen Kale. “A combinatorial, primal-dual approach to semidefinite programs”. J. ACM63 (2016).
  • [62] Taylor L. Patti, Jean Kossaifi, Susanne F. Yelin, and Anima Anandkumar. “Tensorly-quantum: Quantum machine learning with tensor methods” (2021). arXiv:2112.10239.
  • [63] Jean Kossaifi, Yannis Panagakis, Anima Anandkumar, and Maja Pantic. “Tensorly: Tensor learning in python”. Journal of Machine Learning Research 20, 1–6 (2019). url: http://jmlr.org/papers/v20/18-277.html.
  • [64] cuQuantum Team. “Nvidia/cuquantum: cuquantum v22.11” (2022).
  • [65] Diederik P. Kingma and Jimmy Ba. “Adam: A method for stochastic optimization” (2017). arXiv:1412.6980.
  • [66] Brahim Chaourar. “A linear time algorithm for a variant of the max cut problem in series parallel graphs”. Advances in Operations Research (2017).
  • [67] Yury Makarychev. “A short proof of kuratowski’s graph planarity criterion”. Journal of Graph Theory 25, 129–131 (1997).
  • [68] Béla Bollobás. “The evolution of random graphs—the giant component”. Page 130–159. Cambridge Studies in Advanced Mathematics. Cambridge University Press.  (2001). 2 edition.
  • [69] Sanjeev Arora, David Karger, and Marek Karpinski. “Polynomial time approximation schemes for dense instances of np-hard problems”. Journal of computer and system sciences 58, 193–210 (1999).
  • [70] Rick Durrett. “Erdös–rényi random graphs”. Page 27–69. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press.  (2006).
  • [71] Gary Chartrand and Ping Zhang. “Chromatic graph theory”. Taylor and Francis.  (2008).
  • [72] John van de Wetering. “Zx-calculus for the working quantum computer scientist” (2020). arXiv:2012.13966.
  • [73] Alexander Cowtan, Silas Dilkes, Ross Duncan, Will Simmons, and Seyon Sivarajah. “Phase gadget synthesis for shallow circuits”. Electronic Proceedings in Theoretical Computer Science 318, 213–228 (2020).
  • [74] Andrew M. Childs, Yuan Su, Minh C. Tran, Nathan Wiebe, and Shuchen Zhu. “Theory of trotter error with commutator scaling”. Phys. Rev. X 11, 011020 (2021).
  • [75] Joseph W Britton, Brian C Sawyer, Adam C Keith, C-C Joseph Wang, James K Freericks, Hermann Uys, Michael J Biercuk, and John J Bollinger. “Engineered two-dimensional ising interactions in a trapped-ion quantum simulator with hundreds of spins”. Nature 484, 489–492 (2012).
  • [76] Hannes Bernien, Sylvain Schwartz, Alexander Keesling, Harry Levine, Ahmed Omran, Hannes Pichler, Soonwon Choi, Alexander S Zibrov, Manuel Endres, Markus Greiner, et al. “Probing many-body dynamics on a 51-atom quantum simulator”. Nature 551, 579–584 (2017).
  • [77] Gheorghe-Sorin Paraoanu. “Recent progress in quantum simulation using superconducting circuits”. Journal of Low Temperature Physics 175, 633–654 (2014).
  • [78] Katsuki Fujisawa, Hitoshi Sato, Satoshi Matsuoka, Toshio Endo, Makoto Yamashita, and Maho Nakata. “High-performance general solver for extremely large-scale semidefinite programming problems”. In SC ’12: Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis. Pages 1–11.  (2012).
  • [79] Adrian S. Lewis and Michael L. Overton. “Eigenvalue optimization”. Acta Numerica 5, 149–190 (1996).
  • [80] Xiaosi Xu, Jinzhao Sun, Suguru Endo, Ying Li, Simon C. Benjamin, and Xiao Yuan. “Variational algorithms for linear algebra”. Science Bulletin 66, 2181–2188 (2021).

Appendix A Appendix: Theoretical Analysis of Hadamard Test Objective Function

We now derive Theorem 2 in detail. In order for the efficient encoding UW=exp(iαW)iαWU_{W}=\exp(i\alpha W)\propto i\alpha W to hold, it is sufficient to enforce that the third-order term in Eq. 12 is substantially smaller than the first-order term. That is

α33!|W3|ijα1!|W|ijα26|W3|ij|W|ij\frac{\alpha^{3}}{3!}|W^{3}|_{ij}\ll\frac{\alpha}{1!}|W|_{ij}\rightarrow\frac{\alpha^{2}}{6}|W^{3}|_{ij}\ll|W|_{ij} (32)

for typical edges between vertices ii,jj. By induction, the criterion in Eq. 32 also guarantees that odd (imaginary) powers >3{>}3 will likewise be smaller than the first order term, and are thus also negligible. While this condition can always be satisfied with an arbitrarily small α\alpha, we in practice require that α\alpha maintain some finite size to avoid unitary rotations with vanishingly small gate times τα\tau\propto\alpha and imaginary components σn+1Wα\langle\sigma_{n+1}\rangle_{W}\propto\alpha. We now demonstrate that this criteria can be met for a wide array of graphs with NP-complete MaxCut optimization complexity.

First, we consider Erdös–Rényi random graphs [70] with elements Wij𝒰[0,b]W_{ij}\sim\mathcal{U}_{[0,b]}, which are uniformly distributed on the interval [0,b][0,b]. The graphs are said to have edge density dd, which is the fraction of non-zero edges ee over total possible edges E=N(N1)/2E=N(N-1)/2. Typical elements (W3)ij(W^{3})_{ij} are the sum of N2\sim N^{2} terms WijWjkWklW_{ij}W_{jk}W_{kl}, with expectation value WijWjkWkl¯=b3d3/8\overline{W_{ij}W_{jk}W_{kl}}=b^{3}d^{3}/8, such that the matrix elements of W3W^{3} have the expectation value (W3)ij¯=N2b3d3/8\overline{(W^{3})_{ij}}=N^{2}b^{3}d^{3}/8. As the mean of the non-zero elements in WW is Wij¯=b/2\overline{W_{ij}}=b/2, the criterion of Eq. 32 becomes

α2N2b3d348b2α224N2b2d3.\frac{\alpha^{2}N^{2}b^{3}d^{3}}{48}\ll\frac{b}{2}\rightarrow\alpha^{2}\ll\frac{24}{N^{2}b^{2}d^{3}}. (33)

We can rewrite this criterion in terms the number of non-zero edges ee by noting that graph density dd scales as d=e/Ed=e/E, where E=N(N1)/2N2/2E=N(N-1)/2\approx N^{2}/2 is the number of non-zero edges possible for an NN vertex graph. Likewise, the average number of edges per vertex is then ξ=e/N\xi=e/N, and Eq. 33 can be rewritten as

α23N4b2e3=3Nb2ξ3.\alpha^{2}\ll\frac{3N^{4}}{b^{2}e^{3}}=\frac{3N}{b^{2}\xi^{3}}. (34)

For graphs where edge density dd is not uniformly distributed, the above conditions should hold for the most densely connected vertices of the graph.

We briefly illustrate how our approximation holds for a few other classes of graphs. For instance, graphs with elements Wij𝒰[b,b]W_{ij}\sim\mathcal{U}_{[-b,b]} drawn from uniform distributions with both positive and negative components generally require α\alpha ranges that are even more permissible (i.e., can be even larger) than those of the positive case, with the criterion of Eq. 33 serving as a small lower-bound.

Similar proofs of implementability can also be done for graphs with normally distributed weights Wij𝒩(μ,σ2)W_{ij}\sim\mathcal{N}(\mu,\sigma^{2}) of mean μ\mu and variance σ2\sigma^{2}. For the case μ≪̸σ\mu\not\ll\sigma, (W3)ij¯=N2μ3d3\overline{(W^{3})_{ij}}=N^{2}\mu^{3}d^{3} and α\alpha need only satisfy

α2N2μ3d36μα26N2μ2d3,\frac{\alpha^{2}N^{2}\mu^{3}d^{3}}{6}\ll\mu\rightarrow\alpha^{2}\ll\frac{6}{N^{2}\mu^{2}d^{3}}, (35)

which requires the same permissive scaling between NN and dd (ee or ξ\xi) as the condition Eq. 32 (Eq. 33) for positive uniform distributions. Likewise, for normal distributions where σμ\sigma\gg\mu, Eq. 35 with μσ\mu\rightarrow\sigma would be a large upper bound.