AerJobSet

class AerJobSet(backend, job_id, fn, experiments: List[QasmQobj], executor=None)[source]

A set of AerJob classes for Qiskit Aer simulators.

An instance of this class is returned when you submit experiments with executor option. It provides methods that allow you to interact with the jobs as a single entity. For example, you can retrieve the results for all of the jobs using result() and cancel all jobs using cancel().

AerJobSet constructor.

Parameters:
  • backend (Aerbackend) – Aerbackend.

  • job_id (int) – Job Id.

  • fn (function) – a callable function to execute qobj on backend. This should usually be a bound AerBackend._run() method, with the signature (qobj: QasmQobj, job_id: str) -> Result.

  • experiments (List[QasmQobj]) – List[QasmQobjs] to execute.

  • executor (ThreadPoolExecutor or dask.distributed.client) – The executor to be used to submit the job.

Attributes

AerJobSet.version

Methods

AerJobSet.backend()

Return the backend where this job was executed.

AerJobSet.cancel()

Cancel all jobs in this job set.

AerJobSet.cancelled()

Return whether the job has been cancelled.

AerJobSet.done()

Return whether the job has successfully run.

AerJobSet.executor()

Return the executor for this job

AerJobSet.in_final_state()

Return whether the job is in a final job state such as DONE or ERROR.

AerJobSet.job(experiment)

Retrieve the job used to submit the specified experiment and its index.

AerJobSet.job_id()

Return a unique id identifying the job.

AerJobSet.result([timeout])

Return the results of the jobs as a single Result object.

AerJobSet.running()

Return whether the job is actively running.

AerJobSet.status(worker)

Return the status of each job in this set.

AerJobSet.submit()

Execute this set of jobs on an executor.

AerJobSet.wait_for_final_state([timeout, ...])

Poll the job status until it progresses to a final state such as DONE or ERROR.

AerJobSet.worker(experiment)

Retrieve the index of job.

AerJobSet.worker_job(worker)

Retrieve the job specified with job's id

AerJobSet.worker_results(worker[, timeout])

Return the result of the jobs specified with worker_id.