Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

ManagedJob

ManagedJob(start_index, experiments_count, job=None) GitHub(opens in a new tab)

Job managed by the Job Manager.

ManagedJob constructor.

Parameters

  • start_index (int) – Starting index of the experiment set.
  • experiments_count (int) – Number of experiments.
  • job (Optional[IBMQJob]) – Job to be managed, or None if not already known.

Methods

cancel

ManagedJob.cancel()

Attempt to cancel the job.

Return type

None

error_message

ManagedJob.error_message()

Provide details about the reason of failure.

Return type

Optional[str]

Returns

An error report if the job failed or None otherwise.

qobj

ManagedJob.qobj()

Return the Qobj for this job.

Return type

Union[QasmQobj, PulseQobj, None]

Returns

The Qobj for this job or None if the Qobj could not be retrieved.

result

ManagedJob.result(timeout=None, partial=False)

Return the result of the job.

Parameters

  • timeout (Optional[float]) – Number of seconds to wait for job.
  • partial (bool) – If True, attempt to retrieve partial job results.

Return type

Optional[Result]

Returns

Job result or None if result could not be retrieved.

Raises

IBMQJobTimeoutError – If the job does not return results before a specified timeout.

status

ManagedJob.status()

Query the server for job status.

Return type

Optional[JobStatus]

Returns

Current job status, or None if an error occurred.

submit

ManagedJob.submit(qobj, job_name, backend, executor, submit_lock, job_share_level, job_tags=None)

Submit the job.

Parameters

  • qobj (Union[QasmQobj, PulseQobj]) – Qobj to run.
  • job_name (str) – Name of the job.
  • backend (IBMQBackend) – Backend to execute the experiments on.
  • executor (ThreadPoolExecutor) – The thread pool used to submit the job.
  • submit_lock (allocate_lock) – Lock used to synchronize job submission.
  • job_share_level (ApiJobShareLevel) – Job share level.
  • job_tags (Optional[List[str]]) – Tags to be assigned to the job.

Return type

None

Was this page helpful?