dwavesystems / dwave-samplers

Classical algorithms for solving binary quadratic models
Apache License 2.0
8 stars 12 forks source link

question about the optimization in simulated_annealing #50

Closed rookiebird closed 1 year ago

rookiebird commented 1 year ago

May I ask what optimization method is used in the simulated_annealing method? As far as I know, the simulated annealing algorithm should randomly add disturbance to the current solution to generate a new solution. I set num_reads=1 and nun_sweeps=1. So only one sample should be randomly generated and a simulated annealing should be performed. In theory, the solution of this simulated annealing should be relatively poor, because the solution is randomly generated. But it seems that the effect is still very good. This seems to be quite different from the principle of the simulated annealing algorithm I understand.

arcondello commented 1 year ago

Hi @rookiebird , generally these sorts of questions will be answered better and more quickly in our community.

That said, each sweep passes over all of the variables once. So each variable has a chance to flip, with acceptance according to the current temperature.

arcondello commented 1 year ago

You can see the sweep loop here.

rookiebird commented 1 year ago

@arcondello Thank you very much, if there are still questions later, I will ask the question in the community. 😁