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 the autograd interface works correctly
  with a matrix parameter
docstr_tok: ["Test","that","the","autograd","interface","works","correctly","with","a","matrix","parameter"]
code: def test_matrix_parameter(
      self,
      interface,
      dev,
      diff_method,
      grad_on_execution,
      device_vjp,
      tol,
  ):
      """Test that the autograd interface works correctly
      with a matrix parameter"""
      U = np.array([[0, 1], [1, 0]], requires_grad=False)
      a = np.array(0.1, requires_grad=True)
  
      @qnode(
          dev,
          diff_method=diff_method,
          interface=interface,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
      )
      def circuit(U, a):
          qml.QubitUnitary(U, wires=0)
          qml.RY(a, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      res = circuit(U, a)
  
      if diff_method == "finite-diff":
          assert circuit.qtape.trainable_params == [1]
  
      res = qml.grad(circuit)(U, a)
      assert np.allclose(res, np.sin(a), atol=tol, rtol=0)
  
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 9 for calling the TestQNode obj's underlying member method code with example usage: obj.test_matrix_parameter(interface, dev, diff_method, grad_on_execution, device_vjp, tol) and returns: qml