class_docstr: Tests for the mutual information functions
docstr: Test that the gradient of relative entropy works for QNodes
  with the JAX interface
docstr_tok: ["Test","that","the","gradient","of","relative","entropy","works","for","QNodes","with","the","JAX","interface"]
code: def test_qnode_grad_jax(self, param, interface):
      """Test that the gradient of relative entropy works for QNodes
      with the JAX interface"""
      import jax
      import jax.numpy as jnp
  
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev, interface=interface, diff_method="backprop")
      def circuit1(param):
          qml.RY(param, wires=0)
          qml.CNOT(wires=[0, 1])
          return qml.state()
  
      @qml.qnode(dev, interface=interface, diff_method="backprop")
      def circuit2(param):
          qml.RY(param, wires=0)
          qml.CNOT(wires=[0, 1])
          return qml.state()
  
      rel_ent_circuit = qml.qinfo.relative_entropy(
          circuit1, circuit2, [0], [1]
      )
  
      def wrapper(param0, param1):
          return rel_ent_circuit((param0,), (param1,))
  
      expected = [
          np.sin(param[0] / 2)
          * np.cos(param[0] / 2)
          * (
              np.log(np.tan(param[0] / 2) ** 2)
              - np.log(np.tan(param[1] / 2) ** 2)
          ),
          np.cos(param[0] / 2) ** 2 * np.tan(param[1] / 2)
          - np.sin(param[0] / 2) ** 2 / np.tan(param[1] / 2),
      ]
  
      param0, param1 = jnp.array(param[0]), jnp.array(param[1])
      actual = jax.grad(wrapper, argnums=[0, 1])(param0, param1)
  
      assert np.allclose(actual, expected, atol=1e-8)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling the TestRelativeEntropy obj's underlying member method code with example usage: obj.test_qnode_grad_jax(param, interface) and returns: qml, qml, rel_ent_circuit