class_docstr: Test that rotation merging works in all interfaces.
class_docstr_tok: ["Test","that","rotation","merging","works","in","all","interfaces","."]
docstr: Test QNode and gradient in JAX interface with JIT.
docstr_tok: ["Test","QNode","and","gradient","in","JAX","interface","with","JIT","."]
code: def test_single_qubit_fusion_jax_jit(self):
      """Test QNode and gradient in JAX interface with JIT."""
      import jax
      from jax import numpy as jnp
  
      original_qnode = qml.QNode(qfunc_all_ops, dev)
      jitted_qnode = jax.jit(original_qnode)
  
      transformed_qnode = qml.QNode(transformed_qfunc_all_ops, dev)
      jitted_transformed_qnode = jax.jit(transformed_qnode)
  
      input = jnp.array([0.1, 0.2, 0.3, 0.4], dtype=jnp.float64)
  
      # Check that the numerical output is the same
      original_output = original_qnode(input)
      assert qml.math.allclose(jitted_qnode(input), original_output)
      assert qml.math.allclose(
          transformed_qnode(input), original_output
      )
      assert qml.math.allclose(
          jitted_transformed_qnode(input), original_output
      )
  
      # Check that the gradients are the same even after jitting
      original_gradient = jax.grad(original_qnode)(input)
      assert qml.math.allclose(
          jax.grad(jitted_qnode)(input), original_gradient
      )
      assert qml.math.allclose(
          jax.grad(transformed_qnode)(input), original_gradient
      )
      assert qml.math.allclose(
          jax.grad(jitted_transformed_qnode)(input), original_gradient
      )
  
      # Check operation list
      ops = transformed_qnode.qtape.operations
      compare_operation_lists(
          ops, expected_op_list, expected_wires_list
      )
  
imports: import pytest
  from utils import compare_operation_lists, check_matrix_equivalence
  from pennylane import numpy
  import pennylane
  from pennylane.wires import Wires
  from pennylane.transforms.optimization import single_qubit_fusion
label_desc: Use image node_id 5 for calling the TestSingleQubitFusionInterfaces obj's underlying member method code with example usage: obj.test_single_qubit_fusion_jax_jit() without return types