finesse.graph.operator_graph.OperatorGraph.to_networkx

OperatorGraph.to_networkx(self, ignore_nodes=None)

Convert the graph to a NetworkX MultiDiGraph.

This method converts the current graph to a NetworkX MultiDiGraph. If ignore_nodes is provided, any edges involving nodes in ignore_nodes are not included in the resulting MultiDiGraph.

Parameters
ignore_nodesiterable of int, optional

An iterable of node indices to ignore. If provided, any edges involving these nodes are not included in the resulting MultiDiGraph. By default, no nodes are ignored.

Returns
networkx.MultiDiGraph

The NetworkX MultiDiGraph representation of the current graph.