From 5d8159e8f10e1d9e3c172ae49b64083281c5efea Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Thu, 12 Dec 2024 13:21:56 +0000 Subject: [PATCH] use for loop Co-authored-by: Mark Koch <48097969+mark-koch@users.noreply.github.com> --- guppylang/std/quantum.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)