quil-rs
quil-rs copied to clipboard
`Gate.to_unitary_mut(0)` overflows and panics
This code panics:
from quil.instructions import Gate, Qubit
Gate("X", (), (Qubit.from_fixed(0),), ()).to_unitary_mut(0)
Running that with a debug build gives something like:
attempt to subtract with overflow
In a release build, I see this:
ndarray: inputs 0 × 0 and 1 × 1 are not compatible for matrix multiplication