From 26d66949d6d49045c47a8ee508de0b6fe4afe07d Mon Sep 17 00:00:00 2001 From: Apostolos Chalkis Date: Tue, 8 Oct 2024 16:51:30 +0300 Subject: [PATCH] fix bug in max-cut solver (issue #611) --- qiskit_optimization/applications/max_cut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiskit_optimization/applications/max_cut.py b/qiskit_optimization/applications/max_cut.py index 9d9bc5371..e7a9e79e0 100644 --- a/qiskit_optimization/applications/max_cut.py +++ b/qiskit_optimization/applications/max_cut.py @@ -117,7 +117,7 @@ def parse_gset_format(filename: str) -> np.ndarray: s__, t__, _ = v s__ -= 1 # adjust 1-index t__ -= 1 # ditto - w[s__, t__] = t__ + w[s__, t__] = _ count += 1 assert m == count w += w.T