class_docstr: Tests templates being conditioned on mid-circuit measurement outcomes.
docstr: Test the angle embedding template conditioned on mid-circuit
  measurement outcomes.
docstr_tok: ["Test","the","angle","embedding","template","conditioned","on","mid-circuit","measurement","outcomes","."]
code: def test_angle_embedding(self):
      """Test the angle embedding template conditioned on mid-circuit
      measurement outcomes."""
      template = qml.AngleEmbedding
      feature_vector = [1, 2, 3]
  
      dev = qml.device("default.qubit", wires=6)
  
      @qml.qnode(dev)
      def qnode1():
          qml.Hadamard(0)
          qml.ctrl(template, control=0)(
              features=feature_vector, wires=range(1, 5), rotation="Z"
          )
          return qml.expval(
              qml.PauliZ(1)
              @ qml.PauliZ(2)
              @ qml.PauliZ(3)
              @ qml.PauliZ(4)
          )
  
      @qml.qnode(dev)
      @qml.defer_measurements
      def qnode2():
          qml.Hadamard(0)
          m_0 = qml.measure(0)
          qml.cond(m_0, template)(
              features=feature_vector, wires=range(1, 5), rotation="Z"
          )
          return qml.expval(
              qml.PauliZ(1)
              @ qml.PauliZ(2)
              @ qml.PauliZ(3)
              @ qml.PauliZ(4)
          )
  
      res1 = qnode1()
      res2 = qnode2()
  
      assert np.allclose(res1, res2)
  
      assert len(qnode2.qtape.operations) == len(
          qnode1.qtape.operations
      )
      assert len(qnode1.qtape.measurements) == len(
          qnode2.qtape.measurements
      )
  
      # Check the operations
      for op1, op2 in zip(
          qnode1.qtape.operations, qnode2.qtape.operations
      ):
          assert isinstance(op1, type(op2))
          assert np.allclose(op1.data, op2.data)
  
      # Check the measurements
      for op1, op2 in zip(
          qnode1.qtape.measurements, qnode2.qtape.measurements
      ):
          assert isinstance(op1, type(op2))
          assert np.allclose(op1.data, op2.data)
  
imports: import math
  import pytest
  import pennylane
  from pennylane.measurements import MidMeasureMP, MeasurementValue
  import pennylane.numpy
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 2 for calling the TestTemplates obj's underlying member method code with example usage: obj.test_angle_embedding() and returns: qml, qml