It Would Be Nice to define gates by some circuit decomposition. This is different than DEFCIRCUIT since those are simply for expansion and not meant to represent "Gates".
DEFGATE CZ p q AS CIRCUIT:
H p
CNOT p q
H p
This is not a DEFCIRCUIT! This is the expression of a unitary operation (which is not expanded!) as a sequence of gates.
It Would Be Nice to define gates by some circuit decomposition. This is different than DEFCIRCUIT since those are simply for expansion and not meant to represent "Gates".
This is not a
DEFCIRCUIT
! This is the expression of a unitary operation (which is not expanded!) as a sequence of gates.Concrete qubit indices shouldn't be allowed.