Skip to content

SAGA

The SAGA algorithm uses the paradigm of Genetic Algorithms: We keep track of a population of possible solutions to an optimization/decision problem in the QUBO formulation, and iteratively create new solutions from these using mutations and recombinations. A selection ensures we only keep track of the most promising solutions in the population for the next iteration, where these again are used to create new solutions. This process is run until a predefined stopping criterion is reached, which might be a desired solution quality (i.e., an energy level) or a boundary on the time / iterations the algorithm is allowed to run. At the end, the best found solution vector and its corresponding solution value is returned. For SAGA, Simulated Annealing is used during the mutation phase.

Note

This solver is only available for commercial and academic licenses.

Compatible Backends

Backend Default
DWave

Initialization

Python
from luna_quantum.solve.parameters.algorithms.genetic_algorithms.saga import SAGA

algorithm = SAGA(
    backend=None,
    p_size=20,
    p_inc_num=5,
    p_max=160,
    pct_random_states=0.25,
    mut_rate=0.5,
    rec_rate=1,
    rec_method='random_crossover',
    select_method='simple',
    target=None,
    atol=1e-08,
    rtol=1e-05,
    timeout=60.0,
    max_iter=100,
    num_sweeps=10,
    num_sweeps_inc_factor=1.2,
    num_sweeps_inc_max=7000,
    beta_range_type='default',
    beta_range=None
)

Usage

Python
from luna_quantum.algorithms import SAGA

algorithm = SAGA()
solve_job = algorithm.run(model, name="my-solve-job")