IBMQJob.wait_for_final_state¶
- IBMQJob.wait_for_final_state(timeout=None, wait=None, callback=None)[source]¶
Wait until the job progresses to a final state such as
DONE
orERROR
.- Parameters
timeout (
Optional
[float
]) – Seconds to wait for the job. IfNone
, wait indefinitely.wait (
Optional
[float
]) – Seconds to wait between invoking the callback function. IfNone
, the callback function is invoked only if job status or queue position has changed.callback (
Optional
[Callable
]) –Callback function invoked after each querying iteration. The following positional arguments are provided to the callback function:
job_id: Job ID
job_status: Status of the job from the last query.
job: This
IBMQJob
instance.
In addition, the following keyword arguments are also provided:
- Raises
IBMQJobTimeoutError – if the job does not reach a final state before the specified timeout.
- Return type
None