English
Languages
English
Bengali
Japanese
Spanish



Maxcut

class Maxcut(graph)[source]

Bases: GraphOptimizationApplication

Optimization application for the “max-cut” [1] problem based on a NetworkX graph.

References

[1]: “Maximum cut”, https://en.wikipedia.org/wiki/Maximum_cut

Parameters:

graph (Union[Graph, ndarray, List]) – A graph representing a problem. It can be specified directly as a NetworkX graph, or as an array or list format suitable to build out a NetworkX graph.

Attributes

Methods

get_gset_result(x)

Get graph solution in Gset format from binary string.

interpret(result)

Interpret a result as two lists of node indices

parse_gset_format(filename)

Read graph in Gset format from file.

to_quadratic_program()

Convert a Max-cut problem instance into a QuadraticProgram