Quantum Annealing

Quantum Annealing

  • Short Name: QA
  • Algorithm Type: Quantum
  • Category: Quantum
  • Native Input Format: BQM
Quantum Annealing uses a minor embedding to map problems onto a specified D-Wave sampler. The sampler solves the problem with the specified sampler method. With each call of the sampling method, the minor embedding is recalculated.

Usage via LunaSolve

# Example of using QA using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="QA",
    provider="dwave",
    solver_parameters={
        "embedding": {
            "chain_strength": None,
            "chain_break_fraction": True,
            "embedding_parameters": {
                "max_no_improvement": 10,
                "random_seed": None,
                "timeout": 1000,
                "max_beta": None,
                "tries": 10,
                "inner_rounds": None,
                "chainlength_patience": 10,
                "max_fill": None,
                "threads": 1,
                "return_overlap": False,
                "skip_initialization": False,
                "initial_chains": (),
                "fixed_chains": (),
                "restrict_chains": (),
                "suspend_chains": (),
            },
        },
        "sampling_params": {
            "anneal_offsets": None,
            "anneal_schedule": None,
            "annealing_time": None,
            "auto_scale": None,
            "fast_anneal": False,
            "flux_biases": None,
            "flux_drift_compensation": True,
            "h_gain_schedule": None,
            "initial_state": None,
            "max_answers": None,
            "num_reads": 1,
            "programming_thermalization": None,
            "readout_thermalization": None,
            "reduce_intersample_correlation": False,
            "reinitialize_state": None,
        },
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding QA using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "QA": {
        "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
    embedding
    Type
    Embedding
    Description

    Parameters for the auto embedding.
    Default: Embedding(chain_strength=None, chain_break_fraction=True, embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=()))

  • Name
    sampling_params
    Type
    SamplingParams
    Description

    Parameters for the sampling. See https://docs.dwavesys.com/docs/latest/c_solver_parameters.html for more details
    Default: SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None)

Embedding
  • Name
    chain_strength
    Type
    float | Mapping[] | None
    Description

    Sets the coupling strength between qubits representing variables that form a chain. Mappings should specify the required chain strength for each variable. By default, chain_strength is calculated with ~dwave.embedding.chain_strength.uniform_torque_compensation.
    Default: None

  • Name
    chain_break_fraction
    Type
    bool
    Description

    Add a chain_break_fraction field to the unembedded response with the fraction of chains broken before unembedding.
    Default: True

  • Name
    embedding_parameters
    Type
    EmbeddingParameters
    Description

    Embedding parameters for the embedding.
    Default: EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())

SamplingParams
  • Name
    anneal_offsets
    Type
    Any | None
    Description

    Anneal offsets for the sampling.
    Default: None

  • Name
    anneal_schedule
    Type
    Any | None
    Description

    Anneal schedule for the sampling.
    Default: None

  • Name
    annealing_time
    Type
    Any | None
    Description

    Annealing time for the sampling.
    Default: None

  • Name
    auto_scale
    Type
    Any | None
    Description

    Whether to auto scale for the sampling.
    Default: None

  • Name
    fast_anneal
    Type
    bool
    Description

    Use the fast-anneal protocol instead of the standard anneal.
    Default: False

  • Name
    flux_biases
    Type
    Any | None
    Description

    Flux biases for the sampling.
    Default: None

  • Name
    flux_drift_compensation
    Type
    bool
    Description

    Whether to use flux drift compensation for the sampling.
    Default: True

  • Name
    h_gain_schedule
    Type
    Any | None
    Description

    H gain schedule for the sampling.
    Default: None

  • Name
    initial_state
    Type
    Any | None
    Description

    Initial state for the sampling.
    Default: None

  • Name
    max_answers
    Type
    int | None
    Description

    Maximum number of answers for the sampling. Min: 1
    Default: None

  • Name
    num_reads
    Type
    int
    Description

    Number of reads for the sampling. Min: 1
    Default: 1

  • Name
    programming_thermalization
    Type
    float | None
    Description

    Programming thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    readout_thermalization
    Type
    float | None
    Description

    Readout thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    reduce_intersample_correlation
    Type
    bool
    Description

    Whether to reduce intersample correlation for the sampling.
    Default: False

  • Name
    reinitialize_state
    Type
    bool | None
    Description

    Whether to reinitialize state for the sampling. Should be None if initial_state is None.
    Default: None

EmbeddingParameters
  • Name
    max_no_improvement
    Type
    int
    Description

    Maximum number of failed iterations to improve the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    random_seed
    Type
    int | None
    Description

    Seed for the random number generator. If None, seed is set by os.urandom().
    Default: None

  • Name
    timeout
    Type
    int
    Description

    Algorithm gives up after timeout seconds.
    Default: 1000

  • Name
    max_beta
    Type
    float | None
    Description

    Qubits are assigned weight according to a formula (beta^n) where n is the number of chains containing that qubit. This value should never be less than or equal to 1. If None, max_beta is effectively infinite.
    Default: None

  • Name
    tries
    Type
    int
    Description

    Number of restart attempts before the algorithm stops. On D-WAVE 2000Q, a typical restart takes between 1 and 60 seconds.
    Default: 10

  • Name
    inner_rounds
    Type
    int | None
    Description

    The algorithm takes at most this many iterations between restart attempts; restart attempts are typically terminated due to max_no_improvement. If None, inner_rounds is effectively infinite.
    Default: None

  • Name
    chainlength_patience
    Type
    int
    Description

    Maximum number of failed iterations to improve chain lengths in the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    max_fill
    Type
    int | None
    Description

    Restricts the number of chains that can simultaneously incorporate the same qubit during the search. Values above 63 are treated as 63. If None, max_fill is effectively infinite.
    Default: None

  • Name
    threads
    Type
    int
    Description

    Maximum number of threads to use. Note that the parallelization is only advantageous where the expected degree of variables is significantly greater than the number of threads. Min: 1.
    Default: 1

  • Name
    return_overlap
    Type
    bool
    Description

    This function returns an embedding, regardless of whether or not qubits are used by multiple variables. return_overlap determines the function's return value. If True, a 2-tuple is returned, in which the first element is the embedding and the second element is a bool representing the embedding validity. If False, only an embedding is returned.
    Default: False

  • Name
    skip_initialization
    Type
    bool
    Description

    Skip the initialization pass. Note that this only works if the chains passed in through initial_chains and fixed_chains are semi-valid. A semi-valid embedding is a collection of chains such that every adjacent pair of variables (u,v) has a coupler (p,q) in the hardware graph where p is in chain(u) and q is in chain(v). This can be used on a valid embedding to immediately skip to the chain length improvement phase. Another good source of semi-valid embeddings is the output of this function with the return_overlap parameter enabled.
    Default: False

  • Name
    initial_chains
    Type
    Any
    Description

    Initial chains inserted into an embedding before fixed_chains are placed, which occurs before the initialization pass. These can be used to restart the algorithm in a similar state to a previous embedding; for example, to improve chain length of a valid embedding or to reduce overlap in a semi-valid embedding (see skip_initialization) previously returned by the algorithm. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    fixed_chains
    Type
    Any
    Description

    Fixed chains inserted into an embedding before the initialization pass. As the algorithm proceeds, these chains are not allowed to change, and the qubits used by these chains are not used by other chains. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    restrict_chains
    Type
    Any
    Description

    Throughout the algorithm, it is guaranteed that chain[i] is a subset of restrict_chains[i] for each i, except those with missing or empty entries. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    suspend_chains
    Type
    Any
    Description

    This is a metafeature that is only implemented in the Python interface. suspend_chains[i] is an iterable of iterables; for example, suspend_chains[i] = [blob_1, blob_2], with each blob_j an iterable of target node labels. This enforces the following: for each suspended variable i, for each blob_j in the suspension of i, at least one qubit from blob_j will be contained in the chain for iminorminer accomplishes this through the following problem transformation for each iterable blob_j in suspend_chains[i], Add an auxiliary node Zij to both source and target graphs Set fixed_chains[Zij] = [Zij] Add the edge (i,Zij) to the source graph Add the edges (q,Zij) to the target graph for each q in blob_j
    Default: ()

Leap Hybrid BQM

  • Short Name: LBQM
  • Algorithm Type: Hybrid
  • Category: Hybrid-External
  • Native Input Format: BQM
Leap’s quantum-classical hybrid solvers are intended to solve arbitrary application problems formulated as quadratic models. This solver accepts arbitrarily structured, unconstrained problems formulated as BQMs, with any constraints typically represented through penalty models.

Usage via LunaSolve

# Example of using LBQM using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="LBQM",
    provider="dwave",
    solver_parameters={
        "time_limit": None,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding LBQM using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "LBQM": {
        "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
    time_limit
    Type
    float | int | None
    Description

    The time limit for the solver.
    Default: None

Leap Hybrid CQM

  • Short Name: LCQM
  • Algorithm Type: Hybrid
  • Category: Hybrid-External
  • Native Input Format: CQM
Leap’s quantum-classical hybrid solvers are intended to solve arbitrary application problems formulated as quadratic models. This solver accepts arbitrarily structured problems formulated as CQMs, with any constraints represented natively.

Usage via LunaSolve

# Example of using LCQM using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="LCQM",
    provider="dwave",
    solver_parameters={
        "time_limit": None,
        "spin_variables": None,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding LCQM using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "LCQM": {
        "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
    time_limit
    Type
    float | int | None
    Description

    The time limit for the solver.
    Default: None

  • Name
    spin_variables
    Type
    list[str] | None
    Description

    The list of spin variables.
    Default: None

Repeated Reverse Quantum Annealing

This solver is only available for commercial and academic licenses.
  • Short Name: RRQA
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: BQM
Repeated Reverse Quantum Annealing begins the annealing process from a previously initialized state and increases the temperature from there. Afterwards, the temperature is decreased again until the solution is found. This procedure is repeated several times with this particular solver. (for additional information see: D-Wave Reverse Annealing)

Usage via LunaSolve

# Example of using RRQA using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="RRQA",
    provider="dwave",
    solver_parameters={
        "sampling_params": {
            "anneal_offsets": None,
            "annealing_time": None,
            "auto_scale": None,
            "flux_biases": None,
            "flux_drift_compensation": True,
            "h_gain_schedule": None,
            "max_answers": None,
            "programming_thermalization": None,
            "readout_thermalization": None,
            "reduce_intersample_correlation": False,
        },
        "initial_states": None,
        "n_initial_states": 1,
        "samples_per_state": 1,
        "beta_schedule": [0.5, 3],
        "timeout": 300,
        "max_iter": 10,
        "target": None,
        "check_trivial": True,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding RRQA using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "RRQA": {
        "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
    sampling_params
    Type
    RRQuantumAnnealingSamplingParams
    Description

    Parameters for the RRQuantumAnnealingSamplingParams. See https://docs.dwavesys.com/docs/latest/c_solver_parameters.html for more details.
    Default: RRQuantumAnnealingSamplingParams(anneal_offsets=None, annealing_time=None, auto_scale=None, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, max_answers=None, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False)

  • Name
    initial_states
    Type
    list[dict[str, int]] | None
    Description

    Initial states for the solver. For each list element state, one call to the sampler with the parameter initial_state=state will be made in the first iteration.
    Default: None

  • Name
    n_initial_states
    Type
    int
    Description

    Number of initial states to create when initial_states is None. If initial_states is not None, this parameter will be ignored. Min: 1
    Default: 1

  • Name
    samples_per_state
    Type
    int
    Description

    How many samples to create per state in each iteration after the first. Min: 1
    Default: 1

  • Name
    beta_schedule
    Type
    list[float]
    Description

    Beta schedule for the solver.
    Default: [0.5, 3]

  • Name
    timeout
    Type
    float
    Description

    Timeout for the solver.
    Default: 300

  • Name
    max_iter
    Type
    int
    Description

    Maximum number of iterations for the solver.
    Default: 10

  • Name
    target
    Type
    Any | None
    Description

    The target energy for the solving process.
    Default: None

  • Name
    check_trivial
    Type
    bool
    Description

    Whether to check for trivial variables. Checking for trivial variables means an overhead. On the other hand, when set to False, trivial variables, i.e., variables without interactions, will lead to a runtime error.
    Default: True

RRQuantumAnnealingSamplingParams
  • Name
    anneal_offsets
    Type
    Any | None
    Description

    Anneal offsets for the sampling.
    Default: None

  • Name
    annealing_time
    Type
    Any | None
    Description

    Annealing time for the sampling.
    Default: None

  • Name
    auto_scale
    Type
    Any | None
    Description

    Whether to auto scale for the sampling.
    Default: None

  • Name
    flux_biases
    Type
    Any | None
    Description

    Flux biases for the sampling.
    Default: None

  • Name
    flux_drift_compensation
    Type
    bool
    Description

    Whether to use flux drift compensation.
    Default: True

  • Name
    h_gain_schedule
    Type
    Any | None
    Description

    H gain schedule for the sampling.
    Default: None

  • Name
    max_answers
    Type
    int | None
    Description

    Maximum number of answers for the sampling. Min: 1
    Default: None

  • Name
    programming_thermalization
    Type
    float | None
    Description

    Programming thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    readout_thermalization
    Type
    float | None
    Description

    Readout thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    reduce_intersample_correlation
    Type
    bool
    Description

    Whether to reduce intersample correlation for the sampling.
    Default: False

Population Annealing QPU

This solver is only available for commercial and academic licenses.
  • Short Name: PAQ
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: BQM
Population Annealing uses a sequential Monte Carlo method to minimize the energy of a population. The population consists of walkers that can explore their neighborhood during the cooling process. Afterwards, walkers are removed and duplicated using bias to lower energy. Eventually, a population collapse occurs where all walkers are in the lowest energy state.

Usage via LunaSolve

# Example of using PAQ using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="PAQ",
    provider="dwave",
    solver_parameters={
        "decomposer": {
            "size": 10,
            "min_gain": None,
            "rolling": True,
            "rolling_history": 1.0,
            "silent_rewind": True,
            "traversal": "energy",
        },
        "qpu": {
            "num_reads": 100,
            "num_retries": 0,
            "sampling_params": {
                "anneal_offsets": None,
                "anneal_schedule": None,
                "annealing_time": None,
                "auto_scale": None,
                "fast_anneal": False,
                "flux_biases": None,
                "flux_drift_compensation": True,
                "h_gain_schedule": None,
                "initial_state": None,
                "max_answers": None,
                "num_reads": 1,
                "programming_thermalization": None,
                "readout_thermalization": None,
                "reduce_intersample_correlation": False,
                "reinitialize_state": None,
            },
            "auto_embedding_params": {
                "embedding_parameters": {
                    "max_no_improvement": 10,
                    "random_seed": None,
                    "timeout": 1000,
                    "max_beta": None,
                    "tries": 10,
                    "inner_rounds": None,
                    "chainlength_patience": 10,
                    "max_fill": None,
                    "threads": 1,
                    "return_overlap": False,
                    "skip_initialization": False,
                    "initial_chains": (),
                    "fixed_chains": (),
                    "restrict_chains": (),
                    "suspend_chains": (),
                },
            },
        },
        "fixed_temperature_sampler": {
            "num_sweeps": 10000,
            "num_reads": None,
        },
        "max_iter": 20,
        "max_time": 2,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding PAQ using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "PAQ": {
        "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
    decomposer
    Type
    Decomposer
    Description

    Parameters for the decomposer, which selects variables for the graph search to stop.
    Default: Decomposer(size=10, min_gain=None, rolling=True, rolling_history=1.0, silent_rewind=True, traversal='energy')

  • Name
    qpu
    Type
    Qpu
    Description

    Parameters for the Quantum Processing Unit (QPU).
    Default: Qpu(num_reads=100, num_retries=0, sampling_params=SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None), auto_embedding_params=AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())))

  • Name
    fixed_temperature_sampler
    Type
    FixedTemperatureSampler
    Description

    Parameters for the fixed temperature sampler.
    Default: FixedTemperatureSampler(num_sweeps=10000, num_reads=None)

  • Name
    max_iter
    Type
    int
    Description

    Maximum number of iterations.
    Default: 20

  • Name
    max_time
    Type
    int
    Description

    Maximum time in seconds that the algorithm is allowed to run.
    Default: 2

Decomposer
  • Name
    size
    Type
    int
    Description

    Nominal number of variables in the subproblem. Actual subproblem can be smaller, depending on other parameters (e.g. min_gain).
    Default: 10

  • Name
    min_gain
    Type
    float | None
    Description

    Minimum reduction required to BQM energy, given the current sample. A variable is included in the subproblem only if inverting its sample value reduces energy by at least this amount.
    Default: None

  • Name
    rolling
    Type
    bool
    Description

    If True, successive calls for the same problem (with possibly different samples) produce subproblems on different variables, selected by rolling down the list of all variables sorted by decreasing impact.
    Default: True

  • Name
    rolling_history
    Type
    float
    Description

    Fraction of the problem size, as a float in range 0.0 to 1.0, that should participate in the rolling selection. Once reached, subproblem unrolling is reset. Min: 0.0, Max: 1.0
    Default: 1.0

  • Name
    silent_rewind
    Type
    bool
    Description

    If False, raises :exc:EndOfStream when resetting/rewinding the subproblem generator upon the reset condition for unrolling.
    Default: True

  • Name
    traversal
    Type
    Literal["energy", "bfs", "pfs"]
    Description

    Traversal algorithm used to pick a subproblem of size variables. Options are: energy: Use the next size variables in the list of variables ordered by descending energy impact. bfs: Breadth-first traversal seeded by the next variable in the energy impact list. pfs: Priority-first traversal seeded by variables from the energy impact list, proceeding with the variable on the search boundary that has the highest energy impact.
    Default: "energy"

Qpu
  • Name
    num_reads
    Type
    int
    Description

    Number of states (output solutions) to read from the sampler.
    Default: 100

  • Name
    num_retries
    Type
    int
    Description

    Number of times the sampler will retry to embed if a failure occurs.
    Default: 0

  • Name
    sampling_params
    Type
    SamplingParams
    Description

    Sampling parameters for the QPU. See https://docs.dwavesys.com/docs/latest/c_solver_parameters.html#anneal-offsets for more details
    Default: SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None)

  • Name
    auto_embedding_params
    Type
    AutoEmbeddingParams
    Description

    Auto embedding parameters for the QPU. See https://docs.ocean.dwavesys.com/projects/system/en/stable/reference/generated/minorminer.find_embedding.html for more details.
    Default: AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=()))

FixedTemperatureSampler
  • Name
    num_sweeps
    Type
    int
    Description

    Number of sweeps for the sampler.
    Default: 10000

  • Name
    num_reads
    Type
    int | None
    Description

    Number of reads for the sampler.
    Default: None

SamplingParams
  • Name
    anneal_offsets
    Type
    Any | None
    Description

    Anneal offsets for the sampling.
    Default: None

  • Name
    anneal_schedule
    Type
    Any | None
    Description

    Anneal schedule for the sampling.
    Default: None

  • Name
    annealing_time
    Type
    Any | None
    Description

    Annealing time for the sampling.
    Default: None

  • Name
    auto_scale
    Type
    Any | None
    Description

    Whether to auto scale for the sampling.
    Default: None

  • Name
    fast_anneal
    Type
    bool
    Description

    Use the fast-anneal protocol instead of the standard anneal.
    Default: False

  • Name
    flux_biases
    Type
    Any | None
    Description

    Flux biases for the sampling.
    Default: None

  • Name
    flux_drift_compensation
    Type
    bool
    Description

    Whether to use flux drift compensation for the sampling.
    Default: True

  • Name
    h_gain_schedule
    Type
    Any | None
    Description

    H gain schedule for the sampling.
    Default: None

  • Name
    initial_state
    Type
    Any | None
    Description

    Initial state for the sampling.
    Default: None

  • Name
    max_answers
    Type
    int | None
    Description

    Maximum number of answers for the sampling. Min: 1
    Default: None

  • Name
    num_reads
    Type
    int
    Description

    Number of reads for the sampling. Min: 1
    Default: 1

  • Name
    programming_thermalization
    Type
    float | None
    Description

    Programming thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    readout_thermalization
    Type
    float | None
    Description

    Readout thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    reduce_intersample_correlation
    Type
    bool
    Description

    Whether to reduce intersample correlation for the sampling.
    Default: False

  • Name
    reinitialize_state
    Type
    bool | None
    Description

    Whether to reinitialize state for the sampling. Should be None if initial_state is None.
    Default: None

AutoEmbeddingParams
  • Name
    embedding_parameters
    Type
    EmbeddingParameters
    Description

    Embedding parameters for the auto embedding.
    Default: EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())

EmbeddingParameters
  • Name
    max_no_improvement
    Type
    int
    Description

    Maximum number of failed iterations to improve the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    random_seed
    Type
    int | None
    Description

    Seed for the random number generator. If None, seed is set by os.urandom().
    Default: None

  • Name
    timeout
    Type
    int
    Description

    Algorithm gives up after timeout seconds.
    Default: 1000

  • Name
    max_beta
    Type
    float | None
    Description

    Qubits are assigned weight according to a formula (beta^n) where n is the number of chains containing that qubit. This value should never be less than or equal to 1. If None, max_beta is effectively infinite.
    Default: None

  • Name
    tries
    Type
    int
    Description

    Number of restart attempts before the algorithm stops. On D-WAVE 2000Q, a typical restart takes between 1 and 60 seconds.
    Default: 10

  • Name
    inner_rounds
    Type
    int | None
    Description

    The algorithm takes at most this many iterations between restart attempts; restart attempts are typically terminated due to max_no_improvement. If None, inner_rounds is effectively infinite.
    Default: None

  • Name
    chainlength_patience
    Type
    int
    Description

    Maximum number of failed iterations to improve chain lengths in the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    max_fill
    Type
    int | None
    Description

    Restricts the number of chains that can simultaneously incorporate the same qubit during the search. Values above 63 are treated as 63. If None, max_fill is effectively infinite.
    Default: None

  • Name
    threads
    Type
    int
    Description

    Maximum number of threads to use. Note that the parallelization is only advantageous where the expected degree of variables is significantly greater than the number of threads. Min: 1.
    Default: 1

  • Name
    return_overlap
    Type
    bool
    Description

    This function returns an embedding, regardless of whether or not qubits are used by multiple variables. return_overlap determines the function's return value. If True, a 2-tuple is returned, in which the first element is the embedding and the second element is a bool representing the embedding validity. If False, only an embedding is returned.
    Default: False

  • Name
    skip_initialization
    Type
    bool
    Description

    Skip the initialization pass. Note that this only works if the chains passed in through initial_chains and fixed_chains are semi-valid. A semi-valid embedding is a collection of chains such that every adjacent pair of variables (u,v) has a coupler (p,q) in the hardware graph where p is in chain(u) and q is in chain(v). This can be used on a valid embedding to immediately skip to the chain length improvement phase. Another good source of semi-valid embeddings is the output of this function with the return_overlap parameter enabled.
    Default: False

  • Name
    initial_chains
    Type
    Any
    Description

    Initial chains inserted into an embedding before fixed_chains are placed, which occurs before the initialization pass. These can be used to restart the algorithm in a similar state to a previous embedding; for example, to improve chain length of a valid embedding or to reduce overlap in a semi-valid embedding (see skip_initialization) previously returned by the algorithm. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    fixed_chains
    Type
    Any
    Description

    Fixed chains inserted into an embedding before the initialization pass. As the algorithm proceeds, these chains are not allowed to change, and the qubits used by these chains are not used by other chains. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    restrict_chains
    Type
    Any
    Description

    Throughout the algorithm, it is guaranteed that chain[i] is a subset of restrict_chains[i] for each i, except those with missing or empty entries. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    suspend_chains
    Type
    Any
    Description

    This is a metafeature that is only implemented in the Python interface. suspend_chains[i] is an iterable of iterables; for example, suspend_chains[i] = [blob_1, blob_2], with each blob_j an iterable of target node labels. This enforces the following: for each suspended variable i, for each blob_j in the suspension of i, at least one qubit from blob_j will be contained in the chain for iminorminer accomplishes this through the following problem transformation for each iterable blob_j in suspend_chains[i], Add an auxiliary node Zij to both source and target graphs Set fixed_chains[Zij] = [Zij] Add the edge (i,Zij) to the source graph Add the edges (q,Zij) to the target graph for each q in blob_j
    Default: ()

Parallel Tempering QPU

This solver is only available for commercial and academic licenses.
  • Short Name: PTQ
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: BQM
Parallel Tempering uses multiple optimization procedures per temperature. During the cooling process, an exchange of replicas can take place between the parallel procedures, thus enabling higher energy mountains to be overcome.

Usage via LunaSolve

# Example of using PTQ using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="PTQ",
    provider="dwave",
    solver_parameters={
        "n_replicas": 4,
        "decomposer": {
            "size": 10,
            "min_gain": None,
            "rolling": True,
            "rolling_history": 1.0,
            "silent_rewind": True,
            "traversal": "energy",
        },
        "qpu": {
            "num_reads": 100,
            "num_retries": 0,
            "sampling_params": {
                "anneal_offsets": None,
                "anneal_schedule": None,
                "annealing_time": None,
                "auto_scale": None,
                "fast_anneal": False,
                "flux_biases": None,
                "flux_drift_compensation": True,
                "h_gain_schedule": None,
                "initial_state": None,
                "max_answers": None,
                "num_reads": 1,
                "programming_thermalization": None,
                "readout_thermalization": None,
                "reduce_intersample_correlation": False,
                "reinitialize_state": None,
            },
            "auto_embedding_params": {
                "embedding_parameters": {
                    "max_no_improvement": 10,
                    "random_seed": None,
                    "timeout": 1000,
                    "max_beta": None,
                    "tries": 10,
                    "inner_rounds": None,
                    "chainlength_patience": 10,
                    "max_fill": None,
                    "threads": 1,
                    "return_overlap": False,
                    "skip_initialization": False,
                    "initial_chains": (),
                    "fixed_chains": (),
                    "restrict_chains": (),
                    "suspend_chains": (),
                },
            },
        },
        "fixed_temperature_sampler": {
            "num_sweeps": 10000,
            "num_reads": None,
        },
        "cpu_count_multiplier": 5,
        "loop": {
            "max_iter": 100,
            "max_time": 5,
            "convergence": 3,
            "target": None,
            "rtol": 1e-05,
            "atol": 1e-08,
        },
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding PTQ using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "PTQ": {
        "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
    n_replicas
    Type
    int
    Description

    Number of replicas for the parallel tempering.
    Default: 4

  • Name
    decomposer
    Type
    Decomposer
    Description

    Parameters for the decomposer.
    Default: Decomposer(size=10, min_gain=None, rolling=True, rolling_history=1.0, silent_rewind=True, traversal='energy')

  • Name
    qpu
    Type
    Qpu
    Description

    Parameters for the QPU.
    Default: Qpu(num_reads=100, num_retries=0, sampling_params=SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None), auto_embedding_params=AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())))

  • Name
    fixed_temperature_sampler
    Type
    FixedTemperatureSampler
    Description

    Parameters for the fixed temperature sampler.
    Default: FixedTemperatureSampler(num_sweeps=10000, num_reads=None)

  • Name
    cpu_count_multiplier
    Type
    int
    Description

    Multiplier for the CPU count.
    Default: 5

  • Name
    loop
    Type
    Loop
    Description

    Parameters for the main loop of the algorithm.
    Default: Loop(max_iter=100, max_time=5, convergence=3, target=None, rtol=1e-05, atol=1e-08)

Decomposer
  • Name
    size
    Type
    int
    Description

    Nominal number of variables in the subproblem. Actual subproblem can be smaller, depending on other parameters (e.g. min_gain).
    Default: 10

  • Name
    min_gain
    Type
    float | None
    Description

    Minimum reduction required to BQM energy, given the current sample. A variable is included in the subproblem only if inverting its sample value reduces energy by at least this amount.
    Default: None

  • Name
    rolling
    Type
    bool
    Description

    If True, successive calls for the same problem (with possibly different samples) produce subproblems on different variables, selected by rolling down the list of all variables sorted by decreasing impact.
    Default: True

  • Name
    rolling_history
    Type
    float
    Description

    Fraction of the problem size, as a float in range 0.0 to 1.0, that should participate in the rolling selection. Once reached, subproblem unrolling is reset. Min: 0.0, Max: 1.0
    Default: 1.0

  • Name
    silent_rewind
    Type
    bool
    Description

    If False, raises :exc:EndOfStream when resetting/rewinding the subproblem generator upon the reset condition for unrolling.
    Default: True

  • Name
    traversal
    Type
    Literal["energy", "bfs", "pfs"]
    Description

    Traversal algorithm used to pick a subproblem of size variables. Options are: energy: Use the next size variables in the list of variables ordered by descending energy impact. bfs: Breadth-first traversal seeded by the next variable in the energy impact list. pfs: Priority-first traversal seeded by variables from the energy impact list, proceeding with the variable on the search boundary that has the highest energy impact.
    Default: "energy"

Qpu
  • Name
    num_reads
    Type
    int
    Description

    Number of states (output solutions) to read from the sampler.
    Default: 100

  • Name
    num_retries
    Type
    int
    Description

    Number of times the sampler will retry to embed if a failure occurs.
    Default: 0

  • Name
    sampling_params
    Type
    SamplingParams
    Description

    Sampling parameters for the QPU. See https://docs.dwavesys.com/docs/latest/c_solver_parameters.html#anneal-offsets for more details
    Default: SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None)

  • Name
    auto_embedding_params
    Type
    AutoEmbeddingParams
    Description

    Auto embedding parameters for the QPU. See https://docs.ocean.dwavesys.com/projects/system/en/stable/reference/generated/minorminer.find_embedding.html for more details.
    Default: AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=()))

FixedTemperatureSampler
  • Name
    num_sweeps
    Type
    int
    Description

    Number of sweeps for the sampler.
    Default: 10000

  • Name
    num_reads
    Type
    int | None
    Description

    Number of reads for the sampler.
    Default: None

Loop
  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations.
    Default: 100

  • Name
    max_time
    Type
    int
    Description

    Time in seconds after which the algorithm will stop.
    Default: 5

  • Name
    convergence
    Type
    int
    Description

    Number of iterations with unchanged output to terminate algorithm.
    Default: 3

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach.
    Default: None

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance for convergence.
    Default: 1e-05

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance for convergence.
    Default: 1e-08

SamplingParams
  • Name
    anneal_offsets
    Type
    Any | None
    Description

    Anneal offsets for the sampling.
    Default: None

  • Name
    anneal_schedule
    Type
    Any | None
    Description

    Anneal schedule for the sampling.
    Default: None

  • Name
    annealing_time
    Type
    Any | None
    Description

    Annealing time for the sampling.
    Default: None

  • Name
    auto_scale
    Type
    Any | None
    Description

    Whether to auto scale for the sampling.
    Default: None

  • Name
    fast_anneal
    Type
    bool
    Description

    Use the fast-anneal protocol instead of the standard anneal.
    Default: False

  • Name
    flux_biases
    Type
    Any | None
    Description

    Flux biases for the sampling.
    Default: None

  • Name
    flux_drift_compensation
    Type
    bool
    Description

    Whether to use flux drift compensation for the sampling.
    Default: True

  • Name
    h_gain_schedule
    Type
    Any | None
    Description

    H gain schedule for the sampling.
    Default: None

  • Name
    initial_state
    Type
    Any | None
    Description

    Initial state for the sampling.
    Default: None

  • Name
    max_answers
    Type
    int | None
    Description

    Maximum number of answers for the sampling. Min: 1
    Default: None

  • Name
    num_reads
    Type
    int
    Description

    Number of reads for the sampling. Min: 1
    Default: 1

  • Name
    programming_thermalization
    Type
    float | None
    Description

    Programming thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    readout_thermalization
    Type
    float | None
    Description

    Readout thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    reduce_intersample_correlation
    Type
    bool
    Description

    Whether to reduce intersample correlation for the sampling.
    Default: False

  • Name
    reinitialize_state
    Type
    bool | None
    Description

    Whether to reinitialize state for the sampling. Should be None if initial_state is None.
    Default: None

AutoEmbeddingParams
  • Name
    embedding_parameters
    Type
    EmbeddingParameters
    Description

    Embedding parameters for the auto embedding.
    Default: EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())

EmbeddingParameters
  • Name
    max_no_improvement
    Type
    int
    Description

    Maximum number of failed iterations to improve the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    random_seed
    Type
    int | None
    Description

    Seed for the random number generator. If None, seed is set by os.urandom().
    Default: None

  • Name
    timeout
    Type
    int
    Description

    Algorithm gives up after timeout seconds.
    Default: 1000

  • Name
    max_beta
    Type
    float | None
    Description

    Qubits are assigned weight according to a formula (beta^n) where n is the number of chains containing that qubit. This value should never be less than or equal to 1. If None, max_beta is effectively infinite.
    Default: None

  • Name
    tries
    Type
    int
    Description

    Number of restart attempts before the algorithm stops. On D-WAVE 2000Q, a typical restart takes between 1 and 60 seconds.
    Default: 10

  • Name
    inner_rounds
    Type
    int | None
    Description

    The algorithm takes at most this many iterations between restart attempts; restart attempts are typically terminated due to max_no_improvement. If None, inner_rounds is effectively infinite.
    Default: None

  • Name
    chainlength_patience
    Type
    int
    Description

    Maximum number of failed iterations to improve chain lengths in the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    max_fill
    Type
    int | None
    Description

    Restricts the number of chains that can simultaneously incorporate the same qubit during the search. Values above 63 are treated as 63. If None, max_fill is effectively infinite.
    Default: None

  • Name
    threads
    Type
    int
    Description

    Maximum number of threads to use. Note that the parallelization is only advantageous where the expected degree of variables is significantly greater than the number of threads. Min: 1.
    Default: 1

  • Name
    return_overlap
    Type
    bool
    Description

    This function returns an embedding, regardless of whether or not qubits are used by multiple variables. return_overlap determines the function's return value. If True, a 2-tuple is returned, in which the first element is the embedding and the second element is a bool representing the embedding validity. If False, only an embedding is returned.
    Default: False

  • Name
    skip_initialization
    Type
    bool
    Description

    Skip the initialization pass. Note that this only works if the chains passed in through initial_chains and fixed_chains are semi-valid. A semi-valid embedding is a collection of chains such that every adjacent pair of variables (u,v) has a coupler (p,q) in the hardware graph where p is in chain(u) and q is in chain(v). This can be used on a valid embedding to immediately skip to the chain length improvement phase. Another good source of semi-valid embeddings is the output of this function with the return_overlap parameter enabled.
    Default: False

  • Name
    initial_chains
    Type
    Any
    Description

    Initial chains inserted into an embedding before fixed_chains are placed, which occurs before the initialization pass. These can be used to restart the algorithm in a similar state to a previous embedding; for example, to improve chain length of a valid embedding or to reduce overlap in a semi-valid embedding (see skip_initialization) previously returned by the algorithm. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    fixed_chains
    Type
    Any
    Description

    Fixed chains inserted into an embedding before the initialization pass. As the algorithm proceeds, these chains are not allowed to change, and the qubits used by these chains are not used by other chains. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    restrict_chains
    Type
    Any
    Description

    Throughout the algorithm, it is guaranteed that chain[i] is a subset of restrict_chains[i] for each i, except those with missing or empty entries. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    suspend_chains
    Type
    Any
    Description

    This is a metafeature that is only implemented in the Python interface. suspend_chains[i] is an iterable of iterables; for example, suspend_chains[i] = [blob_1, blob_2], with each blob_j an iterable of target node labels. This enforces the following: for each suspended variable i, for each blob_j in the suspension of i, at least one qubit from blob_j will be contained in the chain for iminorminer accomplishes this through the following problem transformation for each iterable blob_j in suspend_chains[i], Add an auxiliary node Zij to both source and target graphs Set fixed_chains[Zij] = [Zij] Add the edge (i,Zij) to the source graph Add the edges (q,Zij) to the target graph for each q in blob_j
    Default: ()

QBSolv Like QPU

This solver is only available for commercial and academic licenses.
  • Short Name: QLQ
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: BQM
QBSolv Like Simulated Annealing breaks down the problem and solves the parts individually using a classic solver that uses Simulated Annealing. This particular implementation uses hybrid.SimulatedAnnealingSubproblemSampler as a sampler for the subproblems to achieve a QBSolv like behaviour.

Usage via LunaSolve

# Example of using QLQ using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="QLQ",
    provider="dwave",
    solver_parameters={
        "qbsolv_like": {
            "decomposer_size": 50,
            "rolling": True,
            "rolling_history": 0.15,
            "cpu_count_multiplier": 1,
            "loop": {
                "max_iter": 100,
                "max_time": 5,
                "convergence": 3,
                "target": None,
                "rtol": 1e-05,
                "atol": 1e-08,
            },
        },
        "qpu": {
            "num_reads": 100,
            "num_retries": 0,
            "sampling_params": {
                "anneal_offsets": None,
                "anneal_schedule": None,
                "annealing_time": None,
                "auto_scale": None,
                "fast_anneal": False,
                "flux_biases": None,
                "flux_drift_compensation": True,
                "h_gain_schedule": None,
                "initial_state": None,
                "max_answers": None,
                "num_reads": 1,
                "programming_thermalization": None,
                "readout_thermalization": None,
                "reduce_intersample_correlation": False,
                "reinitialize_state": None,
            },
            "auto_embedding_params": {
                "embedding_parameters": {
                    "max_no_improvement": 10,
                    "random_seed": None,
                    "timeout": 1000,
                    "max_beta": None,
                    "tries": 10,
                    "inner_rounds": None,
                    "chainlength_patience": 10,
                    "max_fill": None,
                    "threads": 1,
                    "return_overlap": False,
                    "skip_initialization": False,
                    "initial_chains": (),
                    "fixed_chains": (),
                    "restrict_chains": (),
                    "suspend_chains": (),
                },
            },
        },
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding QLQ using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "QLQ": {
        "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
    qbsolv_like
    Type
    QBSOLVLike
    Description

    Parameters for the QBSOLV-like solver.
    Default: QBSOLVLike(decomposer_size=50, rolling=True, rolling_history=0.15, cpu_count_multiplier=1, loop=Loop(max_iter=100, max_time=5, convergence=3, target=None, rtol=1e-05, atol=1e-08))

  • Name
    qpu
    Type
    Qpu
    Description

    QPU parameters
    Default: Qpu(num_reads=100, num_retries=0, sampling_params=SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None), auto_embedding_params=AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())))

QBSOLVLike
  • Name
    decomposer_size
    Type
    int
    Description

    Size for the decomposer.
    Default: 50

  • Name
    rolling
    Type
    bool
    Description

    Whether to use rolling for the solver.
    Default: True

  • Name
    rolling_history
    Type
    float
    Description

    Rolling history for the solver.
    Default: 0.15

  • Name
    cpu_count_multiplier
    Type
    int
    Description

    CPU count multiplier for the solver.
    Default: 1

  • Name
    loop
    Type
    Loop
    Description

    Parameters for the main loop of the algorithm.
    Default: Loop(max_iter=100, max_time=5, convergence=3, target=None, rtol=1e-05, atol=1e-08)

Qpu
  • Name
    num_reads
    Type
    int
    Description

    Number of states (output solutions) to read from the sampler.
    Default: 100

  • Name
    num_retries
    Type
    int
    Description

    Number of times the sampler will retry to embed if a failure occurs.
    Default: 0

  • Name
    sampling_params
    Type
    SamplingParams
    Description

    Sampling parameters for the QPU. See https://docs.dwavesys.com/docs/latest/c_solver_parameters.html#anneal-offsets for more details
    Default: SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None)

  • Name
    auto_embedding_params
    Type
    AutoEmbeddingParams
    Description

    Auto embedding parameters for the QPU. See https://docs.ocean.dwavesys.com/projects/system/en/stable/reference/generated/minorminer.find_embedding.html for more details.
    Default: AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=()))

Loop
  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations.
    Default: 100

  • Name
    max_time
    Type
    int
    Description

    Time in seconds after which the algorithm will stop.
    Default: 5

  • Name
    convergence
    Type
    int
    Description

    Number of iterations with unchanged output to terminate algorithm.
    Default: 3

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach.
    Default: None

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance for convergence.
    Default: 1e-05

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance for convergence.
    Default: 1e-08

SamplingParams
  • Name
    anneal_offsets
    Type
    Any | None
    Description

    Anneal offsets for the sampling.
    Default: None

  • Name
    anneal_schedule
    Type
    Any | None
    Description

    Anneal schedule for the sampling.
    Default: None

  • Name
    annealing_time
    Type
    Any | None
    Description

    Annealing time for the sampling.
    Default: None

  • Name
    auto_scale
    Type
    Any | None
    Description

    Whether to auto scale for the sampling.
    Default: None

  • Name
    fast_anneal
    Type
    bool
    Description

    Use the fast-anneal protocol instead of the standard anneal.
    Default: False

  • Name
    flux_biases
    Type
    Any | None
    Description

    Flux biases for the sampling.
    Default: None

  • Name
    flux_drift_compensation
    Type
    bool
    Description

    Whether to use flux drift compensation for the sampling.
    Default: True

  • Name
    h_gain_schedule
    Type
    Any | None
    Description

    H gain schedule for the sampling.
    Default: None

  • Name
    initial_state
    Type
    Any | None
    Description

    Initial state for the sampling.
    Default: None

  • Name
    max_answers
    Type
    int | None
    Description

    Maximum number of answers for the sampling. Min: 1
    Default: None

  • Name
    num_reads
    Type
    int
    Description

    Number of reads for the sampling. Min: 1
    Default: 1

  • Name
    programming_thermalization
    Type
    float | None
    Description

    Programming thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    readout_thermalization
    Type
    float | None
    Description

    Readout thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    reduce_intersample_correlation
    Type
    bool
    Description

    Whether to reduce intersample correlation for the sampling.
    Default: False

  • Name
    reinitialize_state
    Type
    bool | None
    Description

    Whether to reinitialize state for the sampling. Should be None if initial_state is None.
    Default: None

AutoEmbeddingParams
  • Name
    embedding_parameters
    Type
    EmbeddingParameters
    Description

    Embedding parameters for the auto embedding.
    Default: EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())

EmbeddingParameters
  • Name
    max_no_improvement
    Type
    int
    Description

    Maximum number of failed iterations to improve the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    random_seed
    Type
    int | None
    Description

    Seed for the random number generator. If None, seed is set by os.urandom().
    Default: None

  • Name
    timeout
    Type
    int
    Description

    Algorithm gives up after timeout seconds.
    Default: 1000

  • Name
    max_beta
    Type
    float | None
    Description

    Qubits are assigned weight according to a formula (beta^n) where n is the number of chains containing that qubit. This value should never be less than or equal to 1. If None, max_beta is effectively infinite.
    Default: None

  • Name
    tries
    Type
    int
    Description

    Number of restart attempts before the algorithm stops. On D-WAVE 2000Q, a typical restart takes between 1 and 60 seconds.
    Default: 10

  • Name
    inner_rounds
    Type
    int | None
    Description

    The algorithm takes at most this many iterations between restart attempts; restart attempts are typically terminated due to max_no_improvement. If None, inner_rounds is effectively infinite.
    Default: None

  • Name
    chainlength_patience
    Type
    int
    Description

    Maximum number of failed iterations to improve chain lengths in the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    max_fill
    Type
    int | None
    Description

    Restricts the number of chains that can simultaneously incorporate the same qubit during the search. Values above 63 are treated as 63. If None, max_fill is effectively infinite.
    Default: None

  • Name
    threads
    Type
    int
    Description

    Maximum number of threads to use. Note that the parallelization is only advantageous where the expected degree of variables is significantly greater than the number of threads. Min: 1.
    Default: 1

  • Name
    return_overlap
    Type
    bool
    Description

    This function returns an embedding, regardless of whether or not qubits are used by multiple variables. return_overlap determines the function's return value. If True, a 2-tuple is returned, in which the first element is the embedding and the second element is a bool representing the embedding validity. If False, only an embedding is returned.
    Default: False

  • Name
    skip_initialization
    Type
    bool
    Description

    Skip the initialization pass. Note that this only works if the chains passed in through initial_chains and fixed_chains are semi-valid. A semi-valid embedding is a collection of chains such that every adjacent pair of variables (u,v) has a coupler (p,q) in the hardware graph where p is in chain(u) and q is in chain(v). This can be used on a valid embedding to immediately skip to the chain length improvement phase. Another good source of semi-valid embeddings is the output of this function with the return_overlap parameter enabled.
    Default: False

  • Name
    initial_chains
    Type
    Any
    Description

    Initial chains inserted into an embedding before fixed_chains are placed, which occurs before the initialization pass. These can be used to restart the algorithm in a similar state to a previous embedding; for example, to improve chain length of a valid embedding or to reduce overlap in a semi-valid embedding (see skip_initialization) previously returned by the algorithm. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    fixed_chains
    Type
    Any
    Description

    Fixed chains inserted into an embedding before the initialization pass. As the algorithm proceeds, these chains are not allowed to change, and the qubits used by these chains are not used by other chains. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    restrict_chains
    Type
    Any
    Description

    Throughout the algorithm, it is guaranteed that chain[i] is a subset of restrict_chains[i] for each i, except those with missing or empty entries. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    suspend_chains
    Type
    Any
    Description

    This is a metafeature that is only implemented in the Python interface. suspend_chains[i] is an iterable of iterables; for example, suspend_chains[i] = [blob_1, blob_2], with each blob_j an iterable of target node labels. This enforces the following: for each suspended variable i, for each blob_j in the suspension of i, at least one qubit from blob_j will be contained in the chain for iminorminer accomplishes this through the following problem transformation for each iterable blob_j in suspend_chains[i], Add an auxiliary node Zij to both source and target graphs Set fixed_chains[Zij] = [Zij] Add the edge (i,Zij) to the source graph Add the edges (q,Zij) to the target graph for each q in blob_j
    Default: ()

Kerberos

  • Short Name: K
  • Algorithm Type: Hybrid
  • Category: Hybrid-Internal
  • Native Input Format: BQM
Kerberos divides the problem into subproblems and solves them using Tabu Search, Simulated Annealing and QPU Subproblem Sampling. These algorithms are executed in parallel and afterwards the best solutions are combined. This procedure is applied iteratively until the best solution is found or a termination criterion is met.

Usage via LunaSolve

# Example of using K using the D-Wave backend in LunaSolve
solution = ls.solution.create(
    optimization_id=optimization.id,
    solver_name="K",
    provider="dwave",
    solver_parameters={
        "tabu": {
            "num_reads": None,
            "tenure": None,
            "timeout": 20,
            "initial_states_generator": "random",
            "max_time": None,
        },
        "simulated_annealing": {
            "num_reads": None,
            "num_sweeps": 1000,
            "beta_range": None,
            "beta_schedule_type": "geometric",
            "initial_states_generator": "random",
        },
        "decomposer": {
            "size": 10,
            "min_gain": None,
            "rolling": True,
            "rolling_history": 1.0,
            "silent_rewind": True,
            "traversal": "energy",
        },
        "qpu": {
            "num_reads": 100,
            "num_retries": 0,
            "sampling_params": {
                "anneal_offsets": None,
                "anneal_schedule": None,
                "annealing_time": None,
                "auto_scale": None,
                "fast_anneal": False,
                "flux_biases": None,
                "flux_drift_compensation": True,
                "h_gain_schedule": None,
                "initial_state": None,
                "max_answers": None,
                "num_reads": 1,
                "programming_thermalization": None,
                "readout_thermalization": None,
                "reduce_intersample_correlation": False,
                "reinitialize_state": None,
            },
            "auto_embedding_params": {
                "embedding_parameters": {
                    "max_no_improvement": 10,
                    "random_seed": None,
                    "timeout": 1000,
                    "max_beta": None,
                    "tries": 10,
                    "inner_rounds": None,
                    "chainlength_patience": 10,
                    "max_fill": None,
                    "threads": 1,
                    "return_overlap": False,
                    "skip_initialization": False,
                    "initial_chains": (),
                    "fixed_chains": (),
                    "restrict_chains": (),
                    "suspend_chains": (),
                },
            },
        },
        "loop": {
            "max_iter": 100,
            "max_time": 5,
            "convergence": 3,
            "target": None,
            "rtol": 1e-05,
            "atol": 1e-08,
        },
        "cpu_count_multiplier": 1,
    },
    qpu_tokens=TokenProvider(
        dwave=QpuToken(
            source="inline",
            name="<dwave token>",
        ),
    ),
)

Usage via LunaBench

# Example of adding K using the D-Wave backend as an algorithm to LunaBench
algorithms = {
    "K": {
        "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
    tabu
    Type
    TabuKerberos
    Description

    Tabu parameters for Kerberos algorithm.
    Default: TabuKerberos(num_reads=None, tenure=None, timeout=20, initial_states_generator='random', max_time=None)

  • Name
    simulated_annealing
    Type
    SimulatedAnnealing
    Description

    Simulated annealing parameters for Kerberos algorithm.
    Default: SimulatedAnnealing(num_reads=None, num_sweeps=1000, beta_range=None, beta_schedule_type='geometric', initial_states_generator='random')

  • Name
    decomposer
    Type
    Decomposer
    Description

    Decomposer parameters for Kerberos algorithm.
    Default: Decomposer(size=10, min_gain=None, rolling=True, rolling_history=1.0, silent_rewind=True, traversal='energy')

  • Name
    qpu
    Type
    Qpu
    Description

    QPU parameters for Kerberos algorithm.
    Default: Qpu(num_reads=100, num_retries=0, sampling_params=SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None), auto_embedding_params=AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())))

  • Name
    loop
    Type
    Loop
    Description

    Parameters for the main loop of the algorithm.
    Default: Loop(max_iter=100, max_time=5, convergence=3, target=None, rtol=1e-05, atol=1e-08)

  • Name
    cpu_count_multiplier
    Type
    int
    Description

    Multiplier for the CPU count.
    Default: 1

TabuKerberos
  • Name
    num_reads
    Type
    int | None
    Description

    Number of reads. Each read is generated by one run of the tabu algorithm. If num_reads is not explicitly given, it is selected to match the number of initial states given. If initial states are not provided, only one read is performed.
    Default: None

  • Name
    tenure
    Type
    int | None
    Description

    Tabu tenure, which is the length of the tabu list, or number of recently explored solutions kept in memory. Default is a quarter of the number of problem variables up to a maximum value of 20.
    Default: None

  • Name
    timeout
    Type
    float
    Description

    Timeout for non-interruptable operation of tabu search.
    Default: 20

  • Name
    initial_states_generator
    Type
    Literal["none", "tile", "random"]
    Description

    Defines the expansion of initial_states if fewer than num_reads are specified: 'none': if the number of initial states specified is smaller than num_reads, raises ValueError. 'tile': reuses the specified initial states if fewer than num_reads or truncates if greater. 'random': expands the specified initial states with randomly generated states if fewer than num_reads or truncates if greater.
    Default: "random"

  • Name
    max_time
    Type
    float | None
    Description

    Timeout for tabu search.
    Default: None

SimulatedAnnealing
  • Name
    num_reads
    Type
    int | None
    Description

    Number of reads. Each read is generated by one run of the simulated annealing algorithm. If num_reads is not explicitly given, it is selected to match the number of initial states given. If initial states are not provided, only one read is performed.
    Default: None

  • Name
    num_sweeps
    Type
    int | None
    Description

    Number of sweeps used in annealing.
    Default: 1000

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

    A 2-tuple defining the beginning and end of the beta schedule, where beta is the inverse temperature. The schedule is applied linearly in beta. Default range is set based on the total bias associated with each node.
    Default: None

  • Name
    beta_schedule_type
    Type
    Literal["linear", "geometric"]
    Description

    Beta schedule type, or how the beta values are interpolated between the given 'beta_range'.
    Default: "geometric"

  • Name
    initial_states_generator
    Type
    Literal["none", "tile", "random"]
    Description

    Defines the expansion of initial_states if fewer than num_reads are specified: 'none:' if the number of initial states specified is smaller than num_reads, raises an error. 'tile': reuses the specified initial states if fewer than num_reads or truncates if greater. 'random': expands the specified initial states with randomly generated states if fewer than num_reads or truncates if greater.
    Default: "random"

Decomposer
  • Name
    size
    Type
    int
    Description

    Nominal number of variables in the subproblem. Actual subproblem can be smaller, depending on other parameters (e.g. min_gain).
    Default: 10

  • Name
    min_gain
    Type
    float | None
    Description

    Minimum reduction required to BQM energy, given the current sample. A variable is included in the subproblem only if inverting its sample value reduces energy by at least this amount.
    Default: None

  • Name
    rolling
    Type
    bool
    Description

    If True, successive calls for the same problem (with possibly different samples) produce subproblems on different variables, selected by rolling down the list of all variables sorted by decreasing impact.
    Default: True

  • Name
    rolling_history
    Type
    float
    Description

    Fraction of the problem size, as a float in range 0.0 to 1.0, that should participate in the rolling selection. Once reached, subproblem unrolling is reset. Min: 0.0, Max: 1.0
    Default: 1.0

  • Name
    silent_rewind
    Type
    bool
    Description

    If False, raises :exc:EndOfStream when resetting/rewinding the subproblem generator upon the reset condition for unrolling.
    Default: True

  • Name
    traversal
    Type
    Literal["energy", "bfs", "pfs"]
    Description

    Traversal algorithm used to pick a subproblem of size variables. Options are: energy: Use the next size variables in the list of variables ordered by descending energy impact. bfs: Breadth-first traversal seeded by the next variable in the energy impact list. pfs: Priority-first traversal seeded by variables from the energy impact list, proceeding with the variable on the search boundary that has the highest energy impact.
    Default: "energy"

Qpu
  • Name
    num_reads
    Type
    int
    Description

    Number of states (output solutions) to read from the sampler.
    Default: 100

  • Name
    num_retries
    Type
    int
    Description

    Number of times the sampler will retry to embed if a failure occurs.
    Default: 0

  • Name
    sampling_params
    Type
    SamplingParams
    Description

    Sampling parameters for the QPU. See https://docs.dwavesys.com/docs/latest/c_solver_parameters.html#anneal-offsets for more details
    Default: SamplingParams(anneal_offsets=None, anneal_schedule=None, annealing_time=None, auto_scale=None, fast_anneal=False, flux_biases=None, flux_drift_compensation=True, h_gain_schedule=None, initial_state=None, max_answers=None, num_reads=1, programming_thermalization=None, readout_thermalization=None, reduce_intersample_correlation=False, reinitialize_state=None)

  • Name
    auto_embedding_params
    Type
    AutoEmbeddingParams
    Description

    Auto embedding parameters for the QPU. See https://docs.ocean.dwavesys.com/projects/system/en/stable/reference/generated/minorminer.find_embedding.html for more details.
    Default: AutoEmbeddingParams(embedding_parameters=EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=()))

Loop
  • Name
    max_iter
    Type
    int | None
    Description

    Maximum number of iterations.
    Default: 100

  • Name
    max_time
    Type
    int
    Description

    Time in seconds after which the algorithm will stop.
    Default: 5

  • Name
    convergence
    Type
    int
    Description

    Number of iterations with unchanged output to terminate algorithm.
    Default: 3

  • Name
    target
    Type
    float | None
    Description

    Energy level that the algorithm tries to reach.
    Default: None

  • Name
    rtol
    Type
    float
    Description

    Relative tolerance for convergence.
    Default: 1e-05

  • Name
    atol
    Type
    float
    Description

    Absolute tolerance for convergence.
    Default: 1e-08

SamplingParams
  • Name
    anneal_offsets
    Type
    Any | None
    Description

    Anneal offsets for the sampling.
    Default: None

  • Name
    anneal_schedule
    Type
    Any | None
    Description

    Anneal schedule for the sampling.
    Default: None

  • Name
    annealing_time
    Type
    Any | None
    Description

    Annealing time for the sampling.
    Default: None

  • Name
    auto_scale
    Type
    Any | None
    Description

    Whether to auto scale for the sampling.
    Default: None

  • Name
    fast_anneal
    Type
    bool
    Description

    Use the fast-anneal protocol instead of the standard anneal.
    Default: False

  • Name
    flux_biases
    Type
    Any | None
    Description

    Flux biases for the sampling.
    Default: None

  • Name
    flux_drift_compensation
    Type
    bool
    Description

    Whether to use flux drift compensation for the sampling.
    Default: True

  • Name
    h_gain_schedule
    Type
    Any | None
    Description

    H gain schedule for the sampling.
    Default: None

  • Name
    initial_state
    Type
    Any | None
    Description

    Initial state for the sampling.
    Default: None

  • Name
    max_answers
    Type
    int | None
    Description

    Maximum number of answers for the sampling. Min: 1
    Default: None

  • Name
    num_reads
    Type
    int
    Description

    Number of reads for the sampling. Min: 1
    Default: 1

  • Name
    programming_thermalization
    Type
    float | None
    Description

    Programming thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    readout_thermalization
    Type
    float | None
    Description

    Readout thermalization for the sampling. Has to be positive.
    Default: None

  • Name
    reduce_intersample_correlation
    Type
    bool
    Description

    Whether to reduce intersample correlation for the sampling.
    Default: False

  • Name
    reinitialize_state
    Type
    bool | None
    Description

    Whether to reinitialize state for the sampling. Should be None if initial_state is None.
    Default: None

AutoEmbeddingParams
  • Name
    embedding_parameters
    Type
    EmbeddingParameters
    Description

    Embedding parameters for the auto embedding.
    Default: EmbeddingParameters(max_no_improvement=10, random_seed=None, timeout=1000, max_beta=None, tries=10, inner_rounds=None, chainlength_patience=10, max_fill=None, threads=1, return_overlap=False, skip_initialization=False, initial_chains=(), fixed_chains=(), restrict_chains=(), suspend_chains=())

EmbeddingParameters
  • Name
    max_no_improvement
    Type
    int
    Description

    Maximum number of failed iterations to improve the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    random_seed
    Type
    int | None
    Description

    Seed for the random number generator. If None, seed is set by os.urandom().
    Default: None

  • Name
    timeout
    Type
    int
    Description

    Algorithm gives up after timeout seconds.
    Default: 1000

  • Name
    max_beta
    Type
    float | None
    Description

    Qubits are assigned weight according to a formula (beta^n) where n is the number of chains containing that qubit. This value should never be less than or equal to 1. If None, max_beta is effectively infinite.
    Default: None

  • Name
    tries
    Type
    int
    Description

    Number of restart attempts before the algorithm stops. On D-WAVE 2000Q, a typical restart takes between 1 and 60 seconds.
    Default: 10

  • Name
    inner_rounds
    Type
    int | None
    Description

    The algorithm takes at most this many iterations between restart attempts; restart attempts are typically terminated due to max_no_improvement. If None, inner_rounds is effectively infinite.
    Default: None

  • Name
    chainlength_patience
    Type
    int
    Description

    Maximum number of failed iterations to improve chain lengths in the current solution, where each iteration attempts to find an embedding for each variable of S such that it is adjacent to all its neighbours.
    Default: 10

  • Name
    max_fill
    Type
    int | None
    Description

    Restricts the number of chains that can simultaneously incorporate the same qubit during the search. Values above 63 are treated as 63. If None, max_fill is effectively infinite.
    Default: None

  • Name
    threads
    Type
    int
    Description

    Maximum number of threads to use. Note that the parallelization is only advantageous where the expected degree of variables is significantly greater than the number of threads. Min: 1.
    Default: 1

  • Name
    return_overlap
    Type
    bool
    Description

    This function returns an embedding, regardless of whether or not qubits are used by multiple variables. return_overlap determines the function's return value. If True, a 2-tuple is returned, in which the first element is the embedding and the second element is a bool representing the embedding validity. If False, only an embedding is returned.
    Default: False

  • Name
    skip_initialization
    Type
    bool
    Description

    Skip the initialization pass. Note that this only works if the chains passed in through initial_chains and fixed_chains are semi-valid. A semi-valid embedding is a collection of chains such that every adjacent pair of variables (u,v) has a coupler (p,q) in the hardware graph where p is in chain(u) and q is in chain(v). This can be used on a valid embedding to immediately skip to the chain length improvement phase. Another good source of semi-valid embeddings is the output of this function with the return_overlap parameter enabled.
    Default: False

  • Name
    initial_chains
    Type
    Any
    Description

    Initial chains inserted into an embedding before fixed_chains are placed, which occurs before the initialization pass. These can be used to restart the algorithm in a similar state to a previous embedding; for example, to improve chain length of a valid embedding or to reduce overlap in a semi-valid embedding (see skip_initialization) previously returned by the algorithm. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    fixed_chains
    Type
    Any
    Description

    Fixed chains inserted into an embedding before the initialization pass. As the algorithm proceeds, these chains are not allowed to change, and the qubits used by these chains are not used by other chains. Missing or empty entries are ignored. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    restrict_chains
    Type
    Any
    Description

    Throughout the algorithm, it is guaranteed that chain[i] is a subset of restrict_chains[i] for each i, except those with missing or empty entries. Each value in the dictionary is a list of qubit labels.
    Default: ()

  • Name
    suspend_chains
    Type
    Any
    Description

    This is a metafeature that is only implemented in the Python interface. suspend_chains[i] is an iterable of iterables; for example, suspend_chains[i] = [blob_1, blob_2], with each blob_j an iterable of target node labels. This enforces the following: for each suspended variable i, for each blob_j in the suspension of i, at least one qubit from blob_j will be contained in the chain for iminorminer accomplishes this through the following problem transformation for each iterable blob_j in suspend_chains[i], Add an auxiliary node Zij to both source and target graphs Set fixed_chains[Zij] = [Zij] Add the edge (i,Zij) to the source graph Add the edges (q,Zij) to the target graph for each q in blob_j
    Default: ()

Was this page helpful?