class_docstr: Test that using the QNode with Torch integrates with the PennyLane stack
class_docstr_tok: ["Test","that","using","the","QNode","with","Torch","integrates","with","the","PennyLane","stack"]
docstr: Test calculating the jacobian with a different datatype
docstr_tok: ["Test","calculating","the","jacobian","with","a","different","datatype"]
code: def test_jacobian_dtype(
      self,
      interface,
      dev,
      diff_method,
      grad_on_execution,
      device_vjp,
  ):
      """Test calculating the jacobian with a different datatype"""
      if diff_method == "backprop":
          pytest.skip("Test does not support backprop")
  
      a = torch.tensor(0.1, dtype=torch.float32, requires_grad=True)
      b = torch.tensor(0.2, dtype=torch.float32, requires_grad=True)
  
      @qnode(
          dev,
          interface=interface,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
      )
      def circuit(a, b):
          qml.RY(a, wires=0)
          qml.RX(b, wires=1)
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliY(1))
  
      res = circuit(a, b)
  
      assert circuit.interface == interface
      assert circuit.qtape.trainable_params == [0, 1]
  
      assert isinstance(res, tuple)
      assert len(res) == 2
  
      assert res[0].dtype is torch.float32
      assert res[1].dtype is torch.float32
  
      loss = res[0] + res[1]
      loss.backward()
      assert a.grad.dtype is torch.float32
      assert b.grad.dtype is torch.float32
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 5 for calling the TestQNode obj's underlying member method code with example usage: obj.test_jacobian_dtype(interface, dev, diff_method, grad_on_execution, device_vjp) and returns: qml,  qml