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
87 stars 61 forks source link

Exact-solve for ground state in `MockDWaveSampler` on small problems #476

Closed randomir closed 1 year ago

randomir commented 1 year ago

By default, problems of size 16 and smaller will be sampled with greedy sampler and then an ExactSolver-determined ground state will be injected.

Implements a suggestion from https://github.com/dwavesystems/dwave-system/issues/474#issuecomment-1291026958.

Close #474.

randomir commented 1 year ago

Thanks @jackraymond, I updated the docstring as suggested, except that I kept a reference to ExactSolver (IMO, it's important for users to understand why and how slow this can get), and I did not impose an upper bound on the cutoff (the default is fine, and if someone decides to modify it, they should read the docs and understand the consequences - which are now much clearer, I think, thanks to your suggestions).