PyQrackIsing 5.7.2__tar.gz → 5.7.3__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-5.7.2/pyqrackising.egg-info → pyqrackising-5.7.3}/PKG-INFO +1 -1
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyproject.toml +1 -1
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/kernels.cl +4 -2
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/spin_glass_solver.py +3 -1
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/spin_glass_solver_sparse.py +3 -1
- {pyqrackising-5.7.2 → pyqrackising-5.7.3/pyqrackising.egg-info}/PKG-INFO +1 -1
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/setup.py +1 -1
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/CMakeLists.txt +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/LICENSE.md +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/MANIFEST.in +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/README.md +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/__init__.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/_pyqrack_ising.cpp +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/generate_tfim_samples.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/maxcut_tfim.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/maxcut_tfim_sparse.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/maxcut_tfim_streaming.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/maxcut_tfim_util.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/spin_glass_solver_streaming.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/spin_glass_solver_util.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/tfim_magnetization.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/tfim_square_magnetization.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising/tsp.py +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising.egg-info/SOURCES.txt +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising.egg-info/dependency_links.txt +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising.egg-info/not-zip-safe +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/pyqrackising.egg-info/top_level.txt +0 -0
- {pyqrackising-5.7.2 → pyqrackising-5.7.3}/setup.cfg +0 -0
|
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
|
|
|
12
12
|
|
|
13
13
|
[project]
|
|
14
14
|
name = "pyqrackising"
|
|
15
|
-
version = "5.7.
|
|
15
|
+
version = "5.7.3"
|
|
16
16
|
requires-python = ">=3.8"
|
|
17
17
|
description = "Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)"
|
|
18
18
|
readme = {file = "README.txt", content-type = "text/markdown"}
|
|
@@ -131,6 +131,8 @@ float bootstrap_worker(__constant char* theta, __global double* G_m, __constant
|
|
|
131
131
|
return (float)energy;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
#define ENERGY_EPSILON 2e-23
|
|
135
|
+
|
|
134
136
|
__kernel void bootstrap(
|
|
135
137
|
uint prng_seed,
|
|
136
138
|
__global double* G_m,
|
|
@@ -174,7 +176,7 @@ __kernel void bootstrap(
|
|
|
174
176
|
if (hid_energy < lid_energy) {
|
|
175
177
|
loc_energy[lt_id] = hid_energy;
|
|
176
178
|
loc_index[lt_id] = loc_index[lt_id + offset];
|
|
177
|
-
} else if ((hid_energy
|
|
179
|
+
} else if (((hid_energy - lid_energy) <= ENERGY_EPSILON) && ((xorshift32(&prng_seed) >> 31) & 1)) {
|
|
178
180
|
loc_index[lt_id] = loc_index[lt_id + offset];
|
|
179
181
|
}
|
|
180
182
|
}
|
|
@@ -259,7 +261,7 @@ __kernel void bootstrap_sparse(
|
|
|
259
261
|
if (hid_energy < lid_energy) {
|
|
260
262
|
loc_energy[lt_id] = hid_energy;
|
|
261
263
|
loc_index[lt_id] = loc_index[lt_id + offset];
|
|
262
|
-
} else if ((hid_energy
|
|
264
|
+
} else if (((hid_energy - lid_energy) <= ENERGY_EPSILON) && ((xorshift32(&prng_seed) >> 31) & 1)) {
|
|
263
265
|
loc_index[lt_id] = loc_index[lt_id + offset];
|
|
264
266
|
}
|
|
265
267
|
}
|
|
@@ -124,7 +124,9 @@ def run_bootstrap_opencl(best_theta, G_m_buf, indices_array_np, k, min_energy):
|
|
|
124
124
|
if min_energy < energy:
|
|
125
125
|
return min_energy
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
ENERGY_EPSILON = 2e-23
|
|
128
|
+
choices = np.where(abs(min_energy_host - energy) <= ENERGY_EPSILON)[0]
|
|
129
|
+
best_i = np.random.choice(choices) if len(choices) else np.argmin(min_energy_host)
|
|
128
130
|
|
|
129
131
|
flip_index_start = best_i * k
|
|
130
132
|
indices_to_flip = indices_array_np[flip_index_start : flip_index_start + k]
|
|
@@ -129,7 +129,9 @@ def run_bootstrap_opencl(best_theta, G_data_buf, G_rows_buf, G_cols_buf, indices
|
|
|
129
129
|
if min_energy < energy:
|
|
130
130
|
return min_energy
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
ENERGY_EPSILON = 2e-23
|
|
133
|
+
choices = np.where(abs(min_energy_host - energy) <= ENERGY_EPSILON)[0]
|
|
134
|
+
best_i = np.random.choice(choices) if len(choices) else np.argmin(min_energy_host)
|
|
133
135
|
|
|
134
136
|
flip_index_start = best_i * k
|
|
135
137
|
indices_to_flip = indices_array_np[flip_index_start : flip_index_start + k]
|
|
@@ -51,7 +51,7 @@ ext_modules = [CMakeExtension('tfim_sampler')]
|
|
|
51
51
|
|
|
52
52
|
setup(
|
|
53
53
|
name='pyqrackising',
|
|
54
|
-
version='5.7.
|
|
54
|
+
version='5.7.3',
|
|
55
55
|
author='Dan Strano',
|
|
56
56
|
author_email='stranoj@gmail.com',
|
|
57
57
|
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
|
|
File without changes
|
|
File without changes
|