dwave-system icon indicating copy to clipboard operation
dwave-system copied to clipboard

Add warning generators

Open randomir opened this issue 5 years ago • 9 comments

Add generators of EnergyScaleWarning, TooManySamplesWarning and TooFewSamplesWarning warnings.

randomir avatar Jan 22 '20 12:01 randomir

I am a bit worried about providing TooManySamplesWarning. without knowing the ground states of a problem creating a warning about drawing too many samples is not a great idea.

What if the first excited state is highly degenerate and you need a billion samples to see the ground state? - regardless of how we implement this specific Warning, it will throw an error for this specific example which is extremely misleading.

conta877 avatar Feb 03 '20 18:02 conta877

There is a case to be made that that's a very poor QPU problem, though I agree distinguishing that case will be very difficult.

arcondello avatar Feb 03 '20 18:02 arcondello

I disagree with that comment. It may simply be a hard problem with a hard landscape that other heuristics will fail too (possibly worse than the QPU).

conta877 avatar Feb 03 '20 18:02 conta877

Fair enough, and it is definitely true that there will be many heuristics worse than the QPU at that problem. In any case, there is no way (that I know of) to detect that case, so maybe better to leave "too many samples" as a research topic.

arcondello avatar Feb 03 '20 19:02 arcondello

#255 adds EnergyScaleWarning and ChainStrengthWarning

arcondello avatar Feb 04 '20 02:02 arcondello

do you want me to wait for this to be merged before adding TooFewSamplesWarning

conta877 avatar Feb 05 '20 22:02 conta877

#255 has now been merged

arcondello avatar Feb 05 '20 23:02 arcondello

so another question, the samples related warnings are applicable to classical solvers as well... you think they belong to dwave.system or dimod

conta877 avatar Feb 05 '20 23:02 conta877

Let's keep them in dwave-system for now

arcondello avatar Feb 05 '20 23:02 arcondello