class_docstr: Tests for integration with the PassthruQNode
docstr: Tests that the gradient of expval is correct
code: def test_expval_gradient(self, decorator, tol):
      """Tests that the gradient of expval is correct"""
      dev = qml.device("default.mixed", wires=2)
  
      @qml.qnode(dev, diff_method="backprop", interface="jax")
      def circuit(a, b):
          qml.RX(a, wires=0)
          qml.CRX(b, wires=[0, 1])
          return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))
  
      a = jnp.array(-0.234)
      b = jnp.array(0.654)
  
      res = decorator(circuit)(a, b)
      expected_cost = 0.5 * (
          np.cos(a) * np.cos(b) + np.cos(a) - np.cos(b) + 1
      )
      assert np.allclose(res, expected_cost, atol=tol, rtol=0)
  
      res = decorator(jax.grad(circuit, (0, 1)))(a, b)
      expected_grad = np.array(
          [
              -0.5 * np.sin(a) * (np.cos(b) + 1),
              0.5 * np.sin(b) * (1 - np.cos(a)),
          ]
      )
      assert np.allclose(res, expected_grad, atol=tol, rtol=0)
  
imports: from functools import partial
  import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
label_desc: Use image node_id 10 for calling the TestPassthruIntegration obj's underlying member method code with example usage: obj.test_expval_gradient(decorator, tol) and returns: qml