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: Depth of the quantum circuit (longest path in the DAG).
docstr_tok: ["Depth","of","the","quantum","circuit","(","longest","path","in","the","DAG",")","."]
code: def get_depth(self):
      """Depth of the quantum circuit (longest path in the DAG)."""
      # If there are no operations in the circuit, the depth is 0
      if not self.operations:
          self._depth = 0
  
      # If there are operations but depth is uncomputed, compute the truncated graph
      # with only the operations, and return the longest path + 1 (since the path is
      # expressed in terms of edges, and we want it in terms of nodes).
      if self._depth is None and self.operations:
          if self._operation_graph is None:
              self._operation_graph = self._graph.subgraph(
                  list(
                      self._indices[id(node)]
                      for node in self.operations
                  )
              )
              self._extend_graph(self._operation_graph)
              self._depth = (
                  rx.dag_longest_path_length(
                      self._operation_graph,
                      weight_fn=lambda _, __, w: self._weight_func(w),
                  )
                  + 1
              )
      return self._depth
  
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 20 for calling the CircuitGraph obj's underlying member method code with example usage: obj.get_depth() and returns: self