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

# BasePrimitiveJob

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

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

Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC), [`Generic`](https://docs.python.org/3/library/typing.html#typing.Generic)\[`ResultT`, `StatusT`]

Primitive job abstract base class.

Initializes the primitive job.

**Parameters**

- **job\_id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – 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](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/primitives/base/base_primitive_job.py#L75-L78)

Attempt to cancel the job.

### cancelled

*abstract* `cancelled()`

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

Return whether the job has been cancelled.

**Return type**

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

### done

*abstract* `done()`

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

Return whether the job has successfully run.

**Return type**

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

### in\_final\_state

*abstract* `in_final_state()`

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

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

*abstract* `result()`

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

Return the results of the job.

**Return type**

*ResultT*

### running

*abstract* `running()`

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

Return whether the job is actively running.

**Return type**

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

### status

*abstract* `status()`

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

Return the status of the job.

**Return type**

*StatusT*
