find_edge_coloring

find_edge_coloring#

iqm.qaoa.transpiler.sparse.edge_coloring.find_edge_coloring(input_graph)[source]#

This function finds an edge coloring for the given graph.

It iterates over the graph edges and colors each one using elaborate helper functions. It modifies input_graph by adding an attribute color to every edge, given by an integer number.

Parameters:

input_graph (Graph) – The Graph to be edge-colored.

Returns:

  1. A list whose i-th entry contains the set of edges colored by the i-th color.

  2. A colored copy of the input input_graph.

Return type:

A tuple containing