class_docstr: Test for adjoint_vjp
docstr: Test adjoint_vjp works with a hermitian expectation value.
docstr_tok: ["Test","adjoint_vjp","works","with","a","hermitian","expectation","value","."]
code: def test_hermitian_expval(self):
      """Test adjoint_vjp works with a hermitian expectation value."""
  
      x = 1.2
      H = qml.Hermitian(np.array([[1, 0], [0, -1]]), wires=0)
      cotangent = (0.5,)
  
      qs = QuantumScript(
          [qml.RX(x, wires=0)], [qml.expval(H)], trainable_params=[0]
      )
  
      [vjp_adjoint] = adjoint_vjp(qs, cotangent)
      assert qml.math.allclose(vjp_adjoint, -0.5 * np.sin(x))
  
imports: import pytest
  import pennylane
  from pennylane.devices.qubit import adjoint_jacobian, adjoint_jvp, adjoint_vjp
  from pennylane.tape import QuantumScript
  import pennylane.numpy
label_desc: Use image node_id 14 for calling the TestAdjointVJP obj's underlying member method code with example usage: obj.test_hermitian_expval() without return types