class_docstr: Tests a basic circuit with one rx gate and two simple expectation values.
docstr: Tests exeuction and gradients with jax.
docstr_tok: ["Tests","exeuction","and","gradients","with","jax","."]
code: def test_jax_results_and_backprop(self, use_jit):
      """Tests exeuction and gradients with jax."""
      import jax
  
      phi = jax.numpy.array(0.678)
  
      def f(x):
          qs = qml.tape.QuantumScript(
              [qml.RX(x, wires=0)],
              [qml.expval(qml.PauliY(0)), qml.expval(qml.PauliZ(0))],
          )
          return simulate(qs)
  
      if use_jit:
          f = jax.jit(f)
  
      result = f(phi)
      assert qml.math.allclose(result[0], -np.sin(phi))
      assert qml.math.allclose(result[1], np.cos(phi))
  
      g = jax.jacobian(f)(phi)
      assert qml.math.allclose(g[0], -np.cos(phi))
      assert qml.math.allclose(g[1], -np.sin(phi))
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.devices.qubit import simulate, get_final_state, measure_final_state
label_desc: Use image node_id 3 for calling the TestBasicCircuit obj's underlying member method code with example usage: obj.test_jax_results_and_backprop(use_jit) and returns: simulate