class_docstr: Tests for the ``adjoint_jacobian`` method
class_docstr_tok: ["Tests","for","the","``","adjoint_jacobian","``","method"]
docstr: Test that a parametrized `QubitUnitary` is accounted for correctly
  when it is not trainable.
docstr_tok: ["Test","that","a","parametrized","`","QubitUnitary","`","is","accounted","for","correctly","when","it","is","not","trainable","."]
code: def test_with_nontrainable_parametrized(self):
      """Test that a parametrized `QubitUnitary` is accounted for correctly
      when it is not trainable."""
  
      dev = qml.device("default.qubit.legacy", wires=1)
      par = np.array(0.6)
  
      def circuit(x):
          qml.RY(x, wires=0)
          qml.QubitUnitary(np.eye(2, requires_grad=False), wires=0)
          return qml.expval(qml.PauliZ(0))
  
      circ = qml.QNode(circuit, dev, diff_method="adjoint")
      grad_adjoint = qml.jacobian(circ)(par)
      circ = qml.QNode(circuit, dev, diff_method="parameter-shift")
      grad_psr = qml.jacobian(circ)(par)
      assert np.allclose(grad_adjoint, grad_psr)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 18 for calling the TestAdjointJacobian obj's underlying member method code with example usage: obj.test_with_nontrainable_parametrized() and returns: qml