class_docstr: Test ``qml.qjit`` with Catalyst's control-flow operations
class_docstr_tok: ["Test","``","qml.qjit","``","with","Catalyst","'s","control-flow","operations"]
docstr: Test for loops with iteration index-dependant wires.
docstr_tok: ["Test","for","loops","with","iteration","index-dependant","wires","."]
code: def test_dynamic_wires_for_loops(self):
      """Test for loops with iteration index-dependant wires."""
      dev = qml.device("lightning.qubit", wires=6)
  
      @qml.qjit
      @qml.qnode(dev)
      def circuit(n: int):
          qml.Hadamard(wires=0)
  
          @qml.for_loop(0, n - 1, 1)
          def loop_fn(i):
              qml.CNOT(wires=[i, i + 1])
  
          loop_fn()
          return qml.state()
  
      expected = np.zeros(2**6)
      expected[[0, 2**6 - 1]] = 1 / np.sqrt(2)
  
      assert jnp.allclose(circuit(6), 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 3 for calling the TestCatalystControlFlow obj's underlying member method code with example usage: obj.test_dynamic_wires_for_loops() and returns: qml