-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Description
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
kernel_2 below is a 2q kernel, sample returns a 2q result however draw plots a 1q circuit.
import cudaq
@cudaq.kernel
def kernel_1():
q = cudaq.qvector(1)
x(q)
state = cudaq.get_state(kernel_1)
@cudaq.kernel
def kernel_2(state: cudaq.State):
a = cudaq.qvector(1)
b = cudaq.qvector(state)
x(a)
print(cudaq.draw(kernel_2, state))
print(cudaq.sample(kernel_2, state))
╭───╮
q0 : ┤ x ├
╰───╯
{ 11:1000 }
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
Metadata
Metadata
Assignees
Labels
No labels