CQCL / guppylang

Pythonic quantum-classical programming language
Apache License 2.0
18 stars 2 forks source link

Converting bool to int doesn't work #281

Open croyzor opened 3 days ago

croyzor commented 3 days ago

Adding an explicit int coercion to a boolean value currently produces an invalid hugr, with the error:

TypeArgMismatch(WrongNumberArgs(1, 0))

This is to do with the fact that the hugr "conversion" extension creates an int with width 1, whereas all ints in guppy have width 64. We need to widen the ints that come back!