guppylang icon indicating copy to clipboard operation
guppylang copied to clipboard

Transversal overloads of builtin quantum operations

Open mark-koch opened this issue 6 months ago • 1 comments

Overload single qubit operations in guppylang.std.quantum to accept arrays of qubit. Same for measurment and discarding

Before:

for i in range(n):
    h(qs[i])
for q in qs:
    discard(q)

After:

h(qs)
discard(qs)

mark-koch avatar Jul 04 '25 16:07 mark-koch

More radical proposal: Every single argument function should automatically map over arrays?

mark-koch avatar Jul 07 '25 14:07 mark-koch