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