dwave-system
dwave-system copied to clipboard
DWaveCliqueSampler should have solver property at top level
Description
DWaveCliqueSampler is not a composite with a child solver so I'd expect it to have a .solver.name property at top level analogous to DWaveSampler.:
>>> sampler_clique.solver.name
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-7-2f60abd45f90> in <module>
----> 1 sampler_clique.solver.name
AttributeError: 'DWaveCliqueSampler' object has no attribute 'solver'
To Reproduce See above.
Expected behavior
I think .solver.name should be copied to the top level.
Environment:
- OS: Win
- Python version: 3.7
Additional context You can do this:
>>> sampler_clique.child.solver.name
Out[8]: 'DW_2000Q_6'
That is an implementation detail of DWaveSampler, not at all guaranteed by the API. If we want to expose the solver name, I think we should implement a more general way.