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[source]#
alias of
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 'Advantage_system4.1'
- 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.
Methods#
|
Test if an Ising model matches the graph provided by the solver. |
Estimates QPU access time for a submission to the selected solver. |
|
|
Returns the maximum number of reads for the given solver parameters. |
|
Reformat some solver parameters for SAPI. |
|
Sample from the specified BQM. |
|
Sample from the specified Ising model. |
|
Sample from the specified QUBO. |
|
Sample from the specified Ising model. |
|
Sample from the specified QUBO. |
|
Sample from the specified BQM. |
Upload the specified BQM to SAPI, returning a Problem ID that can be used to submit the BQM to this solver (i.e. call the |
|
|
Sample from the specified Ising model. |
|
Sample from the specified QUBO. |
|
Sample from the specified BQM. |
|
Upload the specified BQM to SAPI, returning a Problem ID that can be used to submit the BQM to this solver (i.e. call the |
|
Sample from the specified CQM. |
|
Upload the specified CQM to SAPI, returning a Problem ID that can be used to submit the CQM to this solver (i.e. call the .sample_cqm method). |
|
Sample from the specified DQM. |
|
Upload the specified DQM to SAPI, returning a Problem ID that can be used to submit the DQM to this solver (i.e. call the .sample_dqm method). |
Properties#
Solver name/ID. |
|
Solver's average load, at the time of description fetch. |
|
Is this solver online (or offline)? |
|
Is this a QPU-based solver? |
|
Is this a hybrid quantum-classical solver? |
|
Is this a software-based solver? |
|
The number of active (encoding) qubits. |
|
Nominal number of qubits on chip (includes active AND inactive). |
|
Is this a virtual full-yield chip? |
|
Solver supports/accepts |
|
Solver supports/accepts |
|