class_docstr: Tests conditional operations
docstr: Test that an else operation can also defined using qml.cond.
docstr_tok: ["Test","that","an","else","operation","can","also","defined","using","qml.cond","."]
code: def test_conditional_rotations_with_else(self, device):
      """Test that an else operation can also defined using qml.cond."""
      dev = qml.device(device, wires=3)
      r = 2.345
  
      op1, controlled_op1 = qml.RY, qml.CRY
      op2, controlled_op2 = qml.RX, qml.CRX
  
      @qml.qnode(dev)
      def normal_circuit(rads):
          qml.Hadamard(0)
          controlled_op1(rads, wires=[0, 1])
  
          qml.PauliX(0)
          controlled_op2(rads, wires=[0, 1])
          qml.PauliX(0)
          return qml.probs(wires=1)
  
      @qml.qnode(dev)
      @qml.defer_measurements
      def quantum_control_circuit(rads):
          qml.Hadamard(0)
          m_0 = qml.measure(0)
          qml.cond(m_0, op1, op2)(rads, wires=1)
          return qml.probs(wires=1)
  
      exp = normal_circuit(r)
      cond_probs = quantum_control_circuit(r)
  
      assert np.allclose(exp, cond_probs)
  
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 9 for calling the TestConditionalOperations obj's underlying member method code with example usage: obj.test_conditional_rotations_with_else(device) and returns: qml, qml