Skip to content

Commit 84cabb7

Browse files
...(Including human copy/paste)
1 parent c340f34 commit 84cabb7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pyqrackising/solve_maxcut_exact_sparse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@ def solve_maxcut_exact_sparse(
375375

376376
best_theta = np.array([b == "1" for b in list(bitstring)], dtype=np.bool_)
377377
if is_spin_glass:
378-
max_energy = compute_energy(best_theta, G_m, n_qubits)
378+
max_energy = compute_energy_sparse(best_theta, G_m.data, G_m.indptr, G_m.indices, n_qubits)
379379
elif cut_value is None:
380-
max_energy = compute_cut(best_theta, G_m, n_qubits)
380+
max_energy = compute_cut_sparse(best_theta, G_m.data, G_m.indptr, G_m.indices, n_qubits)
381381
else:
382382
max_energy = cut_value
383383

pyqrackising/solve_maxcut_exact_streaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,9 @@ def solve_maxcut_exact_streaming(
331331

332332
best_theta = np.array([b == "1" for b in list(bitstring)], dtype=np.bool_)
333333
if is_spin_glass:
334-
max_energy = compute_energy(best_theta, G_m, n_qubits)
334+
max_energy = compute_energy_streaming(best_theta, G_func, nodes, n_qubits)
335335
elif cut_value is None:
336-
max_energy = compute_cut(best_theta, G_m, n_qubits)
336+
max_energy = compute_cut_streaming(best_theta, G_func, nodes, n_qubits)
337337
else:
338338
max_energy = cut_value
339339

0 commit comments

Comments
 (0)