qiskit.optimization.applications.ising.max_cut¶
Convert max-cut instances into Pauli list Deal with Gset format. See https://web.stanford.edu/~yyye/yyye/Gset/ Design the max-cut object w as a two-dimensional np.array e.g., w[i, j] = x means that the weight of a edge between i and j is x Note that the weights are symmetric, i.e., w[j, i] = x always holds.
Functions
Get graph solution from binary string. |
|
|
Generate Hamiltonian for the max-cut problem of a graph. |
|
Compute the value of a cut. |
- get_graph_solution(x)[source]¶
Get graph solution from binary string.
- Parameters
x (numpy.ndarray) – binary string as numpy array.
- Returns
graph solution as binary numpy array.
- Return type
numpy.ndarray