---
title: SliceMetadata (latest version)
description: API reference for qiskit_addon_obp.utils.metadata.SliceMetadata in the latest version of qiskit-addon-obp
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit-addon-obp/utils-metadata-slice-metadata
---

# SliceMetadata

*class* `SliceMetadata(slice_errors, raw_num_paulis, num_unique_paulis, num_duplicate_paulis, num_trimmed_paulis, sum_trimmed_coeffs, num_truncated_paulis, num_paulis, sum_paulis, num_qwc_groups)`

[GitHub](https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/metadata.py#L25-L90)

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

A container for metadata generated during the backpropagation of a single slice.

## Attributes

**Parameters**

- **slice\_errors** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*]*)
- **raw\_num\_paulis** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*)
- **num\_unique\_paulis** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **num\_duplicate\_paulis** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **num\_trimmed\_paulis** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **sum\_trimmed\_coeffs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*] | None*)
- **num\_truncated\_paulis** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*)
- **num\_paulis** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*)
- **sum\_paulis** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*)
- **num\_qwc\_groups** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*)

### slice\_errors

Type: `list[float]`

The truncation error incurred for each observable that is being backpropagated.

### raw\_num\_paulis

Type: `list[int]`

The “raw” number of Pauli terms for each observable that is being backpropagated. This indicates the number of Pauli terms before any simplification or truncation operations.

### num\_unique\_paulis

Type: `list[int] | None`

The number of unique Pauli terms for each observable. This attribute only tracks those Pauli terms whose coefficients were not already below the trimming threshold at the beginning of the operator simplification procedure.

> **Note**
>
> This value will be `None` if `simplify=False` during the backpropagation.

### num\_duplicate\_paulis

Type: `list[int] | None`

The number of duplicate Pauli terms for each observable whose coefficients have been summed up to trim excess memory usage during the operator simplification.

> **Note**
>
> This value will be `None` if `simplify=False` during the backpropagation.

### num\_trimmed\_paulis

Type: `list[int] | None`

The number of Pauli terms for each observable that were trimmed during operator simplification because their total coefficient was below the trimming threshold.

> **Note**
>
> This value will be `None` if `simplify=False` during the backpropagation.

### sum\_trimmed\_coeffs

Type: `list[float] | None`

The sum of the coefficients for each observable that were trimmed during operator simplification because each individual coefficient was below the trimming threshold.

> **Warning**
>
> This sum is *not* affected by the value of [`p_norm`](/docs/api/qiskit-addon-obp/utils-truncating#p_norm "qiskit_addon_obp.utils.truncating.TruncationErrorBudget.p_norm")!

> **Note**
>
> This value will be `None` if `simplify=False` during the backpropagation.

### num\_truncated\_paulis

Type: `list[int]`

The number of Pauli terms which were truncated from each observable that is being backpropagated.

### num\_paulis

Type: `list[int]`

The number of Pauli terms for each observable that is being backpropagated.

### sum\_paulis

Type: `int | None`

The number of Pauli terms across all observables. This value is `None` if it is not bounded during the backpropagation.

> **Note**
>
> This value can differ from `sum(num_paulis)` because identical Pauli terms will not be counted multiple times.

### num\_qwc\_groups

Type: `int | None`

The number of qubit-wise commuting groups of Pauli terms across all observables. This value is `None` if it is not bounded during the backpropagation.
