You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
import cudaq
@cudaq.kernel
def bit_flip(which_m: int):
qubits = cudaq.qvector(1)
#create psi
u3(1,2,3, qubits[0])
if which_m == 1:
mz(qubits[0])
#this works since argument is defined outside of sample and passed in
which_m = 1
counts = cudaq.sample(bit_flip, which_m, shots_count = 1)
#this throws an error when argument is defined within sample
counts = cudaq.sample(bit_flip, which_m=1, shots_count = 1)
Steps to reproduce the bug
NA
Expected behavior
NA
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
CUDA-Q version:
Python version:
C++ compiler:
Operating system:
Suggestions
No response
The text was updated successfully, but these errors were encountered:
I think this is consistent with how Python handles other functions that take both positional and keyword arguments like cudaq.sample. For example, the following fails with an error message.
Required prerequisites
Describe the bug
Steps to reproduce the bug
NA
Expected behavior
NA
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response
The text was updated successfully, but these errors were encountered: