PyQrackIsing 9.5.12__tar.gz → 9.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyqrackising-9.5.12/pyqrackising.egg-info → pyqrackising-9.6.0}/PKG-INFO +1 -1
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyproject.toml +1 -1
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/maxcut_tfim.py +3 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/maxcut_tfim_sparse.py +3 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/maxcut_tfim_streaming.py +3 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/maxcut_tfim_util.py +9 -7
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/spin_glass_solver.py +1 -1
- {pyqrackising-9.5.12 → pyqrackising-9.6.0/pyqrackising.egg-info}/PKG-INFO +1 -1
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/setup.py +1 -1
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/LICENSE.md +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/MANIFEST.in +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/README.md +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/__init__.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/convert_tensor_network_to_tsp.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/generate_tfim_samples.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/kernels.cl +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/otoc.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/spin_glass_solver_sparse.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/spin_glass_solver_streaming.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/tfim_magnetization.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/tfim_square_magnetization.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/tsp.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising/tsp_maxcut.py +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising.egg-info/SOURCES.txt +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising.egg-info/dependency_links.txt +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising.egg-info/not-zip-safe +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/pyqrackising.egg-info/top_level.txt +0 -0
- {pyqrackising-9.5.12 → pyqrackising-9.6.0}/setup.cfg +0 -0
|
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
|
|
|
10
10
|
|
|
11
11
|
[project]
|
|
12
12
|
name = "pyqrackising"
|
|
13
|
-
version = "9.
|
|
13
|
+
version = "9.6.0"
|
|
14
14
|
requires-python = ">=3.8"
|
|
15
15
|
description = "Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)"
|
|
16
16
|
readme = {file = "README.txt", content-type = "text/markdown"}
|
|
@@ -22,6 +22,9 @@ def update_repulsion_choice(G_data, G_rows, G_cols, weights, n, used, node, repu
|
|
|
22
22
|
# Select node
|
|
23
23
|
used[node] = True
|
|
24
24
|
|
|
25
|
+
if abs(1.0 - repulsion_base) <= epsilon:
|
|
26
|
+
return
|
|
27
|
+
|
|
25
28
|
# Repulsion: penalize neighbors
|
|
26
29
|
for j in range(G_rows[node], G_rows[node + 1]):
|
|
27
30
|
nbr = G_cols[j]
|
|
@@ -392,17 +392,19 @@ def init_theta(h_mult, n_qubits, J_eff, degrees):
|
|
|
392
392
|
def init_thresholds(n_qubits):
|
|
393
393
|
n_bias = n_qubits + 1
|
|
394
394
|
thresholds = np.empty(n_bias, dtype=np.float64)
|
|
395
|
-
|
|
395
|
+
normalizer = 0
|
|
396
|
+
for q in range(n_qubits >> 1):
|
|
397
|
+
normalizer += math.comb(n_qubits, q) << 1
|
|
398
|
+
if n_qubits & 1:
|
|
399
|
+
normalizer += math.comb(n_qubits, n_qubits >> 1)
|
|
396
400
|
p = 1
|
|
397
401
|
for q in range(n_qubits >> 1):
|
|
398
|
-
|
|
399
|
-
thresholds[
|
|
400
|
-
|
|
402
|
+
val = p / normalizer
|
|
403
|
+
thresholds[q] = val
|
|
404
|
+
thresholds[n_bias - (q + 1)] = val
|
|
401
405
|
p = math.comb(n_qubits, q + 1)
|
|
402
406
|
if n_qubits & 1:
|
|
403
|
-
thresholds[n_qubits >> 1] = p
|
|
404
|
-
tot_prob += p
|
|
405
|
-
thresholds /= tot_prob
|
|
407
|
+
thresholds[n_qubits >> 1] = p / normalizer
|
|
406
408
|
|
|
407
409
|
return thresholds
|
|
408
410
|
|
|
@@ -308,7 +308,7 @@ def spin_glass_solver(
|
|
|
308
308
|
best_theta = np.array([b == "1" for b in list(bitstring)], dtype=np.bool_)
|
|
309
309
|
|
|
310
310
|
if gray_iterations is None:
|
|
311
|
-
gray_iterations = n_qubits * os.cpu_count()
|
|
311
|
+
gray_iterations = n_qubits * n_qubits * os.cpu_count()
|
|
312
312
|
|
|
313
313
|
if gray_seed_multiple is None:
|
|
314
314
|
gray_seed_multiple = os.cpu_count()
|
|
@@ -7,7 +7,7 @@ with open(README_PATH) as readme_file:
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name='pyqrackising',
|
|
10
|
-
version='9.
|
|
10
|
+
version='9.6.0',
|
|
11
11
|
author='Dan Strano',
|
|
12
12
|
author_email='stranoj@gmail.com',
|
|
13
13
|
description='Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|