Skip to main contentIBM Quantum Documentation

BasePrimitiveJob

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

GitHub(opens in a new tab)

Bases: ABC(opens in a new tab), Generic(opens in a new tab)[ResultT, StatusT]

Primitive job abstract base class.

Initializes the primitive job.

Parameters

  • job_id (str(opens in a new tab)) – 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(opens in a new tab)

Attempt to cancel the job.

cancelled

abstract cancelled()

GitHub(opens in a new tab)

Return whether the job has been cancelled.

Return type

bool(opens in a new tab)

done

abstract done()

GitHub(opens in a new tab)

Return whether the job has successfully run.

Return type

bool(opens in a new tab)

in_final_state

abstract in_final_state()

GitHub(opens in a new tab)

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

Return type

bool(opens in a new tab)

job_id

job_id()

GitHub(opens in a new tab)

Return a unique id identifying the job.

Return type

str(opens in a new tab)

result

abstract result()

GitHub(opens in a new tab)

Return the results of the job.

Return type

ResultT

running

abstract running()

GitHub(opens in a new tab)

Return whether the job is actively running.

Return type

bool(opens in a new tab)

status

abstract status()

GitHub(opens in a new tab)

Return the status of the job.

Return type

StatusT

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