@unitary decorator for guppy
Ability to decorate functions as unitaries (perhaps Array<N, Qubit> -> Array<N, Qubit>)
This is either used as a hint or is enforced by checking the definition.
It may be possible to use the HUGR extension system for that check.
This is useful for possible analyses and transforms, e.g. dagger function, gradient injections, or just unit testing by calculating the unitary.
I would like some equivalent of .get_unitary().
In qlibs we are able to select the block of the unitary for the relevant pre/post selection qubits. This is a very powerful feature and is how all of the testing of block encoding is done.
https://github.com/CQCL-DEV/qtmlib/blob/main/qtmlib/circuits/core/_registerbox.py calls https://github.com/CQCL-DEV/qtmlib/blob/main/qtmlib/measurement/utils.py
It could be cleaner. But it recursively slices the unitary in half, depending on the qubit post selection.