class_docstr: Tests for integration with the PassthruQNode
docstr: Tests that the gradient of the qnode is correct with batching
code: def test_batching(self, jacobian_fn, decorator, tol):
      """Tests that the gradient of the qnode is correct with batching"""
      dev = qml.device("default.mixed", wires=2)
  
      if decorator == jax.jit:
          # TODO: https://github.com/PennyLaneAI/pennylane/issues/2762
          pytest.xfail(
              "Parameter broadcasting currently not supported for JAX jit"
          )
  
      @partial(qml.batch_params, all_operations=True)
      @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, 0.678])
      b = jnp.array([0.654, 1.236])
  
      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_a, res_b = decorator(jacobian_fn(circuit, (0, 1)))(a, b)
      expected_a, expected_b = [
          -0.5 * np.sin(a) * (np.cos(b) + 1),
          0.5 * np.sin(b) * (1 - np.cos(a)),
      ]
  
      assert np.allclose(jnp.diag(res_a), expected_a, atol=tol, rtol=0)
      assert np.allclose(jnp.diag(res_b), expected_b, 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 14 for calling the TestPassthruIntegration obj's underlying member method code with example usage: obj.test_batching(jacobian_fn, decorator, tol) and returns: qml