---
title: PrimitiveJob (v2.1)
description: API reference for qiskit.primitives.PrimitiveJob in qiskit v2.1
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/2.1/qiskit.primitives.PrimitiveJob
---

# PrimitiveJob

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

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

Bases: [`BasePrimitiveJob`](/docs/api/qiskit/2.1/qiskit.primitives.BasePrimitiveJob "qiskit.primitives.base.base_primitive_job.BasePrimitiveJob")\[`ResultT`, [`JobStatus`](/docs/api/qiskit/2.1/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/2.1/qiskit/primitives/primitive_job.py#L86-L88)

Attempt to cancel the job.

### cancelled

`cancelled()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.1/qiskit/primitives/primitive_job.py#L96-L97)

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/2.1/qiskit/primitives/primitive_job.py#L90-L91)

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/2.1/qiskit/primitives/primitive_job.py#L99-L100)

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/2.1/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/2.1/qiskit/primitives/primitive_job.py#L62-L66)

Return the results of the job.

**Return type**

*ResultT*

### running

`running()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.1/qiskit/primitives/primitive_job.py#L93-L94)

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/2.1/qiskit/primitives/primitive_job.py#L68-L80)

Return the status of the job.

**Return type**

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