diff --git a/src/qiskit_qec/operators/pauli.py b/src/qiskit_qec/operators/pauli.py index e6711524..93f4058e 100644 --- a/src/qiskit_qec/operators/pauli.py +++ b/src/qiskit_qec/operators/pauli.py @@ -519,6 +519,8 @@ def to_instruction(self): syntax=pauli_rep.PRODUCT_SYNTAX, qubit_order="right-to-left", ) + if isinstance(phase_exp, np.ndarray): + phase_exp = phase_exp[0] if len(pauli) == 1: gate = {"I": IGate(), "X": XGate(), "Y": YGate(),