class_docstr: Test that the transform is differentiable
class_docstr_tok: ["Test","that","the","transform","is","differentiable"]
docstr: Tests that the output of the finite-difference transform is similar using or not diff method on the QNode.
code: def test_jax_probs(
      self, dev_name, approx_order, strategy, tol
  ):  # pylint: disable=unused-argument
      """Tests that the output of the finite-difference transform is similar using or not diff method on the QNode."""
      import jax
  
      dev = qml.device(dev_name, wires=2)
      x = jax.numpy.array(0.543)
  
      @qml.qnode(dev)
      def circuit(x):
          qml.RX(x, wires=[0])
          qml.RY(x, wires=[0])
          qml.CNOT(wires=[0, 1])
          return qml.probs(wires=0), qml.probs(wires=1)
  
      @qml.qnode(dev, diff_method="finite-diff")
      def circuit_fd(x):
          qml.RX(x, wires=[0])
          qml.RY(x, wires=[0])
          qml.CNOT(wires=[0, 1])
          return qml.probs(wires=0), qml.probs(wires=1)
  
      transform_output = qml.gradients.finite_diff(circuit)(x)
      framework_output = jax.jacobian(circuit)(x)
      assert jax.numpy.allclose(
          jax.numpy.stack(transform_output),
          jax.numpy.stack(framework_output),
      )
  
      transform_output = qml.gradients.finite_diff(circuit_fd)(x)
      framework_output = jax.jacobian(circuit_fd)(x)
      assert jax.numpy.allclose(
          jax.numpy.stack(transform_output),
          jax.numpy.stack(framework_output),
      )
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.gradients import finite_diff, finite_diff_coeffs
  from pennylane.operation import AnyWires, Observable
label_desc: Use image node_id 7 for calling the TestFiniteDiffGradients obj's underlying member method code with example usage: obj.test_jax_probs(dev_name, approx_order, strategy, tol) and returns: qml,  qml, qml,  qml