Print command for output from Advantage 6.1
I am executing an optimization problem on Advantage 6.1. My print statement at the end of my Script is
for sample, energy, num_occurrences, chain_break_fraction in response.data():
print(sample, "Energy: ", energy, "Occurrences: ", num_occurrences, "Chain Break Fraction: ", chain_break_fraction)
The output seems to be all solutions. How can the print command be modified to print only the minimum energy solutions?
Comments
Hi Richard,
response.first, will print everything for the lowest energy sample,response.first.energywill print just the energy.response.first.energymay be the field you are looking for.For more information, please look at: dimod.SampleSet.first — Ocean Documentation 6.2.0 documentation (dwavesys.com)
Best Regards,
Tanjid
Please sign in to leave a comment.