One drawback of the existing implementation is that quilc is constricted in how it utilizes sequence gate definitions. There is a strict injective mapping for how a sequence gate is implemented. For this reason, any circular references within the family of sequence defgates for any parsed quil program must result in an error.
We might like to consider allowing for alternative definitions. Giving the compiler room for optimizations if any such alternatives in a parsed program allow for it.
https://github.com/quil-lang/quilc/pull/785 adds the defgate as sequence feature to the quil language.
One drawback of the existing implementation is that quilc is constricted in how it utilizes sequence gate definitions. There is a strict injective mapping for how a sequence gate is implemented. For this reason, any circular references within the family of sequence defgates for any parsed quil program must result in an error.
We might like to consider allowing for alternative definitions. Giving the compiler room for optimizations if any such alternatives in a parsed program allow for it.