dwavesystems / dwavesystems/dimod
Remove (or de-emphasize) `dimod.reference` samplers
- Dominant language
- Python
- Stars
- 143
- Forks
- 91
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 3
Description
It's misleading/confusing to provide simulated annealing sampler (and exact solver) as part of `dimod` library. The problem is not just in code organization, but the fact the `dimod.reference.SimulatedAnnealingSampler` is a paedagogical, Python (slow) implementation of SA. Users are much better off using the optimized C++ version available in `dwave-neal` package.
Since `dimod.reference.SimulatedAnnealingSampler` is promoted in documentation and training materials, users (even library creators) are starting to use it for wrong use cases (e.g. see [`pyqubo.utils.solve_qubo()`](https://github.com/recruit-communications/pyqubo/blob/425c4ae21f5b91dbd6a656d56a3f6104448518c6/pyqubo/utils/solver.py#L36)).
Since `dimod.reference.*` samplers demonstrate **how to write a custom sampler**, target audience, supposedly, are developers. Therefore, better location for them is out of `dimod` namespace, probably in level with `tests`. They can still be documented (included in main docs), just as long they are un-importable.
The location (namespace) for samplers is TBD, but to prevent compatibility breaking, we might (transitionally) import `neal.SimulatedAnnealingSampler` in `dimod`.
Contributor guide
Assessment
This issue has not been assessed yet.