diff --git a/guppylang/std/quantum.py b/guppylang/std/quantum.py index 2e0bac48..a2ef2198 100644 --- a/guppylang/std/quantum.py +++ b/guppylang/std/quantum.py @@ -159,4 +159,5 @@ def measure_array(qubits: array[qubit, N] @ owned) -> array[bool, N]: @no_type_check def discard_array(qubits: array[qubit, N] @ owned) -> None: """Discard an array of qubits.""" - _ = array(discard(q) for q in qubits) + for q in qubits: + discard(q)