Quantum optimization algorithms

Optimization algorithms using quantum computing

Quantum optimization algorithms are quantum algorithms that are used to solve optimization problems.[1] Mathematical optimization deals with finding the best solution to a problem (according to some criteria) from a set of possible solutions. Mostly, the optimization problem is formulated as a minimization problem, where one tries to minimize an error which depends on the solution: the optimal solution has the minimal error. Different optimization techniques are applied in various fields such as mechanics, economics and engineering, and as the complexity and amount of data involved rise, more efficient ways of solving optimization problems are needed. Quantum computing may allow problems which are not practically feasible on classical computers to be solved, or suggest a considerable speed up with respect to the best known classical algorithm.

## Quantum data fitting[edit]

Data fitting is a process of constructing a mathematical function that best fits a set of data points. The fit's quality is measured by some criteria, usually the distance between the function and the data points.

### Quantum least squares fitting[edit]

One of the most common types of data fitting is solving the least squares problem, minimizing the sum of the squares of differences between the data points and the fitted function.

The algorithm is given  N {\displaystyle N} input data points  ( x 1 , y 1 ) , ( x 2 , y 2 ) , . . . , ( x N , y N ) {\displaystyle (x_{1},y_{1}),(x_{2},y_{2}),...,(x_{N},y_{N})} and  M {\displaystyle M} continuous functions f 1 , f 2 , . . . , f M {\displaystyle f_{1},f_{2},...,f_{M}} . The algorithm finds and gives as output a continuous function  f λ -> {\displaystyle f_{\vec {\lambda }}} that is a linear combination of  f j {\displaystyle f_{j}} :

f λ -> ( x ) = ∑ j = 1 M f j ( x ) λ j {\displaystyle f_{\vec {\lambda }}(x)=\sum _{j=1}^{M}f_{j}(x)\lambda _{j}}

In other words, the algorithm finds the complex coefficients  λ j {\displaystyle \lambda _{j}} , and thus the vector  λ -> = ( λ 1 , λ 2 , . . . , λ M ) {\displaystyle {\vec {\lambda }}=(\lambda _{1},\lambda _{2},...,\lambda _{M})} .

The algorithm is aimed at minimizing the error, which is given by:

E = ∑ i = 1 N | f λ -> ( x i ) − y i | 2 = ∑ i = 1 N | ∑ j = 1 M f j ( x i ) λ j − y i | 2 = | F λ -> − y -> | 2 {\displaystyle E=\sum _{i=1}^{N}\left\vert f_{\vec {\lambda }}(x_{i})-y_{i}\right\vert ^{2}=\sum _{i=1}^{N}\left\vert \sum _{j=1}^{M}f_{j}(x_{i})\lambda _{j}-y_{i}\right\vert ^{2}=\left\vert F{\vec {\lambda }}-{\vec {y}}\right\vert ^{2}}

where  F {\displaystyle F} is defined to be the following matrix:

F = ( f 1 ( x 1 ) ⋯ f M ( x 1 ) f 1 ( x 2 ) ⋯ f M ( x 2 ) ⋮ ⋱ ⋮ f 1 ( x N ) ⋯ f M ( x N ) ) {\displaystyle {F}={\begin{pmatrix}f_{1}(x_{1})&\cdots &f_{M}(x_{1})\\\f_{1}(x_{2})&\cdots &f_{M}(x_{2})\\\\\vdots &\ddots &\vdots \\\f_{1}(x_{N})&\cdots &f_{M}(x_{N})\\\\\end{pmatrix}}}

The quantum least-squares fitting algorithm[2] makes use of a version of Harrow, Hassidim, and Lloyd's quantum algorithm for linear systems of equations (HHL), and outputs the coefficients  λ j {\displaystyle \lambda _{j}} and the fit quality estimation  E {\displaystyle E} . It consists of three subroutines: an algorithm for performing a pseudo-inverse operation, one routine for the fit quality estimation, and an algorithm for learning the fit parameters.

Because the quantum algorithm is mainly based on the HHL algorithm, it suggests an exponential improvement[3] in the case where  F {\displaystyle F} is sparse and the condition number (namely, the ratio between the largest and the smallest eigenvalues) of both  F F † {\displaystyle FF^{\dagger }} and  F † F {\displaystyle F^{\dagger }F} is small.

## Quantum semidefinite programming[edit]

Semidefinite programming (SDP) is an optimization subfield dealing with the optimization of a linear objective function (a user-specified function to be minimized or maximized), over the intersection of the cone of positive semidefinite matrices with an affine space. The objective function is an inner product of a matrix  C {\displaystyle C} (given as an input) with the variable  X {\displaystyle X} . Denote by  S n {\displaystyle \mathbb {S} ^{n}} the space of all  n × n {\displaystyle n\times n} symmetric matrices. The variable  X {\displaystyle X} must lie in the (closed convex) cone of positive semidefinite symmetric matrices  S + n {\displaystyle \mathbb {S} _{+}^{n}} . The inner product of two matrices is defined as:

⟨ A , B ⟩ S n = t r ( A T B ) = ∑ i = 1 , j = 1 n A i j B i j . {\displaystyle \langle A,B\rangle _{\mathbb {S} ^{n}}={\rm {tr}}(A^{T}B)=\sum _{i=1,j=1}^{n}A_{ij}B_{ij}.}

The problem may have additional constraints (given as inputs), also usually formulated as inner products. Each constraint forces the inner product of the matrices  A k {\displaystyle A_{k}} (given as an input) with the optimization variable  X {\displaystyle X} to be smaller than a specified value  b k {\displaystyle b_{k}} (given as an input). Finally, the SDP problem can be written as:

min X ∈ S n ⟨ C , X ⟩ S n subject to ⟨ A k , X ⟩ S n ≤ b k , k = 1 , … , m X ⪰ 0 {\displaystyle {\begin{array}{rl}{\displaystyle \min _{X\in \mathbb {S} ^{n}}}&\langle C,X\rangle _{\mathbb {S} ^{n}}\\\\{\text{subject to}}&\langle A_{k},X\rangle _{\mathbb {S} ^{n}}\leq b_{k},\quad k=1,\ldots ,m\\\&X\succeq 0\end{array}}}

The best classical algorithm is not known to unconditionally run in polynomial time. The corresponding feasibility problem is known to either lie outside of the union of the complexity classes NP and co-NP, or in the intersection of NP and co-NP.[4]

### The quantum algorithm[edit]

The algorithm inputs are  A 1 . . . A m , C , b 1 . . . b m {\displaystyle A_{1}...A_{m},C,b_{1}...b_{m}} and parameters regarding the solution's trace, precision and optimal value (the objective function's value at the optimal point).

The quantum algorithm[5] consists of several iterations. In each iteration, it solves a feasibility problem, namely, finds any solution satisfying the following conditions (giving a threshold  t {\displaystyle t} ):

⟨ C , X ⟩ S n ≤ t ⟨ A k , X ⟩ S n ≤ b k , k = 1 , … , m X ⪰ 0 {\displaystyle {\begin{array}{lr}\langle C,X\rangle _{\mathbb {S} ^{n}}\leq t\\\\\langle A_{k},X\rangle _{\mathbb {S} ^{n}}\leq b_{k},\quad k=1,\ldots ,m\\\X\succeq 0\end{array}}}

In each iteration, a different threshold  t {\displaystyle t} is chosen, and the algorithm outputs either a solution  X {\displaystyle X} such that  ⟨ C , X ⟩ S n ≤ t {\displaystyle \langle C,X\rangle _{\mathbb {S} ^{n}}\leq t} (and the other constraints are satisfied, too) or an indication that no such solution exists. The algorithm performs a binary search to find the minimal threshold  t {\displaystyle t} for which a solution  X {\displaystyle X} still exists: this gives the minimal solution to the SDP problem.

The quantum algorithm provides a quadratic improvement over the best classical algorithm in the general case, and an exponential improvement when the input matrices are of low rank.

## Quantum combinatorial optimization[edit]

The combinatorial optimization problem is aimed at finding an optimal object from a finite set of objects. The problem can be phrased as a maximization of an objective function which is a sum of boolean functions. Each boolean function  C α : { 0 , 1 } n -> { 0 , 1 } {\displaystyle \,C_{\alpha }\colon \lbrace {0,1\rbrace }^{n}\rightarrow \lbrace {0,1}\rbrace } gets as input the  n {\displaystyle n} -bit string  z = z 1 z 2 … z n {\displaystyle z=z_{1}z_{2}\ldots z_{n}} and gives as output one bit (0 or 1). The combinatorial optimization problem of  n {\displaystyle n} bits and  m {\displaystyle m} clauses is finding an  n {\displaystyle n} -bit string  z {\displaystyle z} that maximizes the function

C ( z ) = ∑ α = 1 m C α ( z ) {\displaystyle C(z)=\sum _{\alpha =1}^{m}C_{\alpha }(z)}

Approximate optimization is a way of finding an approximate solution to an optimization problem, which is often NP-hard. The approximated solution of the combinatorial optimization problem is a string  z {\displaystyle z} that is close to maximizing  C ( z ) {\displaystyle C(z)} .

### Quantum approximate optimization algorithm[edit]

For combinatorial optimization, the quantum approximate optimization algorithm (QAOA)[6] briefly had a better approximation ratio than any known polynomial time classical algorithm (for a certain problem),[7] until a more effective classical algorithm was proposed.[8] The relative speed-up of the quantum algorithm is an open research question.

The heart of QAOA relies on the use of unitary operators dependent on  2 p {\displaystyle 2p} angles, where  p > 1 {\displaystyle p>1} is an input integer. These operators are iteratively applied on a state that is an equal-weighted quantum superposition of all the possible states in the computational basis. In each iteration, the state is measured in the computational basis and  C ( z ) {\displaystyle C(z)} is estimated. The angles are then updated classically to increase  C ( z ) {\displaystyle C(z)} . After this procedure is repeated a sufficient number of times, the value of  C ( z ) {\displaystyle C(z)} is almost optimal, and the state being measured is close to being optimal as well. In principle the optimal value of  C ( z ) {\displaystyle C(z)} can be reached up to arbitrary precision, this is guaranteed by the adiabatic theorem[9] or alternatively by the universality of the QAOA unitaries.[10] However, it is an open question whether this can be done in a feasible way. For example, it was shown that QAOA exhibits a strong dependence on the ratio of a problem's constraint to variables (problem density) placing a limiting restriction on the algorithm's capacity to minimize a corresponding objective function.[11]

It was soon recognized that a generalization of the QAOA process is essentially an alternating application of a continuous-time quantum walk on an underlying graph followed by a quality-dependent phase shift applied to each solution state. This generalized QAOA was termed as QWOA (Quantum Walk-based Optimisation Algorithm).[12]

In the paper How many qubits are needed for quantum computational supremacy submitted to arXiv,[13] the authors conclude that a QAOA circuit with 420 qubits and 500 constraints would require at least one century to be simulated using a classical simulation algorithm running on state-of-the-art supercomputers so that would be sufficient for quantum computational supremacy.

A rigorous comparison of QAOA with classical algorithms can give estimates on depth  p {\displaystyle p} and number of qubits required for quantum advantage. A study of QAOA and MaxCut algorithm shows that  p > 11 {\displaystyle p>11} is required for scalable advantage.[14]

## See also[edit]

* Adiabatic quantum computation
* Quantum annealing

## References[edit]

1. ^ Moll, Nikolaj; Barkoutsos, Panagiotis; Bishop, Lev S.; Chow, Jerry M.; Cross, Andrew; Egger, Daniel J.; Filipp, Stefan; Fuhrer, Andreas; Gambetta, Jay M.; Ganzhorn, Marc; Kandala, Abhinav; Mezzacapo, Antonio; Müller, Peter; Riess, Walter; Salis, Gian; Smolin, John; Tavernelli, Ivano; Temme, Kristan (2018). "Quantum optimization using variational algorithms on near-term quantum devices". Quantum Science and Technology. 3 (3): 030503. arXiv:1710.01022. Bibcode:2018QS&T....3c0503M. doi:10.1088/2058-9565/aab822. S2CID 56376912.
2. ^ Wiebe, Nathan; Braun, Daniel; Lloyd, Seth (2 August 2012). "Quantum Algorithm for Data Fitting". Physical Review Letters. 109 (5): 050505. arXiv:1204.5242. Bibcode:2012PhRvL.109e0505W. doi:10.1103/PhysRevLett.109.050505. PMID 23006156. S2CID 118439810.
3. ^ Montanaro, Ashley (12 January 2016). "Quantum algorithms: an overview". npj Quantum Information. 2: 15023. arXiv:1511.04206. Bibcode:2016npjQI...215023M. doi:10.1038/npjqi.2015.23. S2CID 2992738.
4. ^ Ramana, Motakuri V. (1997). "An exact duality theory for semidefinite programming and its complexity implications". Mathematical Programming. 77: 129–162. doi:10.1007/BF02614433. S2CID 12886462.
5. ^ Brandao, Fernando G. S. L.; Svore, Krysta (2016). "Quantum Speed-ups for Semidefinite Programming". arXiv:1609.05537 [quant-ph].
6. ^ Farhi, Edward; Goldstone, Jeffrey; Gutmann, Sam (2014). "A Quantum Approximate Optimization Algorithm". arXiv:1411.4028 [quant-ph].
7. ^ Farhi, Edward; Goldstone, Jeffrey; Gutmann, Sam (2014). "A Quantum Approximate Optimization Algorithm Applied to a Bounded Occurrence Constraint Problem". arXiv:1412.6062 [quant-ph].
8. ^ Barak, Boaz; Moitra, Ankur; O'Donnell, Ryan; Raghavendra, Prasad; Regev, Oded; Steurer, David; Trevisan, Luca; Vijayaraghavan, Aravindan; Witmer, David; Wright, John (2015). "Beating the random assignment on constraint satisfaction problems of bounded degree". arXiv:1505.03424 [cs.CC].
9. ^ Farhi, Edward; Goldstone, Jeffrey; Gutmann, Sam (2014). "A Quantum Approximate Optimization Algorithm". arXiv:1411.4028 [quant-ph].
10. ^ Morales, M. E.; Biamonte, J. D.; Zimborás, Z. (2019-09-20). "On the universality of the quantum approximate optimization algorithm". Quantum Information Processing. 19: 291. arXiv:1909.03123. doi:10.1007/s11128-020-02748-9.
11. ^ Akshay, V.; Philathong, H.; Morales, M. E. S.; Biamonte, J. D. (2020-03-05). "Reachability Deficits in Quantum Approximate Optimization". Physical Review Letters. 124 (9): 090504. arXiv:1906.11259. Bibcode:2020PhRvL.124i0504A. doi:10.1103/PhysRevLett.124.090504. PMID 32202873. S2CID 195699685.
12. ^ Marsh, S.; Wang, J. B. (2020-06-08). "Combinatorial optimization via highly efficient quantum walks". Physical Review Research. 2 (2): 023302. arXiv:1912.07353. Bibcode:2020PhRvR...2b3302M. doi:10.1103/PhysRevResearch.2.023302. S2CID 216080740.
13. ^ Dalzell, Alexander M.; Harrow, Aram W.; Koh, Dax Enshan; La Placa, Rolando L. (2020-05-11). "How many qubits are needed for quantum computational supremacy?". Quantum. 4: 264. arXiv:1805.05224. doi:10.22331/q-2020-05-11-264. ISSN 2521-327X.
14. ^ Lykov, Danylo; Wurtz, Jonathan; Poole, Cody; Saffman, Mark; Noel, Tom; Alexeev, Yuri (2022). "Sampling Frequency Thresholds for Quantum Advantage of Quantum Approximate Optimization Algorithm". arXiv:2206.03579 [quant-ph].

* v
* t
* e

Quantum information science

General|

* DiVincenzo's criteria
* NISQ era
* Quantum computing
* timeline
* Quantum information
* Quantum programming
* Quantum simulation
* Qubit
* physical vs. logical
* Quantum processors
* cloud-based

Theorems|

* Bell's
* Eastin–Knill
* Gleason's
* Gottesman–Knill
* Holevo's
* No-broadcasting
* No-cloning
* No-communication
* No-deleting
* No-hiding
* No-teleportation
* PBR
* Quantum speed limit
* Threshold
* Solovay–Kitaev
* Purification

Quantum
communication|

* Classical capacity
* entanglement-assisted
* quantum capacity
* Entanglement distillation
* Monogamy of entanglement
* LOCC
* Quantum channel
* quantum network
* Quantum teleportation
* quantum gate teleportation
* Superdense coding

| Quantum cryptography|

* Post-quantum cryptography
* Quantum coin flipping
* Quantum money
* Quantum key distribution
* BB84
* SARG04
* other protocols
* Quantum secret sharing

|

Quantum algorithms|

* Amplitude amplification
* Bernstein–Vazirani
* Boson sampling
* Deutsch–Jozsa
* Grover's
* HHL
* Hidden subgroup
* Quantum annealing
* Quantum counting
* Quantum Fourier transform
* Quantum optimization
* Quantum phase estimation
* Shor's
* Simon's
* VQE

Quantum
complexity theory|

* BQP
* EQP
* QIP
* QMA
* PostBQP

Quantum
processor benchmarks|

* Quantum supremacy
* Quantum volume
* Randomized benchmarking
* XEB
* Relaxation times
* T1
* T2

Quantum
computing models|

* Adiabatic quantum computation
* Continuous-variable quantum information
* One-way quantum computer
* cluster state
* Quantum circuit
* quantum logic gate
* Quantum machine learning
* quantum neural network
* Quantum Turing machine
* Topological quantum computer

Quantum
error correction|

* Codes
* CSS
* quantum convolutional
* stabilizer
* Shor
* Bacon–Shor
* Steane
* Toric
* gnu
* Entanglement-assisted

Physical
implementations|

| Quantum optics|

* Cavity QED
* Circuit QED
* Linear optical QC
* KLM protocol

|

Ultracold atoms|

* Optical lattice
* Trapped-ion QC

Spin-based|

* Kane QC
* Spin qubit QC
* NV center
* NMR QC

Superconducting|

* Charge qubit
* Flux qubit
* Phase qubit
* Transmon

Quantum
programming|

* OpenQASM–Qiskit–IBM QX
* Quil–Forest/Rigetti QCS
* Cirq
* Q#
* libquantum
* many others...

* Quantum information science
* Quantum mechanics topics

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template