Skip to main contentIBM Quantum Documentation
This page is from the dev version of Qiskit SDK. Go to the stable version

BasePrimitiveJob

class qiskit.primitives.BasePrimitiveJob(job_id, **kwargs)

GitHub

Bases: ABC, Generic[ResultT, StatusT]

Primitive job abstract base class.

Initializes the primitive job.

Parameters

  • job_id (str) – A unique id in the context of the primitive used to run the job.
  • kwargs – Any key value metadata to associate with this job.

Methods

cancel

abstract cancel()

GitHub

Attempt to cancel the job.

cancelled

abstract cancelled()

GitHub

Return whether the job has been cancelled.

Return type

bool

done

abstract done()

GitHub

Return whether the job has successfully run.

Return type

bool

in_final_state

abstract in_final_state()

GitHub

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

Return type

bool

job_id

job_id()

GitHub

Return a unique id identifying the job.

Return type

str

result

abstract result()

GitHub

Return the results of the job.

Return type

ResultT

running

abstract running()

GitHub

Return whether the job is actively running.

Return type

bool

status

abstract status()

GitHub

Return the status of the job.

Return type

StatusT

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