simplify¶
- simplify(operator, *, atol=None, rtol=None)[source]¶
Simplifies the provided Pauli operator.
This is an adaption of
SparsePauliOp.simplify()
which tracks metadata of the simplified terms.- Parameters:
operator (SparsePauliOp) – the
SparsePauliOp
to simplify.atol (float | None) – the absolute tolerance for checking if coefficients are zero. If
None
, this will fallback to usingSparsePauliOp.atol
.rtol (float | None) – the relative tolerance for checking if coefficients are zero. If
None
, this will fallback to usingSparsePauliOp.rtol
.
- Returns:
The simplified Pauli operator.
- Return type: