Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues using ArrayType and StructType #262

Open
skushnir123 opened this issue Jan 30, 2024 · 1 comment
Open

Issues using ArrayType and StructType #262

skushnir123 opened this issue Jan 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@skushnir123
Copy link

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.

@ausbin
Copy link

ausbin commented Jun 3, 2024

Could you provide an example of what you have in mind? Like some Python code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants