class_docstr: Test ``qml.qjit`` with Catalyst
class_docstr_tok: ["Test","``","qml.qjit","``","with","Catalyst"]
docstr: Test that control works with qjit.
docstr_tok: ["Test","that","control","works","with","qjit","."]
code: def test_control(self):
      """Test that control works with qjit."""
      dev = qml.device("lightning.qubit", wires=2)
  
      @qml.qjit
      @qml.qnode(dev)
      def workflow(theta, w, cw):
          qml.Hadamard(wires=[0])
          qml.Hadamard(wires=[1])
  
          def func(arg):
              qml.RX(theta, wires=arg)
  
          def cond_fn():
              qml.RY(theta, wires=w)
  
          qml.ctrl(func, control=[cw])(w)
          qml.ctrl(qml.cond(theta > 0.0, cond_fn), control=[cw])()
          qml.ctrl(qml.RZ, control=[cw])(theta, wires=w)
          qml.ctrl(qml.RY(theta, wires=w), control=[cw])
          return qml.probs()
  
      assert jnp.allclose(
          workflow(jnp.pi / 4, 1, 0),
          jnp.array([0.25, 0.25, 0.03661165, 0.46338835]),
      )
  
imports: from unittest.mock import patch
  import pytest
  import pennylane
  from pennylane.compiler.compiler import CompileError
  from pennylane import numpy
  from jax import numpy
  from jax.core import ShapedArray
label_desc: Use image node_id 13 for calling the TestCatalyst obj's underlying member method code with example usage: obj.test_control() and returns: qml