[X] 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.
[X] Make sure you've read the documentation. Your issue may be addressed there.
[X] 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
If I run the code in the example 1 below with both
In Example 2, I am trying first to apply a cudaq.control on a given quantum kernel and then apply control-adjoint of the quantum kernel, but it gives error.
error: 'func.call' op '__nvqpp__mlirgen__my_func.adj.ctrl' does not reference a valid function
A work around it is shown in example 3. Example 3 works.
This does not make sense. Because, I have to explicitly rewrite the kernel using adj() for each applied gate instead of using the cudaq.adjoint() and then cudaq.control().
Required prerequisites
Describe the bug
If I run the code in the example 1 below with both
I got this error:
error: 'func.call' op '__nvqpp__mlirgen__my_func.adj' does not reference a valid function
However if I comment one of them, for example:
It works.
In Example 2, I am trying first to apply a cudaq.control on a given quantum kernel and then apply control-adjoint of the quantum kernel, but it gives error.
error: 'func.call' op '__nvqpp__mlirgen__my_func.adj.ctrl' does not reference a valid function
A work around it is shown in example 3. Example 3 works.
This does not make sense. Because, I have to explicitly rewrite the kernel using adj() for each applied gate instead of using the cudaq.adjoint() and then cudaq.control().
Steps to reproduce the bug
Example 1:
Example 2:
Example 3:
Expected behavior
I expect to be able to call the same quantum kernel and use it with both cudaq.control() and cudaq.adjoint().
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response