class_docstr: A Conditional Operation.
  
  Unless you are a Pennylane plugin developer, **you should NOT directly use this class**,
  instead, use the :func:`qml.cond <.cond>` function.
  
  The ``Conditional`` class is a container class that defines an operation
  that should by applied relative to a single measurement value.
  
  Support for executing ``Conditional`` operations is device-dependent. If a
  device doesn't support mid-circuit measurements natively, then the QNode
  will apply the :func:`defer_measurements` transform.
  
  Args:
      expr (MeasurementValue): the measurement outcome value to consider
      then_op (Operation): the PennyLane operation to apply conditionally
      id (str): custom label given to an operator instance,
          can be useful for some applications where the instance has to be identified
class_docstr_tok: ["A","Conditional","Operation",".","Unless","you","are","a","Pennylane","plugin","developer",",","*","*","you","should","NOT","directly","use","this","class","*","*",",","instead",",","use","the",":","func",":","`","qml.cond","<",".cond",">","`","function",".","The","``","Conditional","``","class","is","a","container","class","that","defines","an","operation","that","should","by","applied","relative","to","a","single","measurement","value",".","Support","for","executing","``","Conditional","``","operations","is","device-dependent",".","If","a","device","does","n't","support","mid-circuit","measurements","natively",",","then","the","QNode","will","apply","the",":","func",":","`","defer_measurements","`","transform",".","Args",":","expr","(","MeasurementValue",")",":","the","measurement","outcome","value","to","consider","then_op","(","Operation",")",":","the","PennyLane","operation","to","apply","conditionally","id","(","str",")",":","custom","label","given","to","an","operator","instance",",","can","be","useful","for","some","applications","where","the","instance","has","to","be","identified"]
code: def __init__(self, expr, then_op: Type[Operation], id=None):
      self.meas_val = expr
      self.then_op = then_op
      super().__init__(wires=then_op.wires, id=id)
  
file_path: pennylane/pennylane/ops/op_math/condition.py
imports: from functools import wraps
  from typing import Type
  from pennylane import QueuingManager
  from pennylane.operation import AnyWires, Operation, Operator
  from pennylane.tape import make_qscript
  from pennylane.compiler import compiler
label_desc: Use image node_id 1 to create a new Conditional object from inherited base classes: Operation with example: obj = Conditional(expr, then_op, id)