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

[Python] Error on returning a list from entry level kernel #2336

Open
3 of 4 tasks
annagrin opened this issue Oct 30, 2024 · 0 comments
Open
3 of 4 tasks

[Python] Error on returning a list from entry level kernel #2336

annagrin opened this issue Oct 30, 2024 · 0 comments

Comments

@annagrin
Copy link
Collaborator

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

Running the following example

 @cudaq.kernel()
    def callee(v: cudaq.qview) -> list[bool]:
        return mz(v)

    @cudaq.kernel()
    def caller() -> list[bool]:
        q = cudaq.qvector(2)
        t = callee(q)
        return t
    print(caller())

Gives the following error:

RuntimeError: Unsupported CUDA-Q kernel return type - !cc.stdvec<i1>.

Steps to reproduce the bug

@cudaq.kernel()
def callee(v: cudaq.qview) -> list[bool]:
return mz(v)

@cudaq.kernel()
def caller() -> list[bool]:
    q = cudaq.qvector(2)
    t = callee(q)
    return t
print(caller())

Expected behavior

prints a list [0,0]

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA Quantum version:
  • Python version:
  • C++ compiler:
  • Operating system:

Suggestions

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant