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
When I set the error probably to 1 using the cudaq.DepolarizationChannel to a given gate and measure the output, I expect the expectation value to be 0 in any basis. I observe a consistent of 0.338 after applying an x gate with an error rate of 1. Further testing with a Rx gate with varying angles that Z expectation correlates with the rotation angle, even with a depolarization rate of 1.
Steps to reproduce the bug
cudaq.set_target('density-matrix-cpu')
def rabi_noisy(time,shots):
kernel=cudaq.make_kernel()
## set depolarization channel to 1 for rx gate
noise_model=cudaq.NoiseModel()
noise_model.add_channel("rx",[0],cudaq.DepolarizationChannel(1))
## vary the rx rotation angle
qubits=kernel.qalloc(1)
kernel.rx(time,qubits[0])
kernel.mz(qubits[0])
counts=cudaq.sample(kernel,shots_count=shots,noise_model=noise_model)
exp_z=counts.expectation()
return exp_z
angles = [x*0.1 for x in range(0,62)]
shots=10000
exp_z=[]
for angle in angles:
exp_z.append(rabi_noisy(angle,shots))
Expected behavior
The expectation should be 0 for all Rx angles with DepolarizationChannel(1)
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
CUDA Quantum version: 0.7.1
Python version: 3.10.12
C++ compiler:
Operating system: macos Sonoma 14.5
Suggestions
No response
The text was updated successfully, but these errors were encountered:
Required prerequisites
Describe the bug
When I set the error probably to 1 using the cudaq.DepolarizationChannel to a given gate and measure the output, I expect the expectation value to be 0 in any basis. I observe a consistent of 0.338 after applying an x gate with an error rate of 1. Further testing with a Rx gate with varying angles that Z expectation correlates with the rotation angle, even with a depolarization rate of 1.
Steps to reproduce the bug
Expected behavior
The expectation should be 0 for all Rx angles with DepolarizationChannel(1)
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: