English
Languages
English
Shortcuts



GraphPartition

class GraphPartition(graph)[source]

Bases: qiskit_optimization.applications.graph_optimization_application.GraphOptimizationApplication

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

References

[1]: “Graph partition”, https://en.wikipedia.org/wiki/Graph_partition

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

interpret(result)

Interpret a result as a list of node indices

to_quadratic_program()

Convert a graph partition instance into a QuadraticProgram