iqm.benchmarks.optimization.qscore.cut_cost_function

iqm.benchmarks.optimization.qscore.cut_cost_function#

iqm.benchmarks.optimization.qscore.cut_cost_function(x: str, graph: Graph) int#

Returns the number of cut edges in a graph (with minus sign).

Parameters:
  • x (str) – solution bitstring.

  • graph (networkx graph) – the MaxCut problem graph.

Returns:

number of cut edges multiplied by -1.

Return type:

obj (float)