Solver

A solver is a resource for solving problems.

Solvers are responsible for:

  • Encoding submitted problems
  • Checking submitted parameters
  • Decoding answers
  • Adding problems to a client’s submission queue

You can list all solvers available to a Client with its get_solvers() method and select and return one with its get_solver() method.

Class

Solver

alias of dwave.cloud.solver.StructuredSolver

class BaseSolver(client, data)[source]

Base class for a general D-Wave solver.

This class provides Ising, QUBO and BQM sampling methods and encapsulates the solver description returned from the D-Wave cloud API.

Parameters:
  • client (Client) – Client that manages access to this solver.
  • data (dict) – Data from the server describing this solver.

Examples

This example creates a client using the local system’s default D-Wave Cloud Client configuration file and checks the identity of its default solver.

>>> from dwave.cloud import Client
>>> with Client.from_config() as client:
...     solver = client.get_solver()
...     solver.id       # doctest: +SKIP
'EXAMPLE_2000Q_SYSTEM'
class StructuredSolver(*args, **kwargs)[source]

Class for D-Wave structured solvers.

This class provides Ising, QUBO and BQM sampling methods and encapsulates the solver description returned from the D-Wave cloud API.

Parameters:
  • client (Client) – Client that manages access to this solver.
  • data (dict) – Data from the server describing this solver.
UnstructuredSolver

alias of dwave.cloud.solver.BQMSolver

Methods

StructuredSolver.check_problem(linear, quadratic) Test if an Ising model matches the graph provided by the solver.
StructuredSolver.max_num_reads(**params) Returns the maximum number of reads for the given solver parameters.
StructuredSolver.sample_ising(linear, quadratic) Sample from the specified Ising model.
StructuredSolver.sample_qubo(qubo[, offset]) Sample from the specified QUBO.
StructuredSolver.sample_bqm(bqm, **params) Sample from the specified BQM.
UnstructuredSolver.sample_ising(linear, …) Sample from the specified Ising model.
UnstructuredSolver.sample_qubo(qubo[, offset]) Sample from the specified QUBO.
UnstructuredSolver.sample_bqm(bqm, **params) Sample from the specified BQM.
UnstructuredSolver.upload_bqm(bqm) Upload the specified BQM to SAPI, returning a Problem ID that can be used to submit the BQM to this solver (i.e.

Properties

BaseSolver.name Solver name/ID.
BaseSolver.avg_load Solver’s average load, at the time of description fetch.
BaseSolver.online Is this solver online (or offline)?
BaseSolver.qpu Is this a QPU-based solver?
BaseSolver.hybrid Is this a hybrid quantum-classical solver?
BaseSolver.software Is this a software-based solver?
StructuredSolver.num_active_qubits The number of active (encoding) qubits.
StructuredSolver.num_qubits Nominal number of qubits on chip (includes active AND inactive).
StructuredSolver.is_vfyc Is this a virtual full-yield chip?
StructuredSolver.has_flux_biases Solver supports/accepts flux_biases.
StructuredSolver.has_anneal_schedule Solver supports/accepts anneal_schedule.
StructuredSolver.lower_noise