pyqir
pyqir copied to clipboard
Issues using ArrayType and StructType
I am finding it difficult to make use of ArrayType and StructType in PyQIR. It is not possible to directly instantiate these classes and it also seems impossible to subclass these types. (I get a TypeError: type 'builtins.ArrayType' is not an acceptable base type)
Additional context
The ArrayType seems to be of central importance in defining QIR programs. For example, If I want to write a QFT function (using the FunctionType) and pass in an array of qubits, this seems impossible as I cannot specify an ArrayType as a parameter to the Function.
Please let me know if I am missing something or if this is not the intended use case of PyQIR.
Could you provide an example of what you have in mind? Like some Python code?