Open amccaskey opened 3 weeks ago
Maybe I forgot to comment before, but I think it will be handy to have a distinct type for these other than a cc.struct type. It would let us fine tune the semantics better. They are "quantum" types in the "quantum memory" space. They only interact with quake dialect artifacts. They can't be loaded and stored from and to regular memory, etc.
I saw the "size" information (utterly bogus in terms of the semantics here) in the tests and it reminded me...
This PR addresses the need to support struct types with only quantum members, e.g.
or
Pure quantum struct types are treated as value types in the MLIR (no loading or storing).
We enforce the following restrictions in both C++ and Python with thrown errors with descriptive messages:
A canonicalizer is also added to ensure lowering to static circuit code is possible.