# How can we get execution time of each annealing while using Neal Simulated Annealing Sampler?

I need to calculate the TTS or Total Time to Solution for the solutions generated using Neal Simulated Annealing Sampler. For the same, I need TAU or annealing time for each annealing cycle. Please help.

## Comments

Sukhraan S(Report)Hi Deepak,

Apologies for the delayed response!

The neal.SimulatedAnnealingSampler utilizes a classical heuristic simulated annealing algorithm that runs locally on your system. It solves problems in a fundamentally different way than Quantum annealing (please refer here for more details).

That being said, to fetch the above-requested values, here are the key steps you can perform. Please note, the values you’ll get are machine-dependent, and parameters (such as num_reads, num_sweeps) should be properly tuned to get the correct statistics and error bars:

`beta_range`

) of SA, from the`beta_range =`

`response.info`

`['beta_range']`

and keep them fixed over the entire study: every time you call the`sample`

method, just pass the`beta_range`

argument. This is to avoid “wasting time” resetting them every time.`num_reads`

e.g. 1000, divided by`num_reads`

.`num_sweeps`

you set) and how well SA performs. As an example, for 10 sweeps SA will be very fast but it may not reach optimality, whereas for many, say 100000 sweeps, SA will be slow but it will often get the ground state.`num_sweeps`

on the x-axis and TTS on the y-axis, you would expect a convex function (as shown in the research paper linked below).Page 13 of the research paper ‘Defining and detecting quantum speedup’, by Troels R., Zhihui W., Joshua J., Sergio B., Sergei I., David W., John M., Daniel L., Matthias T. (2014), explains each of the above steps in more detail.

I hope this helps! Please let us know if you have any other questions.

Please sign in to leave a comment.