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 usingcancel()
.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
Methods
Return the backend where this job was executed.
Cancel all jobs in this job set.
Return whether the job has been cancelled.
Return whether the job has successfully run.
Return the executor for this job
Return whether the job is in a final job state such as
DONE
orERROR
.AerJobSet.job
(experiment)Retrieve the job used to submit the specified experiment and its index.
Return a unique id identifying the job.
AerJobSet.result
([timeout])Return the results of the jobs as a single Result object.
Return whether the job is actively running.
AerJobSet.status
(worker)Return the status of each job in this set.
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
orERROR
.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.