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 classical processing within the quantum tape
docstr_tok: ["Test","classical","processing","within","the","quantum","tape"]
code: def test_classical_processing(
      self,
      interface,
      dev,
      diff_method,
      grad_on_execution,
      device_vjp,
  ):
      """Test classical processing within the quantum tape"""
      a = torch.tensor(0.1, dtype=torch.float64, requires_grad=True)
      b = torch.tensor(0.2, dtype=torch.float64, requires_grad=False)
      c = torch.tensor(0.3, dtype=torch.float64, requires_grad=True)
  
      @qnode(
          dev,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
          interface=interface,
          device_vjp=device_vjp,
      )
      def circuit(a, b, c):
          qml.RY(a * c, wires=0)
          qml.RZ(b, wires=0)
          qml.RX(c + c**2 + torch.sin(a), wires=0)
          return qml.expval(qml.PauliZ(0))
  
      res = circuit(a, b, c)
  
      if diff_method == "finite-diff":
          assert circuit.qtape.trainable_params == [0, 2]
          assert circuit.qtape.get_parameters() == [
              a * c,
              c + c**2 + torch.sin(a),
          ]
  
      res.backward()
  
      assert isinstance(a.grad, torch.Tensor)
      assert b.grad is None
      assert isinstance(c.grad, torch.Tensor)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 8 for calling the TestQNode obj's underlying member method code with example usage: obj.test_classical_processing(interface, dev, diff_method, grad_on_execution, device_vjp) and returns: qml