problems.n_minus_1.io

This module provides functions to load and save graphs in various formats.

tno.quantum.problems.n_minus_1.io.load_gml(filename)[source]

Convert .gml file into a NetworkX graph.

Parameters:

filename (str | Path) – name or path of file to save it to.

Return type:

Graph

Returns:

A NetworkX graph.

tno.quantum.problems.n_minus_1.io.write_gml(graph, filepath, *, compressed=False)[source]

Write NetworkX graph into as a gml file.

Parameters:
  • graph (Graph) – graph of the system to convert

  • filepath (str | Path) – name or path of file to save it to

  • compressed (bool) – compress the save file

Return type:

None

Returns:

Written .gml file of graph object.