Quantum Computing Asked by Alfred on December 14, 2020
I am executing a quantum circuit on an IBM quantum device and I need to start a timer as soon as the job in the queue starts running. I have already used:
result = job.result()
execution_time = result.time_taken
but in this particular case what I need is more like a "signal", like a variable that is switched on as soon as the queue is over and causes the timer to start. I tried using the job status but it didn’t seem to work.
result.time_taken
is the execution time. There is also job.time_per_step()
that gives you the timestamps of each step of the job's life cycle.
If you're looking to set some variable locally in your program, the best you can do is probably use job status. job.wait_for_final_state()
supports a callback function that you can use to set the variable when status changes.
Answered by jyu00 on December 14, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP