You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecating the use of a list for h in sample_ising (altogether or just for DWaveSampler?) Con: may still be value in allowing it from memory efficiency perspective.
Propagate a warning
Raise an exception. This would be more consistent with the behavior when h is a dict, and it matches the docstring of the original behavior.
Original docstring:
*h* --- List or tuple of the linear Ising coefficients. The
:math:`h` value of a non-working qubit must be zero or an
exception will be raised. Inactive qubits are disabled during
annealing and cannot distinguish their states.
For example, using a structured sampler where qubit 0 is not available, the following silently drops the variable and produces an empty sampleset:
whereas using a dict for h that includes an invalid qubit (or as part of J) will raise an error:
Documentation for the base class method is:
https://github.com/dwavesystems/dimod/blob/25065ad8d30154098f55d827022b815421822864/dimod/core/sampler.py#L200-L205
Possibilities for addressing this include:
h
insample_ising
(altogether or just forDWaveSampler
?) Con: may still be value in allowing it from memory efficiency perspective.h
is a dict, and it matches the docstring of the original behavior.Original docstring:
Relevant code in
DWaveSampler
:dwave-system/dwave/system/samplers/dwave_sampler.py
Lines 365 to 375 in bedfe51
The text was updated successfully, but these errors were encountered: