exa.core.util.topology.get_matching_from_morphisms

exa.core.util.topology.get_matching_from_morphisms#

get_matching_from_morphisms(morphisms, layout_graph)#

Convert morphisms into matching.

Relies on the order of the nodes in the graph being fixed.

For each mapping, create a tuple of physical components in the order of nodes in the layout graph they correspond to.

Parameters:
  • morphisms (list[dict[str, Any]]) – list of mappings of physical qubits to graph labels.

  • layout_graph (Graph) – graph representing the circuit connectivity.

Returns:

Matching of hyperedges.

Return type:

list[tuple[str, …]]