Skip to main contentIBM Quantum Documentation

PrimitiveJob

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

GitHub(opens in a new tab)

Bases: BasePrimitiveJob[ResultT, JobStatus]

Primitive job class for the reference implementations of Primitives.

Parameters

function – A callable function to execute the job.


Methods

cancel

cancel()

GitHub(opens in a new tab)

Attempt to cancel the job.

cancelled

cancelled()

GitHub(opens in a new tab)

Return whether the job has been cancelled.

Return type

bool(opens in a new tab)

done

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

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

result()

GitHub(opens in a new tab)

Return the results of the job.

Return type

ResultT

running

running()

GitHub(opens in a new tab)

Return whether the job is actively running.

Return type

bool(opens in a new tab)

status

status()

GitHub(opens in a new tab)

Return the status of the job.

Return type

JobStatus

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