iqm.benchmarks.entanglement.graph_states.generate_minimal_edge_layers

iqm.benchmarks.entanglement.graph_states.generate_minimal_edge_layers#

iqm.benchmarks.entanglement.graph_states.generate_minimal_edge_layers(cp_map: CouplingMap) dict[int, list[list[int]]]#

Sorts the edges of a coupling map.

The edges are arranged in a dictionary with values being subsets of the coupling map with no overlapping nodes. Each item will correspond to a layer of pairs of qubits in which parallel 2Q gates can be applied.

Parameters:

cp_map (CouplingMap) – A list of lists of pairs of integers, representing a coupling map.

Returns:

A dictionary with values being subsets of the coupling map with no overlapping nodes.

Return type:

dict[int, list[list[int]]]