AnswerBun.com

How to measure a quantum circuit's execution time on a real IBM device?

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.

One Answer

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

Add your own answers!

Related Questions

How do I “add” two qubit states?

1  Asked on August 20, 2021 by visipi

   

How to remove ancilla bits from results?

1  Asked on August 20, 2021 by requiem

 

What is the implication of locality in QAOA?

1  Asked on August 20, 2021

   

Frequency collision and crosstalk error

0  Asked on August 20, 2021 by peachnuts

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP