iqm.qaoa.transpiler.sparse.edge_coloring

iqm.qaoa.transpiler.sparse.edge_coloring#

The module for the edge-coloring of the graph.

This file contains code to find the edge coloring of an arbitrary simple graph according to the program defined in [5]. Almost all functions in this file are helper functions. Only find_edge_coloring() is intended for external use. The function plot_edge_coloring() may be used for debugging purposes.

Functions

ec_is_complete(graph)

Check that a graph's edge coloring is complete.

ec_is_valid(graph)

Check that a graph's edge coloring is valid.

find_edge_coloring(input_graph)

This function finds an edge coloring for the given graph.

plot_edge_coloring(graph[, pos, ...])

A method that plots the edge coloring of a graph.