class_docstr: Represents a quantum circuit as a directed acyclic graph.
  
  In this representation the :class:`~.Operator` instances are the nodes of the graph,
  and each directed edge represent a subsystem (or a group of subsystems) on which the two
  Operators act subsequently. This representation can describe the causal relationships
  between arbitrary quantum channels and measurements, not just unitary gates.
  
  Args:
      ops (Iterable[.Operator]): quantum operators constituting the circuit, in temporal order
      obs (Iterable[.MeasurementProcess]): terminal measurements, in temporal order
      wires (.Wires): The addressable wire registers of the device that will be executing this graph
      par_info (list[dict]): Parameter information. For each index, the entry is a dictionary containing an operation
      and an index into that operation's parameters.
      trainable_params (set[int]): A set containing the indices of parameters that support
          differentiability. The indices provided match the order of appearence in the
          quantum circuit.
class_docstr_tok: ["Represents","a","quantum","circuit","as","a","directed","acyclic","graph",".","In","this","representation","the",":","class",":","`","~.Operator","`","instances","are","the","nodes","of","the","graph",",","and","each","directed","edge","represent","a","subsystem","(","or","a","group","of","subsystems",")","on","which","the","two","Operators","act","subsequently",".","This","representation","can","describe","the","causal","relationships","between","arbitrary","quantum","channels","and","measurements",",","not","just","unitary","gates",".","Args",":","ops","(","Iterable","[",".Operator","]",")",":","quantum","operators","constituting","the","circuit",",","in","temporal","order","obs","(","Iterable","[",".MeasurementProcess","]",")",":","terminal","measurements",",","in","temporal","order","wires","(",".Wires",")",":","The","addressable","wire","registers","of","the","device","that","will","be","executing","this","graph","par_info","(","list","[","dict","]",")",":","Parameter","information",".","For","each","index",",","the","entry","is","a","dictionary","containing","an","operation","and","an","index","into","that","operation","'s","parameters",".","trainable_params","(","set","[","int","]",")",":","A","set","containing","the","indices","of","parameters","that","support","differentiability",".","The","indices","provided","match","the","order","of","appearence","in","the","quantum","circuit","."]
docstr: Returns the maximum number of measurements on any wire in the circuit graph.
  
  This method counts the number of measurements for each wire and returns
  the maximum.
  
  **Examples**
  
  
  >>> dev = qml.device('default.qubit', wires=3)
  >>> def circuit_measure_max_once():
  ...     return qml.expval(qml.PauliX(wires=0))
  >>> qnode = qml.QNode(circuit_measure_max_once, dev)
  >>> qnode()
  >>> qnode.qtape.graph.max_simultaneous_measurements
  1
  >>> def circuit_measure_max_twice():
  ...     return qml.expval(qml.PauliX(wires=0)), qml.probs(wires=0)
  >>> qnode = qml.QNode(circuit_measure_max_twice, dev)
  >>> qnode()
  >>> qnode.qtape.graph.max_simultaneous_measurements
  2
  
  Returns:
      int: the maximum number of measurements
docstr_tok: ["Returns","the","maximum","number","of","measurements","on","any","wire","in","the","circuit","graph",".","This","method","counts","the","number","of","measurements","for","each","wire","and","returns","the","maximum",".","*","*","Examples","*","*",">",">",">","dev","=","qml.device","(","'default.qubit","'",",","wires=3",")",">",">",">","def","circuit_measure_max_once","(",")",":","...","return","qml.expval","(","qml.PauliX","(","wires=0",")",")",">",">",">","qnode","=","qml.QNode","(","circuit_measure_max_once",",","dev",")",">",">",">","qnode","(",")",">",">",">","qnode.qtape.graph.max_simultaneous_measurements","1",">",">",">","def","circuit_measure_max_twice","(",")",":","...","return","qml.expval","(","qml.PauliX","(","wires=0",")",")",",","qml.probs","(","wires=0",")",">",">",">","qnode","=","qml.QNode","(","circuit_measure_max_twice",",","dev",")",">",">",">","qnode","(",")",">",">",">","qnode.qtape.graph.max_simultaneous_measurements","2","Returns",":","int",":","the","maximum","number","of","measurements"]
code: def max_simultaneous_measurements(self):
      """Returns the maximum number of measurements on any wire in the circuit graph.
  
      This method counts the number of measurements for each wire and returns
      the maximum.
  
      **Examples**
  
  
      >>> dev = qml.device('default.qubit', wires=3)
      >>> def circuit_measure_max_once():
      ...     return qml.expval(qml.PauliX(wires=0))
      >>> qnode = qml.QNode(circuit_measure_max_once, dev)
      >>> qnode()
      >>> qnode.qtape.graph.max_simultaneous_measurements
      1
      >>> def circuit_measure_max_twice():
      ...     return qml.expval(qml.PauliX(wires=0)), qml.probs(wires=0)
      >>> qnode = qml.QNode(circuit_measure_max_twice, dev)
      >>> qnode()
      >>> qnode.qtape.graph.max_simultaneous_measurements
      2
  
      Returns:
          int: the maximum number of measurements
      """
      if self._max_simultaneous_measurements is None:
          all_wires = []
  
          for obs in self.observables:
              all_wires.extend(obs.wires.tolist())
  
          a = np.array(all_wires)
          _, counts = np.unique(a, return_counts=True)
          self._max_simultaneous_measurements = (
              counts.max() if counts.size != 0 else 1
          )  # qml.state() will result in an empty array
      return self._max_simultaneous_measurements
  
imports: from numbers import Number
  from collections import namedtuple
  import numpy
  import rustworkx
  from pennylane.measurements import MeasurementProcess
  from pennylane.resource import ResourcesOperation
label_desc: Use image node_id 24 for calling the CircuitGraph obj's underlying member method code with example usage: obj.max_simultaneous_measurements() and returns: self