branch(nodes: Iterable[tensornetwork.network_components.AbstractNode], output_edge_order: Optional[Sequence[tensornetwork.network_components.Edge]] = None, memory_limit: Optional[int] = None, nbranch: Optional[int] = None, ignore_edge_order: bool = False) → tensornetwork.network_components.AbstractNode¶
Branch contraction path via
This method uses the DFS approach of
optimalwhile sorting potential contractions based on a heuristic cost, in order to reduce time spent in exploring paths which are unlikely to be optimal. More details on branching path.
- nodes – an iterable of Nodes
- output_edge_order – An optional list of edges.
Edges of the final node in
nodes_setare reordered into
output_edge_order; if final node has more than one edge,
output_edge_ordermust be provided.
- memory_limit – Maximum number of elements in an array during contractions.
- nbranch – Number of best contractions to explore. If None it explores all inner products starting with those that have the best cost heuristic.
- ignore_edge_order – An option to ignore the output edge order.
The final node after full contraction.