DNX Maximum independent set (python) - time of computation
Hi,
I am running dnx.maximum_independent_set with sampler=LeapHybridSampler() for different graphs and wanted to know, how to retrieve the qpu time for each of the computations (to see how the performance actually scales with increasing the number of nodes).
Any ideas how to do it?
the code: result = dnx.maximum_independent_set(G, sampler=my_sampler) only returns a list object with no info on the qpu time.
Thank you in advance!
Comments
Aleksander,
The list object is the return object when calling maximum_independent_set. (See https://docs.ocean.dwavesys.com/en/stable/docs_dnx/reference/algorithms/generated/dwave_networkx.maximum_independent_set.html
It does seem odd that it does not return the usual timing info and that there is not an apparent alternative way to get it programmatically.
As a work around, the timing info can be seen by going to the Leap Dashboard and reviewing the recent problems.
Ed
Hi Aleksander,
Apologies for the delay!
For the above use case, you can retrieve the timing information by using dimod.TrackingComposite. This composite tracks input and output of the child sampler(LeapHybridSampler in this case).
Here is a code example:
sampler.output contains the returned sampleset and you can access the timing info using sampler.output.info
Please sign in to leave a comment.