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 that an exception is raised if non-differentiable data is
  differentiated
docstr_tok: ["Test","that","an","exception","is","raised","if","non-differentiable","data","is","differentiated"]
code: def test_gradient_non_differentiable_exception(
      self, interface, dev, diff_method, grad_on_execution, device_vjp
  ):
      """Test that an exception is raised if non-differentiable data is
      differentiated"""
  
      @qnode(
          dev,
          interface=interface,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
      )
      def circuit(data1):
          qml.templates.AmplitudeEmbedding(data1, wires=[0, 1])
          return qml.expval(qml.PauliZ(0))
  
      grad_fn = qml.grad(circuit, argnum=0)
      data1 = np.array([0, 1, 1, 0], requires_grad=False) / np.sqrt(2)
  
      with pytest.raises(
          qml.numpy.NonDifferentiableError,
          match="is non-differentiable",
      ):
          grad_fn(data1)
  
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 10 for calling the TestQNode obj's underlying member method code with example usage: obj.test_gradient_non_differentiable_exception(interface, dev, diff_method, grad_on_execution, device_vjp) and returns: qml