English
Languages
English
Shortcuts



Maxcut

class Maxcut(graph)[source]

Bases: qiskit_optimization.applications.graph_optimization_application.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

  • Graph (NetworkX) –

  • as an array or list if format suitable to build out a NetworkX graph. (or) –

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