CQCL / guppylang

Pythonic quantum-classical programming language
https://pypi.org/project/guppylang
Apache License 2.0
33 stars 3 forks source link

Known-size array unpacking #649

Open ss2165 opened 4 days ago

ss2165 commented 4 days ago

When array sizes are known (and not generic) allow things like:

qs = array(qubit(), qubit())
[q0, q1] = qs
[q0, *_] = qs
[*_, q_prev, q_last]