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

# undress\_box

`samplomatic.utils.undress_box(box: BoxOp) → BoxOp`

[GitHub](https://github.com/Qiskit/samplomatic/tree/main/samplomatic/utils/undress_box.py#L24-L46)

Return a box equivalent to `box`, stripped of the single-qubit gates on the dressing side.

This function removes all the single-qubit gates that can be pushed to the side indicated by its dressing (left or right) without encountering any other operation. If the input box contains no `Twirl` annotation, an unmodified copy of it is returned.

The returned box owns a copy of all the annotations present in the given `box`.

**Parameters**

**box** – The box to remove the single-qubit gates from.
