class_docstr: Test ``qml.qjit`` with Catalyst
class_docstr_tok: ["Test","``","qml.qjit","``","with","Catalyst"]
docstr: Test AOT compilation of a circuit with 2-qubit
docstr_tok: ["Test","AOT","compilation","of","a","circuit","with","2-qubit"]
code: def test_qjit_aot(self):
      """Test AOT compilation of a circuit with 2-qubit"""
  
      dev = qml.device("lightning.qubit", wires=2)
  
      @qml.qjit
      @qml.qnode(dev)
      def circuit(
          x: complex, z: ShapedArray(shape=(3,), dtype=jnp.float64)
      ):
          theta = jnp.abs(x)
          qml.RY(theta, wires=0)
          qml.Rot(z[0], z[1], z[2], wires=0)
          return qml.state()
  
      # Check that the compilation happens at definition
      assert circuit.jaxpr
      assert circuit.mlir
      assert circuit.qir
  
      result = circuit(0.2j, jnp.array([0.3, 0.6, 0.9]))
      expected = jnp.array(
          [
              0.75634905 - 0.52801002j,
              0.0 + 0.0j,
              0.35962678 + 0.14074839j,
              0.0 + 0.0j,
          ]
      )
      assert jnp.allclose(result, expected)
  
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 5 for calling the TestCatalyst obj's underlying member method code with example usage: obj.test_qjit_aot() and returns: qml