Skip to main content
IBM Quantum Platform
This page is from the dev version of Qiskit SDK. Go to the stable version.

PrimitiveJob

class qiskit.primitives.PrimitiveJob(function, *args, **kwargs)

GitHub

Bases: BasePrimitiveJob[ResultT, JobStatus]

Handle to a job from the reference implementations of the primitives in Qiskit.

This is a concrete implementation of the BasePrimitiveJob interface. See the documentation of that class for a discussion of the interface.

Primitives implementers looking to create their own job classes should not subclass this, but instead subclass the interface definition BasePrimitiveJob.

Parameters

function – A callable function to execute the job.


Methods

cancel

cancel()

GitHub

Attempt to cancel the job.

cancelled

cancelled()

GitHub

Return whether the job has been cancelled.

Return type

bool

done

done()

GitHub

Return whether the job has successfully run.

Return type

bool

in_final_state

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

result()

GitHub

Return the results of the job.

Return type

ResultT

running

running()

GitHub

Return whether the job is actively running.

Return type

bool

status

status()

GitHub

Return the status of the job.

Return type

JobStatus

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