class_docstr: Tests conditional operations
docstr: Test that the defer_measurements transform works with
  qml.Hermitian.
docstr_tok: ["Test","that","the","defer_measurements","transform","works","with","qml.Hermitian","."]
code: def test_hermitian_queued(self):
      """Test that the defer_measurements transform works with
      qml.Hermitian."""
      rads = 0.3
  
      mat = np.eye(8)
      measurement = qml.expval(qml.Hermitian(mat, wires=[3, 1, 2]))
  
      with qml.queuing.AnnotatedQueue() as q:
          m_0 = qml.measure(0, reset=True)
          qml.cond(m_0, qml.RY)(rads, wires=4)
          qml.apply(measurement)
  
      tape = qml.tape.QuantumScript.from_queue(q)
      tapes, _ = qml.defer_measurements(tape)
      tape = tapes[0]
  
      assert len(tape.operations) == 3
      assert len(tape.measurements) == 1
  
      # Check the underlying CNOT for storing measurement state
      meas_op1 = tape.operations[0]
      assert isinstance(meas_op1, qml.CNOT)
      assert meas_op1.wires == qml.wires.Wires([0, 5])
  
      # Check the underlying CNOT for reseting measured wire
      meas_op1 = tape.operations[1]
      assert isinstance(meas_op1, qml.CNOT)
      assert meas_op1.wires == qml.wires.Wires([5, 0])
  
      # Check the underlying Controlled instances
      first_ctrl_op = tape.operations[2]
      assert isinstance(first_ctrl_op, qml.ops.op_math.Controlled)
      assert qml.equal(first_ctrl_op.base, qml.RY(rads, 4))
  
      assert len(tape.measurements) == 1
      assert qml.equal(tape.measurements[0], measurement)
  
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 6 for calling the TestConditionalOperations obj's underlying member method code with example usage: obj.test_hermitian_queued() without return types