StableSet¶

class
StableSet
(graph)[source]¶ Bases:
qiskit_optimization.applications.graph_optimization_application.GraphOptimizationApplication
Optimization application for the “stable set” [1] problem based on a NetworkX graph.
References
[1]: “Independent set (graph theory)”, https://en.wikipedia.org/wiki/Independent_set_(graph_theory)
 Parameters
graph (
Union
[Graph
,ndarray
,List
]) – A graph representing a problem. It can be specified directly as aGraph (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
Convert a stable set instance into a
QuadraticProgram