def depth(self):
if not nx.is_directed_acyclic_graph(self._multi_graph):<EOL><INDENT>raise DAGCircuitError("<STR_LIT>")<EOL><DEDENT>depth = nx.dag_longest_path_length(self._multi_graph) - <NUM_LIT:1><EOL>return depth if depth != -<NUM_LIT:1> else <NUM_LIT:0><EOL>
Return the circuit depth.
        Returns:
            int: the circuit depth
        Raises:
            DAGCircuitError: if not a directed acyclic graph