QAOA
The Quantum Approximate Optimization Algorithm (QAOA) is one of the most promising combinatorial optimization algorithms for gate-based quantum computers. The input problem needs to be unconstrained and binary, typically even quadratic in interactions (QUBO). Such a problem can be represented as an Ising cost Hamiltonian, which can directly be implemented on gate-based quantum hardware. Starting with an equal superpositions, the QAOA works through the alternating application of the cost Hamiltonian and the mixer operator, essentially boosting the probability of measuring the sought-after solution at the end of the algorithm.
QAOA is parametrized by β and γ angles that need to be optimized in a classical optimization loop in order achieve good sampling efficiency. The number of variational parameters is determined by the number of QAOA layers p (or reps). A higher number of layers generally leads to better optimization. However, the increased parameter count makes optimization harder as a drawback.
Compatible Backends
| Backend | Default |
|---|---|
| AWS | |
| IonQ | |
| IQM | |
| Rigetti | |
| IBMQuantum | |
| AerSimulator | |
| IBMFakeBackend | |
| CudaqCpu | |
| CudaqGpu |
Initialization
from luna_quantum.solve.parameters.algorithms.base_params.qaoa_circuit_params import LinearQAOAParams
from luna_quantum.solve.parameters.algorithms.base_params.scipy_optimizer import ScipyOptimizerParams
from luna_quantum.solve.parameters.algorithms.quantum_gate.qaoa import QAOA
algorithm = QAOA(
backend=None,
reps=1,
shots=1024,
optimizer=ScipyOptimizerParams(
method='cobyla',
tol=None,
bounds=None,
jac=None,
hess=None,
maxiter=100,
options={}
),
initial_params=LinearQAOAParams(
delta_beta=0.5,
delta_gamma=0.5
)
)