class_docstr: Tests for integration with the PassthruQNode
class_docstr_tok: ["Tests","for","integration","with","the","PassthruQNode"]
docstr: Test that the jacobian of a QNode with an attached default.mixed.torch device
  gives the correct result in the case of repeated parameters
docstr_tok: ["Test","that","the","jacobian","of","a","QNode","with","an","attached","default.mixed.torch","device","gives","the","correct","result","in","the","case","of","repeated","parameters"]
code: def test_jacobian_repeated(self, tol):
      """Test that the jacobian of a QNode with an attached default.mixed.torch device
      gives the correct result in the case of repeated parameters"""
      x = torch.tensor(0.43316321, dtype=torch.float64)
      y = torch.tensor(0.2162158, dtype=torch.float64)
      z = torch.tensor(0.75110998, dtype=torch.float64)
      p = torch.tensor(
          [x, y, z], dtype=torch.float64, requires_grad=True
      )
      dev = qml.device("default.mixed", wires=1)
  
      @qml.qnode(dev, interface="torch", diff_method="backprop")
      def circuit(x):
          qml.RX(x[1], wires=0)
          qml.Rot(x[0], x[1], x[2], wires=0)
          return qml.expval(qml.PauliZ(0))
  
      res = circuit(p)
      res.backward()
  
      expected = torch.cos(y) ** 2 - torch.sin(x) * torch.sin(y) ** 2
      assert torch.allclose(res, expected, atol=tol, rtol=0)
  
      expected = torch.tensor(
          [
              -torch.cos(x) * torch.sin(y) ** 2,
              -2 * (torch.sin(x) + 1) * torch.sin(y) * torch.cos(y),
              0,
          ]
      )
      assert torch.allclose(p.grad, expected, atol=tol, rtol=0)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
label_desc: Use image node_id 2 for calling the TestPassthruIntegration obj's underlying member method code with example usage: obj.test_jacobian_repeated(tol) and returns: qml