Skip to main content
IBM Quantum Platform
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Warning

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

ManagedJob

class ManagedJob(start_index, experiments_count, job=None)

GitHub

Bases: object

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

Warning

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

cancel

ManagedJob.cancel()

Attempt to cancel the job.

Return type

None

Warning

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

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.

Warning

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

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.

Warning

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

result

ManagedJob.result(timeout=None, partial=False, refresh=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.
  • refresh (bool) – If True, re-query the server for the result. Otherwise return the cached value.

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.

Warning

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

status

ManagedJob.status()

Query the server for job status.

Return type

Optional[JobStatus]

Returns

Current job status, or None if an error occurred.

Warning

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

submit

ManagedJob.submit(circuits, job_name, backend, executor, submit_lock, job_share_level=None, job_tags=None, **run_config)

Submit the job.

Parameters

  • circuits (Union[QuantumCircuit, Schedule, List[Union[QuantumCircuit, Schedule]]]) – Circuits 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 (Optional[ApiJobShareLevel]) – Job share level.
  • job_tags (Optional[List[str]]) – Tags to be assigned to the job.
  • **run_config – Extra arguments used to configure the run.

Return type

None

Was this page helpful?
Report a bug or request content on GitHub.