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
Putting both mx and mz in kernels can result in incomplete results in the __global__ register.
if a qubit is measured in the middle of a kernel and subsequent operations change the state of the qubit, the qubit will be implicitly re-measured at the end of the kernel, and that re-measured value is the value that will appear in the global register.
It is unclear if "re-measured" means measured in the same basis as the original measurement or not, but regardless, the example above shows that the measurements for qubits_a can be lost. They should be in the resulting global register.
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
CUDA-Q version: latest (fe1396b at the time of the creation of this issue)
Python version: 3.10
C++ compiler:
Operating system:
Suggestions
No response
The text was updated successfully, but these errors were encountered:
Required prerequisites
Describe the bug
Putting both
mx
andmz
in kernels can result in incomplete results in the__global__
register.Steps to reproduce the bug
Consider the following kernel:
That will produce something like this:
Expected behavior
The specification/docs say that
It is unclear if "re-measured" means measured in the same basis as the original measurement or not, but regardless, the example above shows that the measurements for
qubits_a
can be lost. They should be in the resulting global register.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: