-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dwave.system.temperatures.fast_effective_temperature
does not accept dwave.samplers.sa.SimulatedAnnealingSampler
#553
Comments
Note that this estimator calculates the temperature based on the rate of local excitations. By definition, an SA sampler yields a rate of excitations close to 1/beta_range[1], so this method is not required. fast_effective_temperature assumes that the sampler operates on a fixed size problem (sampler.nodelist), with an informative bounded range of linear biases (h_range). For a sampler like SA that is not constrained in this way you need to specify the problem (a bqm):
|
@jackraymond my comment just comes from a typing annotation perspective. Since the SA sampler is a |
This issue might be closed once #552 is merged in |
I'll make a correction as part of the pull request, thanks for following up and clarifying. Type restriction should be dimod.StructuredSolver based on my argument, but I'll probably add support for dimod.Sampler since its only a technicality that prevents this. |
Description
I'm trying to get the effective temperature using the
fast_effective_temperature
function on a simulated annealing sampler, but I'm getting the following error:To Reproduce
From the code it's clear that the
SimulatedAnnealingSampler
initialiser does not create a property/attribute callednodelist
.Expected behavior
If no structure is given to
SimulatedAnnealingSampler
when instiantiating it, i.e., no initialisation arguments are needed, I'd expect the temperature routine to fail. Maybe the temperature routine should not accept anydimod.Sampler
assampler
.The text was updated successfully, but these errors were encountered: