flamingpy.utils.viz.draw_dec_graph

flamingpy.utils.viz.draw_dec_graph(graph, label_edges=False, node_labels=None, title='')[source]

Draw a stabilizer or matching graph with a color legend.

This requires that the graph is implemented with the NetworkX backend.

Parameters
  • graph (NxStabilizerGraph or NxMatchingGraph) – the graph to draw.

  • label_edges (bool, optional) – if True, label the edges of the graph with their weight. Defaults to False.

  • node_labels (dict of node to label, optional) – if provided, the nodes will be identified with the given labels. Else, there will be no label for the nodes.

  • title (string, optional) – add the given title to the plot.

Contents

Home

Background

Using FlamingPy

Development

Getting Help

Python API