**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.

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.

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 input data points and continuous functions . The algorithm finds and gives as output a continuous function that is a linear combination of :

In other words, the algorithm finds the complex coefficients , and thus the vector .

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

where is defined to be the following matrix:

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 and the fit quality estimation . 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 is sparse and the condition number (namely, the ratio between the largest and the smallest eigenvalues) of both and is small.

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 (given as an input) with the variable . Denote by the space of all symmetric matrices. The variable must lie in the (closed convex) cone of positive semidefinite symmetric matrices . The inner product of two matrices is defined as:

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

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 algorithm inputs are 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 ):

In each iteration, a different threshold is chosen, and the algorithm outputs either a solution such that (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 for which a solution 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.

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 gets as input the -bit string and gives as output one bit (0 or 1). The combinatorial optimization problem of bits and clauses is finding an -bit string that maximizes the function

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 that is close to maximizing .

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 angles, where 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 is estimated. The angles are then updated classically to increase . After this procedure is repeated a sufficient number of times, the value of is almost optimal, and the state being measured is close to being optimal as well. In principle the optimal value of 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 and number of qubits required for quantum advantage. A study of QAOA and MaxCut algorithm shows that is required for scalable advantage.^{[14]}