Skip to main content
IBM Quantum Platform

samplomatic.graph_utils

Graph Utilities


Functions

Column 1
Column 2
find_unreachable_nodes(graph, start_idxs)Find all nodes from the graph that are not reachable from the start nodes.
get_clusters(graph, filter_fn)Yield lists of nodes that all pass the filter and are connected in the graph.
replace_edges_with_one_edge(graph, ...)Replace all the parallel edges between two nodes with a single edge.
replace_nodes_with_one_node(graph, ...)Replace given nodes with a single node, preserving all outward/inward edges.

Classes

Column 1
Column 2
NodeCandidate(graph, node)A node that we want to add to the graph, but not yet.
Was this page helpful?
Report a bug, typo, or request content on GitHub.