class_docstr: Tests for the Trace Distance function between two QNodes.
docstr: Test the gradient of the trace distance between Rx and PauliZ circuits with
  two parameters.
docstr_tok: ["Test","the","gradient","of","the","trace","distance","between","Rx","and","PauliZ","circuits","with","two","parameters","."]
code: def test_trace_distance_qnodes_rx_pauliz_grad_two_params(
      self, param, wire, interface
  ):
      """Test the gradient of the trace distance between Rx and PauliZ circuits with
      two parameters."""
      dev = qml.device("default.qubit", wires=wire)
  
      @qml.qnode(dev, interface=interface, diff_method="backprop")
      def circuit0(x):
          qml.RX(x, wires=wire - 1)
          return qml.state()
  
      @qml.qnode(dev, interface=interface, diff_method="backprop")
      def circuit1(x):
          qml.RX(x, wires=wire - 1)
          qml.RX(-x, wires=wire - 1)
          qml.PauliZ(wires=wire - 1)
          return qml.state()
  
      td_grad = qml.grad(
          qml.qinfo.trace_distance(
              circuit0, circuit1, wires0=[wire - 1], wires1=[wire - 1]
          )
      )(
          qml.numpy.array(param, requires_grad=True),
          qml.numpy.array(2.0, requires_grad=True),
      )
      expected_td_grad = expected_grad_trace_distance_rx_pauliz(param)
      assert qml.math.allclose(td_grad, (expected_td_grad, 0.0))
  
      td_grad = qml.grad(
          qml.qinfo.trace_distance(
              circuit1, circuit0, wires0=[wire - 1], wires1=[wire - 1]
          )
      )(
          qml.numpy.array(2.0, requires_grad=True),
          qml.numpy.array(param, requires_grad=True),
      )
      assert qml.math.allclose(td_grad, (0.0, expected_td_grad))
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 13 for calling the TestTraceDistanceQnode obj's underlying member method code with example usage: obj.test_trace_distance_qnodes_rx_pauliz_grad_two_params(param, wire, interface) and returns: qml, qml