[data types] Bloqs which work for multiple types
As part of #446 we will need to update the signatures of several arithmetic bloqs to allow for some generic behavour.
One way to do this is
class Add(bloq):
dtype: QDType
@dtype.validator(self):
assert isinstance(dtype, (QInt, QUInt, ...))
This will happen after the migration work. We should initially only sort generic type variables for bloqs which actually test them for different types. We would also need to handle classical simulation #607 #606
I think I asked during the design review whether we'd need abstract qdtypes. Specifically: a named-but-not-instantiatable type to replace (QInt, QUint, ...) in the isinstance check (and appropriate for the attrs type annotation)
right, that is the plan once we sort of land on what bloqs work on which types.