def depth(self): """Return the circuit depth.""" assert nx.is_directed_acyclic_graph(self.multi_graph), "not a DAG" return nx.dag_longest_path_length(self.multi_graph) - 1