D-Wave Cloud Client
raw JSON → 0.14.4 verified Fri May 01 auth: no python
A minimal client for interacting with D-Wave cloud resources, including solvers (QPU and hybrid) via the D-Wave API. Current version 0.14.4, requires Python >=3.10. Release cadence is irregular, with several minor releases per year.
pip install dwave-cloud-client Common errors
error AttributeError: 'Solver' object has no attribute 'id' ↓
cause Upgraded to dwave-cloud-client 0.14.0+ which changes solver identification from string `id` to dict `identity`.
fix
Use
solver.identity instead of solver.id, or check solver.name for hybrid solvers. error dwave.cloud.exceptions.ConfigFileError: Config file 'dwave.conf' not found or invalid ↓
cause Missing or malformed D-Wave configuration file or environment variables.
fix
Set
DWAVE_API_TOKEN environment variable or create a valid dwave.conf file. See https://docs.dwavesys.com/docs/latest/doc_getting_started.html. error requests.exceptions.ConnectionError: HTTPSConnectionPool(host='cloud.dwavesys.com', port=443): Max retries exceeded ↓
cause Network issues or D-Wave API endpoint unreachable.
fix
Check internet connectivity and firewall settings. Ensure the API endpoint URL is correct (default is https://cloud.dwavesys.com/sapi).
Warnings
breaking In version 0.14.0, solver identification changed from a unique string `id` to a dictionary `identity` with `name` and `graph_id`. Code that relies on `solver.id` as a string will break. ↓
fix Use `solver.identity` (a dict) or `solver.name` for hybrid solvers. For QPU solvers, use `solver.graph_id` for unique identification.
deprecated `Solver.is_vfyc` property is deprecated since dwave-cloud-client 0.14.1 and will be removed in a future version. ↓
fix Use `'qubit' in solver.properties.get('category', '')` or check solver category via the solver's `properties` dict.
gotcha Client closes resources on exit. Using `Client` outside a context manager and not calling `.close()` may leak connections or fail on garbage collection. ↓
fix Always use `with Client(...) as client:` or call `client.close()` when done.
Imports
- Client
from dwave.cloud import Client - SolverApiClient
from dwave.cloud.api.client import SolverAPIClient
Quickstart
from dwave.cloud import Client
# Replace with your D-Wave API token or set DWAVE_API_TOKEN env var
token = os.environ.get('DWAVE_API_TOKEN', '')
with Client(token=token) as client:
solvers = client.get_solvers()
for solver in solvers:
print(solver.id, solver.name)