---
title: PrimitiveJob (v1.0)
description: API reference for qiskit.primitives.PrimitiveJob in qiskit v1.0
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit/1.0/qiskit.primitives.PrimitiveJob
---

# PrimitiveJob

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

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L25-L81)

Bases: [`BasePrimitiveJob`](/docs/api/qiskit/1.0/qiskit.primitives.BasePrimitiveJob "qiskit.primitives.base.base_primitive_job.BasePrimitiveJob")\[`ResultT`, [`JobStatus`](/docs/api/qiskit/1.0/qiskit.providers.JobStatus "qiskit.providers.jobstatus.JobStatus")]

Primitive job class for the reference implementations of Primitives.

**Parameters**

**function** – A callable function to execute the job.

## Methods

### cancel

`cancel()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L67-L69)

Attempt to cancel the job.

### cancelled

`cancelled()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L77-L78)

Return whether the job has been cancelled.

**Return type**

[bool](https://docs.python.org/3/library/functions.html#bool)

### done

`done()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L71-L72)

Return whether the job has successfully run.

**Return type**

[bool](https://docs.python.org/3/library/functions.html#bool)

### in\_final\_state

`in_final_state()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L80-L81)

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

**Return type**

[bool](https://docs.python.org/3/library/functions.html#bool)

### job\_id

`job_id()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/base/base_primitive_job.py#L39-L41)

Return a unique id identifying the job.

**Return type**

[str](https://docs.python.org/3/library/stdtypes.html#str)

### result

`result()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L49-L51)

Return the results of the job.

**Return type**

*ResultT*

### running

`running()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L74-L75)

Return whether the job is actively running.

**Return type**

[bool](https://docs.python.org/3/library/functions.html#bool)

### status

`status()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/primitive_job.py#L53-L61)

Return the status of the job.

**Return type**

[*JobStatus*](/docs/api/qiskit/1.0/qiskit.providers.JobStatus "qiskit.providers.jobstatus.JobStatus")
