dwavesystems / dwave-system

An API for easily incorporating the D-Wave system as a sampler, either directly or through Leap's cloud-based hybrid samplers
https://docs.ocean.dwavesys.com/
Apache License 2.0
90 stars 65 forks source link

DWaveSampler.get_samplers or similar #311

Open arcondello opened 4 years ago

arcondello commented 4 years ago

Analogous to Client.get_solvers but at the DWaveSampler level. Something like

samplers = DWaveSampler(solver=dict(qpu=True)).get_samplers()

or possibly

sampler = DWaveSampler.get_samplers(qpu=True)

would only need to be a thin wrapper.

randomir commented 4 years ago

I suggest we: 1) wait for the lightweight client, 2) implement this as a utility function available as dwave.system.samplers.get_samplers() or similar.

Reasons: 1) prevent system resources depletion, 2) hierarchy; makes sense to scope "get all samplers" method in level with (or above) the individual samplers (analogously to Client/Solver).

Alternatively, we could implement some sort of DWaveSamplersFactory with the get_samplers method, but even if we decide for that in the future, having the utility form is still useful.

One quirk also worth mentioning here, however we proceed, is that the filtering language vocabulary of get_samplers will probably have to be extended to support sampler-level features (in addition to client/solver-low-level ones).

davidmerwin commented 2 years ago

Semper Fi