---
title: get_annotation (latest version)
description: API reference for samplomatic.utils.get_annotation in the latest version of samplomatic
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/samplomatic/auto/utils-get-annotation
---

# get\_annotation

`samplomatic.utils.get_annotation(box: BoxOp, annotation_type: type[Annotation] | tuple[type[Annotation], ...]) → Annotation | None`

[GitHub](https://github.com/Qiskit/samplomatic/tree/main/samplomatic/utils/get_annotation.py#L18-L31)

Return a box’s first annotation of the given type(s).

**Parameters**

- **box** – The box to return the annotation for.
- **annotation\_type** – The type of the desired annotation.

**Returns**

The box’s first annotation of the given type(s), or `None` if it does not contain an annotation of the given type(s).
