qaoa
Quantum approximate optimization algorithm (QAOA) for solving QUBO problem
Since R2024b
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
Description
You can use the quantum approximate optimization algorithm (QAOA) to solve a
Quadratic Unconstrained Binary Optimization (QUBO) problem. To solve a QUBO problem using
QAOA, use the solve
function
with Algorithm
set to a qaoa
object.
For example, create a qaoa
object with the number of shots set to 150.
Create a QUBO problem and then solve it using that qaoa
object.
qa = qaoa(NumShots=150); qprob = qubo(Q,c,d); result = solve(qprob,Algorithm=qa);
Creation
Description
creates a default
qa
= qaoaqaoa
object.
sets properties using one or more name-value arguments. For example, to change the QAOA
optimization solver to qa
= qaoa(PropertyName=Value)
fmincon
, use qa =
qaoa(OptimizationSolver="fmincon")
.
Properties
Examples
Algorithms
QAOA is a quantum-classical hybrid approach to solving optimization problems. In general, a quantum circuit represents possible solutions to the problem and a classical optimizer iteratively adjusts the angles in the circuit to improve the quality of the solution. The quantum circuit uses alternating layers of cost and mixer gates to approximately solve the provided problem. For details, see Solve Max-Cut Problem Using QAOA.
References
[1] Farhi, Edward, Jeffrey Goldstone, and Sam Gutmann. “A Quantum Approximate Optimization Algorithm.” arXiv, November 14, 2014. https://doi.org/10.48550/arXiv.1411.4028.
Version History
Introduced in R2024b