class_docstr: Tests conditional operations
docstr: Test that the underlying tape contains the correct operations if a
  measurement value was inverted.
docstr_tok: ["Test","that","the","underlying","tape","contains","the","correct","operations","if","a","measurement","value","was","inverted","."]
code: def test_correct_ops_in_tape_inversion(self):
      """Test that the underlying tape contains the correct operations if a
      measurement value was inverted."""
      first_par = 0.1
      terminal_measurement = qml.expval(qml.PauliZ(1))
  
      with qml.queuing.AnnotatedQueue() as q:
          m_0 = qml.measure(0)
          qml.cond(~m_0, qml.RY)(first_par, wires=1)
          qml.apply(terminal_measurement)
  
      tape = qml.tape.QuantumScript.from_queue(q)
      tapes, _ = qml.defer_measurements(tape)
      tape = tapes[0]
      # Conditioned on 0 as the control value, PauliX is applied before and after
      assert len(tape.operations) == 1
      assert len(tape.measurements) == 1
  
      # Check the two underlying Controlled instance
      ctrl_op = tape.operations[0]
      assert isinstance(ctrl_op, qml.ops.op_math.Controlled)
      assert qml.equal(ctrl_op.base, qml.RY(first_par, 1))
  
      assert ctrl_op.wires == qml.wires.Wires([0, 1])
  
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 TestConditionalOperations obj's underlying member method code with example usage: obj.test_correct_ops_in_tape_inversion() without return types