class_docstr: Tests for Fidelity function between two QNodes.
docstr: Test the fidelity between Rx and PauliZ circuits with Torch.
code: def test_fidelity_qnodes_rx_pauliz_torch(
      self, device, param, wire, interface
  ):
      """Test the fidelity between Rx and PauliZ circuits with Torch."""
      import torch
  
      dev = qml.device(device, wires=wire)
  
      @qml.qnode(dev, interface=interface)
      def circuit0(x):
          qml.RX(x, wires=0)
          return qml.state()
  
      @qml.qnode(dev, interface="torch")
      def circuit1():
          qml.PauliZ(wires=0)
          return qml.state()
  
      fid = qml.qinfo.fidelity(
          circuit0, circuit1, wires0=[0], wires1=[0]
      )((torch.tensor(param)))
      expected_fid = expected_fidelity_rx_pauliz(param)
      assert qml.math.allclose(fid, expected_fid)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 12 for calling the TestFidelityQnode obj's underlying member method code with example usage: obj.test_fidelity_qnodes_rx_pauliz_torch(device, param, wire, interface) and returns: qml, qml