class_docstr: Tests for Fidelity function between two QNodes.
docstr: Test the gradient of the fidelity between two trainable circuits with Jax.
code: def test_fidelity_qnodes_rx_tworx_jax_grad(
      self, param, wire, interface
  ):
      """Test the gradient of the fidelity between two trainable circuits with Jax."""
      import jax
  
      dev = qml.device("default.qubit", wires=wire)
  
      @qml.qnode(dev, interface=interface)
      def circuit(x):
          qml.RX(x, wires=0)
          return qml.state()
  
      fid_grad = jax.grad(
          qml.qinfo.fidelity(circuit, circuit, wires0=[0], wires1=[0]),
          argnums=[0, 1],
      )(
          (jax.numpy.array(param)),
          (jax.numpy.array(2 * param)),
      )
      expected = expected_grad_fidelity_rx_pauliz(param)
      expected_fid = [-expected, expected]
      assert qml.math.allclose(
          fid_grad, expected_fid, rtol=1e-04, atol=1e-03
      )
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 26 for calling the TestFidelityQnode obj's underlying member method code with example usage: obj.test_fidelity_qnodes_rx_tworx_jax_grad(param, wire, interface) and returns: qml