class_docstr: Test that using the QNode with Autograd integrates with the PennyLane stack
class_docstr_tok: ["Test","that","using","the","QNode","with","Autograd","integrates","with","the","PennyLane","stack"]
docstr: Test execution works with the interface
docstr_tok: ["Test","execution","works","with","the","interface"]
code: def test_execution_with_interface(
      self, interface, dev, diff_method, grad_on_execution, device_vjp
  ):
      """Test execution works with the interface"""
      if diff_method == "backprop":
          pytest.skip("Test does not support backprop")
  
      @qnode(
          dev,
          interface=interface,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
      )
      def circuit(a):
          qml.RY(a, wires=0)
          qml.RX(0.2, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      a = np.array(0.1, requires_grad=True)
      assert circuit.interface == interface
      # gradients should work
      grad = qml.grad(circuit)(a)
  
      assert grad.shape == tuple()
  
imports: import autograd
  import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 2 for calling the TestQNode obj's underlying member method code with example usage: obj.test_execution_with_interface(interface, dev, diff_method, grad_on_execution, device_vjp) and returns: qml