2
$\begingroup$

The IBMQ web interface shows both queue position and an approximate execution time for every pending job (see image below). Is there a way to retrieve this information via Qiskit? I know that qiskit.providers.ibmq.job.IBMQJob has a queue_position() method, but what about the approximate execution time?

Thanks in advance!

IBMQ Job table

$\endgroup$
2
$\begingroup$

If you're looking for the actual time spent on the device, time_taken mentioned by @KAJ226b is the right attribute.

If you're looking for the estimated job completion time, you can use the queue_info() method of IBMQJob. It gives you the estimated start/completion time, job priority, and queue position (if available).

$\endgroup$
1
  • $\begingroup$ QueueInfo.estimated_start_time is exactly what I was looking for. Perfect, thanks! $\endgroup$ – smuecke Jun 2 at 5:51
1
$\begingroup$

This should work:

backend=provider.get_backend('The backend that you used') #Example: 'ibmq_santiago' 
job = backend.retrieve_job('Put your JOB ID here') #You can get this on the ibmq web interface 
job_result = job.result()
job_approx_execution_time = job_result.time_taken 

Note for the Job ID, you can see and copy it from the ibmq web interface: enter image description here

Also make sure you use the same provider to extract your backend. This shouldn't be a problem if you only have one provider which is the case for most people. But there are cases where you have different providers, which essentially allocate the different machines you can use.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.