Skip to content

Commit 375e231

Browse files
Optimize dense solvers
1 parent 4d10c8e commit 375e231

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "pyqrackising"
10-
version = "9.16.0"
10+
version = "9.16.1"
1111
requires-python = ">=3.8"
1212
description = "Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)"
1313
readme = {file = "README.txt", content-type = "text/markdown"}

pyqrackising/maxcut_tfim.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@
3737
def update_repulsion_choice(G_m, weights, n, used, node, repulsion_base):
3838
# Select node
3939
used[node] = True
40+
weights[node] = 0.0
4041

4142
if abs(1.0 - repulsion_base) <= epsilon:
4243
return
4344

4445
# Repulsion: penalize neighbors
45-
for nbr in range(n):
46-
if used[nbr]:
47-
continue
48-
weights[nbr] *= repulsion_base ** (-G_m[node, nbr])
46+
weights *= repulsion_base ** (-G_m[node])
4947

5048

5149
# Written by Elara (OpenAI custom GPT) and improved by Dan Strano

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="pyqrackising",
10-
version="9.16.0",
10+
version="9.16.1",
1111
author="Dan Strano",
1212
author_email="stranoj@gmail.com",
1313
description="Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)",

0 commit comments

Comments
 (0)