Skip to content

Commit

Permalink
use for loop
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Koch <[email protected]>
  • Loading branch information
ss2165 and mark-koch authored Dec 12, 2024
1 parent e7e1be9 commit 5d8159e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion guppylang/std/quantum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 5d8159e

Please sign in to comment.