Hi there, I am playing around with adding noise to my quantum circuits with shots and am trying to use the decorator approach to add error sources to my quantum ansatz. Below is a simple script:
import pennylane as qml
from pennylane.transforms import insert
from functools import partial
dev = qml.device('default.mixed', wires=2, shots = 10)
@partial(insert, qml.AmplitudeDamping, 0.2, position="end")
@qml.qnode(dev, interface = 'torch')
def circuit():
qml.Hadamard(wires=0)
qml.CNOT(wires=[0, 1])
return qml.sample()
samples = circuit()
print(output)
When i run this however i get the following error:
TypeError: AmplitudeDamping.__init__() missing 2 required positional arguments:
'gamma' and 'wires'
I believe I am providing this with the decorator and the device? Any incite would be great, many thanks!