class_docstr: Test Conditionals that rely on expressions of mid-circuit measurements.
docstr: Test that combining the results of three mid-circuit measurements works as expected.
docstr_tok: ["Test","that","combining","the","results","of","three","mid-circuit","measurements","works","as","expected","."]
code: def test_triple_measurement_condition_expression(self, r):
      """Test that combining the results of three mid-circuit measurements works as expected."""
      dev = qml.device("default.qubit", wires=7)
  
      @qml.qnode(dev)
      @qml.defer_measurements
      def normal_circuit(rads):
          qml.RX(2.4, wires=0)
          qml.RY(1.3, wires=1)
          qml.RX(1.7, wires=2)
          qml.CNOT(wires=[0, 1])
          qml.CNOT(wires=[1, 2])
          qml.CNOT(wires=[0, 2])
  
          qml.ctrl(qml.RX, (0, 1, 2), [False, True, True])(
              rads, wires=3
          )
  
          return qml.probs(wires=3)
  
      @qml.qnode(dev)
      @qml.defer_measurements
      def quantum_control_circuit(rads):
          qml.RX(2.4, wires=0)
          qml.RY(1.3, wires=1)
          qml.RX(1.7, wires=2)
          qml.CNOT(wires=[0, 1])
          qml.CNOT(wires=[1, 2])
          qml.CNOT(wires=[0, 2])
          m_0 = qml.measure(0)
          m_1 = qml.measure(1)
          m_2 = qml.measure(2)
  
          expression = 4 * m_0 + 2 * m_1 + m_2
          qml.cond(expression == 3, qml.RX)(rads, wires=3)
          return qml.probs(wires=3)
  
      normal_probs = normal_circuit(r)
      cond_probs = quantum_control_circuit(r)
  
      assert np.allclose(normal_probs, 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 2 for calling the TestExpressionConditionals obj's underlying member method code with example usage: obj.test_triple_measurement_condition_expression(r) and returns: qml, qml