dwavesystems / dwave-cloud-client

A minimal implementation of the REST interface used to communicate with D-Wave Solver API (SAPI) servers.
https://docs.ocean.dwavesys.com/projects/cloud-client/en/stable/
Apache License 2.0
59 stars 40 forks source link

`dwave sample --random-problem` fails for unstructured solvers #557

Closed randomir closed 1 year ago

randomir commented 1 year ago

When random problem is generated a structured solver is assumed.

If user selects an unstructured solver (like BQM/CQM solvers), or such solver gets selected for the user, problem generation will fail:

$ dwave sample --random-problem
Unhandled error: AttributeError("'BQMSolver' object has no attribute 'nodes'")

Mitigation

Select a structured solver (QPU) with:

$ dwave sample --random-problem --client qpu

or

$ dwave sample -r -s Advantage_system6.2

Fix

Adapt random problem generation to selected solver (similar to #332).

cc @davage