finesse.graph.operator_graph.OperatorGraph.remove_edge

OperatorGraph.remove_edge(self, from_node, to_node)

Remove an edge from the graph.

This method removes an edge from from_node to to_node in the graph. If the edge does not exist in the graph, or if an error occurs while removing the edge, an exception is raised.

Linear operator names and IDs associated with this edge are not removed from the graph when an edge is removed. See .operator_indices for a mapping of operator names to operator IDs and .indices_operator_names for a mapping of operator IDs to operator names.

Parameters
from_nodeint

The index of the node where the edge starts.

to_nodeint

The index of the node where the edge ends.

Raises
Exception

If the edge does not exist in the graph, or if an error occurs while removing the edge.