Skip to content

Quantum Algorithms

Previous sections explain your interaction with the optimization package. This section describes the process implemented by the Classiq optimization engine; namely, the algorithms used, the way they are applied, and the degrees of freedom available to you.

The optimization platform implements hybrid quantum-classical optimization algorithms. These algorithms were developed to fit NISQ-era quantum computers with limited quantum resources. There are two types:

  • A quantum circuit referred to as an "ansatz" is a variational parametrized quantum circuit encoding possible problem solutions.
  • A classical optimization procedure.

Two of the most recognized algorithms are VQE (Variational Quantum Eigensolver) [1] and QAOA (Quantum Approximate Optimization Algorithm) [2] . Both have been extensively studied in the last decade and show great promise for the near future [3] .

Specifically, the Classiq package focuses on a new variant of QAOA with the same name acronym: Quantum Alternating Optimization Ansatz [4] . This algorithm enables the restriction of the search process to a subspace of the entire Hilbert space, corresponding to solutions that satisfy the problem constraints. This reduces the effective search space by many orders of magnitude, and may enhance the search performance.

The Classiq platform allows the analysis and embedding of problem constraints in two modes:

  • Original QAOA (Quantum Approximate Optimization Algorithm). Here the constraints are expressed as penalty terms in the objective function. The optimization process discourages solutions that do not obey the constraints. The search space spans the entire Hilbert space and the algorithm mixes all the possible solutions. To select this algorithm, set qaoa_preferences.qsolver = Qsolve.QAOAPenalty. The conversion method from constraints to penalty terms is described in [5] .
  • New QAOA (Quantum Alternating Optimization Ansatz). This algorithm explicitly constrains the search space in accordance with the problem constraints. The constraints are embedded in the initialization and mixer layers. To select this algorithm, set qaoa_preferences.qsolver = Qsolve.QAOAMixer.


[1] A. Peruzzo, et al., A variational eigenvalue solver on a quantum processor, Nature comm. 5, 4213, (2014).

[2] E. Farhi, et al., A Quantum Approximate Optimization Algorithm, arxiv:quant-ph/1411.4028, (2014).

[3] K. Bharti, et al., Noisy intermediate-scale quantum (NISQ) algorithms, arxiv:quant-ph/2101.08448, (2021).

[4] S. Hadfield, et al., From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz, Algorithms 12(2), 34, (2017).

[5] A. Lucas,Ising formulations of many np problems, Frontiers in Physics, 2:5, (2014).