@qml.qnode(dev, interface='autograd')
def circuit(weights):
    qml.RX(weights[0], wires=0)
    qml.RZ(weights[1], wires=1)
    return qml.expval((qml.PauliZ(0) @ qml.PauliZ(1)))
@qml.qnode(dev, interface='autograd')
def circuit(weights):
    qml.RX(weights[0], wires=0)
    qml.RZ(weights[1], wires=1)
    return qml.expval((qml.PauliZ(0) @ qml.PauliZ(1)))