Warning
The documentation for retworkx has migrated to:
https://qiskit.org/documentation/retworkx
These docs will no longer be updated.
retworkx.is_isomorphic_node_match¶
- is_isomorphic_node_match(first, second, matcher, /)¶
Determine if 2 DAGs are isomorphic
This checks if 2 graphs are isomorphic both structurally and also comparing the node data using the provided matcher function. The matcher function takes in 2 node data objects and will compare them. A simple example that checks if they’re just equal would be:
graph_a = retworkx.PyDAG() graph_b = retworkx.PyDAG() retworkx.is_isomorphic_node_match(graph_a, graph_b, lambda x, y: x == y)
- Parameters
- Returns
True
if the 2 graphs are isomorphicFalse
if they are not.- Return type
bool