PyQrackIsing 1.15.0__tar.gz → 1.16.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-1.15.0/PyQrackIsing.egg-info → pyqrackising-1.16.0}/PKG-INFO +1 -1
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/maxcut_tfim.py +5 -5
- {pyqrackising-1.15.0 → pyqrackising-1.16.0/PyQrackIsing.egg-info}/PKG-INFO +1 -1
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/README.md +1 -1
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/pyproject.toml +1 -1
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/setup.py +1 -1
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/CMakeLists.txt +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/LICENSE.md +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/MANIFEST.in +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/__init__.py +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/_pyqrack_ising.cpp +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/generate_tfim_samples.py +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/spin_glass_solver.py +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/tfim_magnetization.py +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/tfim_square_magnetization.py +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing/tsp_symmetric.py +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing.egg-info/SOURCES.txt +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing.egg-info/dependency_links.txt +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing.egg-info/not-zip-safe +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/PyQrackIsing.egg-info/top_level.txt +0 -0
- {pyqrackising-1.15.0 → pyqrackising-1.16.0}/setup.cfg +0 -0
|
@@ -102,8 +102,8 @@ def maxcut_hamming_cdf(n_qubits, J_func, degrees, quality, hamming_prob):
|
|
|
102
102
|
|
|
103
103
|
n_steps = 1 << quality
|
|
104
104
|
delta_t = 1.0 / n_steps
|
|
105
|
-
tot_t = n_steps * delta_t
|
|
106
|
-
h_mult =
|
|
105
|
+
tot_t = 64.0 * n_steps * delta_t
|
|
106
|
+
h_mult = 64.0 / tot_t
|
|
107
107
|
n_bias = n_qubits - 1
|
|
108
108
|
|
|
109
109
|
theta = np.zeros(n_qubits)
|
|
@@ -351,7 +351,7 @@ def maxcut_tfim(
|
|
|
351
351
|
group_size = n_qubits - 1
|
|
352
352
|
|
|
353
353
|
if quality is None:
|
|
354
|
-
quality =
|
|
354
|
+
quality = 9
|
|
355
355
|
|
|
356
356
|
if shots is None:
|
|
357
357
|
# Number of measurement shots
|
|
@@ -368,8 +368,8 @@ def maxcut_tfim(
|
|
|
368
368
|
|
|
369
369
|
if IS_CUDA_AVAILABLE and cuda.is_available() and grid_size >= 128:
|
|
370
370
|
delta_t = 1.0 / n_steps
|
|
371
|
-
tot_t = n_steps * delta_t
|
|
372
|
-
h_mult =
|
|
371
|
+
tot_t = 64.0 * n_steps * delta_t
|
|
372
|
+
h_mult = 64.0 / tot_t
|
|
373
373
|
theta = init_theta(delta_t, tot_t, h_mult, n_qubits, J_eff, degrees)
|
|
374
374
|
|
|
375
375
|
cuda_maxcut_hamming_cdf[grid_dims, group_size](delta_t, tot_t, h_mult, J_eff, degrees, theta, thresholds)
|
|
@@ -49,7 +49,7 @@ G = nx.petersen_graph()
|
|
|
49
49
|
best_solution_bit_string, best_cut_value, best_node_groups = maxcut_tfim(G, quality=8)
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
The (integer) `quality` setting is optional, with a default value of `
|
|
52
|
+
The (integer) `quality` setting is optional, with a default value of `9`, but you can turn it up for higher-quality results, or turn it down to save time. (You can also optionally specify the number of measurement `shots` as an argument, if you want specific fine-grained control over resource usage.) If you want to run MAXCUT on a graph with non-uniform edge weights, specify them as the `weight` attribute of each edge, with `networkx`. (If any `weight` attribute is not defined, the solver assumes it's `1.0` for that edge.)
|
|
53
53
|
|
|
54
54
|
Based on a combination of the TFIM-inspired MAXCUT solver and another technique for finding ground-state energy in quantum chemistry that we call the _"binary Clifford eigensolver,"_ we also provide an (approximate) spin glass ground-state solver:
|
|
55
55
|
```py
|
|
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
|
|
|
12
12
|
|
|
13
13
|
[project]
|
|
14
14
|
name = "PyQrackIsing"
|
|
15
|
-
version = "1.
|
|
15
|
+
version = "1.16.0"
|
|
16
16
|
requires-python = ">=3.8"
|
|
17
17
|
description = "Near-ideal closed-form solutions for transverse field Ising model (TFIM)"
|
|
18
18
|
readme = {file = "README.txt", content-type = "text/markdown"}
|
|
@@ -51,7 +51,7 @@ ext_modules = [CMakeExtension('tfim_sampler')]
|
|
|
51
51
|
|
|
52
52
|
setup(
|
|
53
53
|
name='PyQrackIsing',
|
|
54
|
-
version='1.
|
|
54
|
+
version='1.16.0',
|
|
55
55
|
author='Dan Strano',
|
|
56
56
|
author_email='stranoj@gmail.com',
|
|
57
57
|
description='Near-ideal closed-form solutions for 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
|