Genetic Algorithms

Quantum Assisted Genetic Algorithm Plus

This solver is only available for commercial and academic licenses.
  • Short Name: QAGA+
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: QUBO
The QAGA+ 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 QAGA+, Quantum Annealing is used during the mutation phase.

Usage via LunaSolve

# Example of using QAGA+ using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="QAGA+",
    provider="dwave",
    solver_parameters={
        "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": 0.0,
        "rtol": 0.0,
        "timeout": 60.0,
        "max_iter": 100,
        "use_qpu": True,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding QAGA+ using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "QAGA+": {
        "location": "cloud",
        "provider": "dwave",
        # Provide your token (see user guide on QPU tokens for more details)
        "qpu_tokens": {
            "dwave": {
                "source": "inline",
                "token": "<dwave token>",
            },
        },
    },
}

Backends

This algorithm can be run on the following backends:

D-Wave

D-Wave Systems, based in Burnaby, Canada, is renowned for its quantum annealing technology, specifically designed for solving optimization problems. Unlike traditional gate-based quantum computers, D-Wave’s annealers are optimized to find the lowest-energy solutions to complex problems by leveraging quantum tunneling. Their latest quantum systems offer thousands of qubits and are used extensively in applications like logistics, machine learning, and material science. D-Wave’s focus on quantum annealing sets it apart as a leader in delivering commercial quantum solutions to real-world challenges.

Read more about D-Wave Systems here.
Parameters
  • Name
    p_size
    Type
    int
    Description

    Size of the population.
    Default: 20

  • Name
    p_inc_num
    Type
    int
    Description

    Number of individuals that are added to the population size after each iteration.
    Default: 5

  • Name
    p_max
    Type
    int | None
    Description

    Maximum size of the population.
    Default: 160

  • Name
    pct_random_states
    Type
    float
    Description

    Percentage of random states that are added to the population after each iteration.
    Default: 0.25

  • Name
    mut_rate
    Type
    float
    Description

    Mutation rate, i.e., probability to mutate an individual. Min: 0.0, Max: 1.0
    Default: 0.5

  • Name
    rec_rate
    Type
    int
    Description

    Recombination rate, i.e. number of mates each individual is recombined with after each iteration
    Default: 1

  • Name
    rec_method
    Type
    Literal["cluster_moves", "one_point_crossover", "random_crossover"]
    Description

    The recombination method for the genetic algorithm.
    Default: "random_crossover"

  • Name
    select_method
    Type
    Literal["simple", "shared_energy"]
    Description

    Method used for the selection phase in the genetic algorithm.
    Default: "simple"

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach. If None, the algorithm will run until any other stopping criterion is reached.
    Default: None

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    timeout
    Type
    float
    Description

    The total solving time after which the solver should be stopped. This total solving time includes preprocessing, network overhead when communicating with DWave's API, as well as the actual annealing time.
    Default: 60.0

  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations after which the algorithm will stop.
    Default: 100

  • Name
    use_qpu
    Type
    Literal["True"]
    Description

    Whether to use the QPU for the optimization problem.
    Default: True

Quantum Assisted Genetic Algorithm Parallel

This solver is only available for commercial and academic licenses.
  • Short Name: QAGA_PL
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: QUBO
The QAGA+ 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 QAGA+, Quantum Annealing is used during the mutation phase.

Usage via LunaSolve

# Example of using QAGA_PL using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="QAGA_PL",
    provider="dwave",
    solver_parameters={
        "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": 0.0,
        "rtol": 0.0,
        "timeout": 60.0,
        "max_iter": 100,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding QAGA_PL using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "QAGA_PL": {
        "location": "cloud",
        "provider": "dwave",
        # Provide your token (see user guide on QPU tokens for more details)
        "qpu_tokens": {
            "dwave": {
                "source": "inline",
                "token": "<dwave token>",
            },
        },
    },
}

Backends

This algorithm can be run on the following backends:

D-Wave

QAGA_PL temporarily unavailable on D-Wave
D-Wave Systems, based in Burnaby, Canada, is renowned for its quantum annealing technology, specifically designed for solving optimization problems. Unlike traditional gate-based quantum computers, D-Wave’s annealers are optimized to find the lowest-energy solutions to complex problems by leveraging quantum tunneling. Their latest quantum systems offer thousands of qubits and are used extensively in applications like logistics, machine learning, and material science. D-Wave’s focus on quantum annealing sets it apart as a leader in delivering commercial quantum solutions to real-world challenges.

Read more about D-Wave Systems here.
Parameters
  • Name
    p_size
    Type
    int
    Description

    Size of the population.
    Default: 20

  • Name
    p_inc_num
    Type
    int
    Description

    Number of individuals that are added to the population size after each iteration.
    Default: 5

  • Name
    p_max
    Type
    int | None
    Description

    Maximum size of the population.
    Default: 160

  • Name
    pct_random_states
    Type
    float
    Description

    Percentage of random states that are added to the population after each iteration.
    Default: 0.25

  • Name
    mut_rate
    Type
    float
    Description

    Mutation rate, i.e., probability to mutate an individual. Min: 0.0, Max: 1.0
    Default: 0.5

  • Name
    rec_rate
    Type
    int
    Description

    Recombination rate, i.e. number of mates each individual is recombined with after each iteration
    Default: 1

  • Name
    rec_method
    Type
    Literal["cluster_moves", "one_point_crossover", "random_crossover"]
    Description

    The recombination method for the genetic algorithm.
    Default: "random_crossover"

  • Name
    select_method
    Type
    Literal["simple", "shared_energy"]
    Description

    Method used for the selection phase in the genetic algorithm.
    Default: "simple"

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach. If None, the algorithm will run until any other stopping criterion is reached.
    Default: None

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    timeout
    Type
    float
    Description

    The total solving time after which the solver should be stopped. This total solving time includes preprocessing, network overhead when communicating with DWave's API, as well as the actual annealing time.
    Default: 60.0

  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations after which the algorithm will stop.
    Default: 100

Quantum Assisted Genetic Algorithm Pairwise

This solver is only available for commercial and academic licenses.
  • Short Name: QAGA_PW
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: QUBO
The QAGA+ 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 QAGA+, Quantum Annealing is used during the mutation phase.

Usage via LunaSolve

# Example of using QAGA_PW using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="QAGA_PW",
    provider="dwave",
    solver_parameters={
        "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": 0.0,
        "rtol": 0.0,
        "timeout": 60.0,
        "max_iter": 100,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding QAGA_PW using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "QAGA_PW": {
        "location": "cloud",
        "provider": "dwave",
        # Provide your token (see user guide on QPU tokens for more details)
        "qpu_tokens": {
            "dwave": {
                "source": "inline",
                "token": "<dwave token>",
            },
        },
    },
}

Backends

This algorithm can be run on the following backends:

D-Wave

QAGA_PW temporarily unavailable on D-Wave
D-Wave Systems, based in Burnaby, Canada, is renowned for its quantum annealing technology, specifically designed for solving optimization problems. Unlike traditional gate-based quantum computers, D-Wave’s annealers are optimized to find the lowest-energy solutions to complex problems by leveraging quantum tunneling. Their latest quantum systems offer thousands of qubits and are used extensively in applications like logistics, machine learning, and material science. D-Wave’s focus on quantum annealing sets it apart as a leader in delivering commercial quantum solutions to real-world challenges.

Read more about D-Wave Systems here.
Parameters
  • Name
    p_size
    Type
    int
    Description

    Size of the population.
    Default: 20

  • Name
    p_inc_num
    Type
    int
    Description

    Number of individuals that are added to the population size after each iteration.
    Default: 5

  • Name
    p_max
    Type
    int | None
    Description

    Maximum size of the population.
    Default: 160

  • Name
    pct_random_states
    Type
    float
    Description

    Percentage of random states that are added to the population after each iteration.
    Default: 0.25

  • Name
    mut_rate
    Type
    float
    Description

    Mutation rate, i.e., probability to mutate an individual. Min: 0.0, Max: 1.0
    Default: 0.5

  • Name
    rec_rate
    Type
    int
    Description

    Recombination rate, i.e. number of mates each individual is recombined with after each iteration
    Default: 1

  • Name
    rec_method
    Type
    Literal["cluster_moves", "one_point_crossover", "random_crossover"]
    Description

    The recombination method for the genetic algorithm.
    Default: "random_crossover"

  • Name
    select_method
    Type
    Literal["simple", "shared_energy"]
    Description

    Method used for the selection phase in the genetic algorithm.
    Default: "simple"

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach. If None, the algorithm will run until any other stopping criterion is reached.
    Default: None

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    timeout
    Type
    float
    Description

    The total solving time after which the solver should be stopped. This total solving time includes preprocessing, network overhead when communicating with DWave's API, as well as the actual annealing time.
    Default: 60.0

  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations after which the algorithm will stop.
    Default: 100

Simulated Annealing Genetic Algorithm Plus

This solver is only available for commercial and academic licenses.
  • Short Name: SAGA+
  • Algorithm Type: Classical
  • Category: Classical
  • Native Input Format: QUBO
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.

Usage via LunaSolve

# Example of using SAGA+ using the Luna backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="SAGA+",
    provider="dwave",
    solver_parameters={
        "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": 0.0,
        "rtol": 0.0,
        "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,
    },
    qpu_tokens=None,
)

Usage via LunaBench

# Example of adding SAGA+ using the Luna backend as an algorithm to LunaBench
algorithms = {
    "SAGA+": {
        "location": "cloud",
        "provider": "dwave",
    },
}

Backends

This algorithm can be run on the following backends:

Luna

Luna provides powerful servers designed to run classical algorithms. These servers offer the computational capacity required to efficiently solve non-quantum tasks, ensuring high performance for optimization and other classical workloads.
Parameters
  • Name
    p_size
    Type
    int
    Description

    Size of the population.
    Default: 20

  • Name
    p_inc_num
    Type
    int
    Description

    Number of individuals that are added to the population size after each iteration.
    Default: 5

  • Name
    p_max
    Type
    int | None
    Description

    Maximum size of the population.
    Default: 160

  • Name
    pct_random_states
    Type
    float
    Description

    Percentage of random states that are added to the population after each iteration.
    Default: 0.25

  • Name
    mut_rate
    Type
    float
    Description

    Mutation rate, i.e., probability to mutate an individual. Min: 0.0, Max: 1.0
    Default: 0.5

  • Name
    rec_rate
    Type
    int
    Description

    Recombination rate, i.e. number of mates each individual is recombined with after each iteration
    Default: 1

  • Name
    rec_method
    Type
    Literal["cluster_moves", "one_point_crossover", "random_crossover"]
    Description

    The recombination method for the genetic algorithm.
    Default: "random_crossover"

  • Name
    select_method
    Type
    Literal["simple", "shared_energy"]
    Description

    Method used for the selection phase in the genetic algorithm.
    Default: "simple"

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach. If None, the algorithm will run until any other stopping criterion is reached.
    Default: None

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    timeout
    Type
    float
    Description

    The total solving time after which the solver should be stopped. This total solving time includes preprocessing, network overhead when communicating with DWave's API, as well as the actual annealing time.
    Default: 60.0

  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations after which the algorithm will stop.
    Default: 100

  • Name
    num_sweeps
    Type
    int
    Description

    The number of sweeps for simulated annealing.
    Default: 10

  • Name
    num_sweeps_inc_factor
    Type
    float
    Description

    factor of increasement for num_sweeps after each iteration
    Default: 1.2

  • Name
    num_sweeps_inc_max
    Type
    int | None
    Description

    Maximum number of num_sweeps that may be reached when increasing the num_sweeps value.
    Default: 7000

  • Name
    beta_range_type
    Type
    Literal["default", "percent", "fixed", "inc"]
    Description

    Method that is used to compute the beta range. default': the same as percent with values [50, 1] 'percent': the percentage chance of flipping qubits from hot to cold temperature 'fixed': a fixed temperature as a value 'inc': the default or percentage beta range but with decreasing percentages from iteration to iteration
    Default: "default"

  • Name
    beta_range
    Type
    tuple[float, float] | None
    Description

    Explicit beta range that is used for beta_range_type 'fixed' and 'percent'.
    Default: None

Simulated Annealing Genetic Algorithm Parallel

This solver is only available for commercial and academic licenses.
  • Short Name: SAGA_PL
  • Algorithm Type: Classical
  • Category: Classical
  • Native Input Format: QUBO
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.

Usage via LunaSolve

# Example of using SAGA_PL using the Luna backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="SAGA_PL",
    provider="dwave",
    solver_parameters={
        "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": 0.0,
        "rtol": 0.0,
        "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,
    },
    qpu_tokens=None,
)

Usage via LunaBench

# Example of adding SAGA_PL using the Luna backend as an algorithm to LunaBench
algorithms = {
    "SAGA_PL": {
        "location": "cloud",
        "provider": "dwave",
    },
}

Backends

This algorithm can be run on the following backends:

Luna

SAGA_PL temporarily unavailable on Luna
Luna provides powerful servers designed to run classical algorithms. These servers offer the computational capacity required to efficiently solve non-quantum tasks, ensuring high performance for optimization and other classical workloads.
Parameters
  • Name
    p_size
    Type
    int
    Description

    Size of the population.
    Default: 20

  • Name
    p_inc_num
    Type
    int
    Description

    Number of individuals that are added to the population size after each iteration.
    Default: 5

  • Name
    p_max
    Type
    int | None
    Description

    Maximum size of the population.
    Default: 160

  • Name
    pct_random_states
    Type
    float
    Description

    Percentage of random states that are added to the population after each iteration.
    Default: 0.25

  • Name
    mut_rate
    Type
    float
    Description

    Mutation rate, i.e., probability to mutate an individual. Min: 0.0, Max: 1.0
    Default: 0.5

  • Name
    rec_rate
    Type
    int
    Description

    Recombination rate, i.e. number of mates each individual is recombined with after each iteration
    Default: 1

  • Name
    rec_method
    Type
    Literal["cluster_moves", "one_point_crossover", "random_crossover"]
    Description

    The recombination method for the genetic algorithm.
    Default: "random_crossover"

  • Name
    select_method
    Type
    Literal["simple", "shared_energy"]
    Description

    Method used for the selection phase in the genetic algorithm.
    Default: "simple"

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach. If None, the algorithm will run until any other stopping criterion is reached.
    Default: None

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    timeout
    Type
    float
    Description

    The total solving time after which the solver should be stopped. This total solving time includes preprocessing, network overhead when communicating with DWave's API, as well as the actual annealing time.
    Default: 60.0

  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations after which the algorithm will stop.
    Default: 100

  • Name
    num_sweeps
    Type
    int
    Description

    The number of sweeps for simulated annealing.
    Default: 10

  • Name
    num_sweeps_inc_factor
    Type
    float
    Description

    factor of increasement for num_sweeps after each iteration
    Default: 1.2

  • Name
    num_sweeps_inc_max
    Type
    int | None
    Description

    Maximum number of num_sweeps that may be reached when increasing the num_sweeps value.
    Default: 7000

  • Name
    beta_range_type
    Type
    Literal["default", "percent", "fixed", "inc"]
    Description

    Method that is used to compute the beta range. default': the same as percent with values [50, 1] 'percent': the percentage chance of flipping qubits from hot to cold temperature 'fixed': a fixed temperature as a value 'inc': the default or percentage beta range but with decreasing percentages from iteration to iteration
    Default: "default"

  • Name
    beta_range
    Type
    tuple[float, float] | None
    Description

    Explicit beta range that is used for beta_range_type 'fixed' and 'percent'.
    Default: None

Simulated Annealing Genetic Algorithm Pairwise

This solver is only available for commercial and academic licenses.
  • Short Name: SAGA_PW
  • Algorithm Type: Classical
  • Category: Classical
  • Native Input Format: QUBO
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.

Usage via LunaSolve

# Example of using SAGA_PW using the Luna backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="SAGA_PW",
    provider="dwave",
    solver_parameters={
        "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": 0.0,
        "rtol": 0.0,
        "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,
    },
    qpu_tokens=None,
)

Usage via LunaBench

# Example of adding SAGA_PW using the Luna backend as an algorithm to LunaBench
algorithms = {
    "SAGA_PW": {
        "location": "cloud",
        "provider": "dwave",
    },
}

Backends

This algorithm can be run on the following backends:

Luna

SAGA_PW temporarily unavailable on Luna
Luna provides powerful servers designed to run classical algorithms. These servers offer the computational capacity required to efficiently solve non-quantum tasks, ensuring high performance for optimization and other classical workloads.
Parameters
  • Name
    p_size
    Type
    int
    Description

    Size of the population.
    Default: 20

  • Name
    p_inc_num
    Type
    int
    Description

    Number of individuals that are added to the population size after each iteration.
    Default: 5

  • Name
    p_max
    Type
    int | None
    Description

    Maximum size of the population.
    Default: 160

  • Name
    pct_random_states
    Type
    float
    Description

    Percentage of random states that are added to the population after each iteration.
    Default: 0.25

  • Name
    mut_rate
    Type
    float
    Description

    Mutation rate, i.e., probability to mutate an individual. Min: 0.0, Max: 1.0
    Default: 0.5

  • Name
    rec_rate
    Type
    int
    Description

    Recombination rate, i.e. number of mates each individual is recombined with after each iteration
    Default: 1

  • Name
    rec_method
    Type
    Literal["cluster_moves", "one_point_crossover", "random_crossover"]
    Description

    The recombination method for the genetic algorithm.
    Default: "random_crossover"

  • Name
    select_method
    Type
    Literal["simple", "shared_energy"]
    Description

    Method used for the selection phase in the genetic algorithm.
    Default: "simple"

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach. If None, the algorithm will run until any other stopping criterion is reached.
    Default: None

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance used to compare the energies of the target and the individuals.
    Default: 0.0

  • Name
    timeout
    Type
    float
    Description

    The total solving time after which the solver should be stopped. This total solving time includes preprocessing, network overhead when communicating with DWave's API, as well as the actual annealing time.
    Default: 60.0

  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations after which the algorithm will stop.
    Default: 100

  • Name
    num_sweeps
    Type
    int
    Description

    The number of sweeps for simulated annealing.
    Default: 10

  • Name
    num_sweeps_inc_factor
    Type
    float
    Description

    factor of increasement for num_sweeps after each iteration
    Default: 1.2

  • Name
    num_sweeps_inc_max
    Type
    int | None
    Description

    Maximum number of num_sweeps that may be reached when increasing the num_sweeps value.
    Default: 7000

  • Name
    beta_range_type
    Type
    Literal["default", "percent", "fixed", "inc"]
    Description

    Method that is used to compute the beta range. default': the same as percent with values [50, 1] 'percent': the percentage chance of flipping qubits from hot to cold temperature 'fixed': a fixed temperature as a value 'inc': the default or percentage beta range but with decreasing percentages from iteration to iteration
    Default: "default"

  • Name
    beta_range
    Type
    tuple[float, float] | None
    Description

    Explicit beta range that is used for beta_range_type 'fixed' and 'percent'.
    Default: None

Was this page helpful?