PyQrackIsing 9.3.1__tar.gz → 9.3.2__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.3.1/pyqrackising.egg-info → pyqrackising-9.3.2}/PKG-INFO +1 -1
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyproject.toml +1 -1
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/generate_tfim_samples.py +1 -1
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/maxcut_tfim_util.py +2 -2
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/otoc.py +0 -4
- {pyqrackising-9.3.1 → pyqrackising-9.3.2/pyqrackising.egg-info}/PKG-INFO +1 -1
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/setup.py +1 -1
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/LICENSE.md +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/MANIFEST.in +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/README.md +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/__init__.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/convert_tensor_network_to_tsp.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/kernels.cl +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/maxcut_tfim.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/maxcut_tfim_sparse.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/maxcut_tfim_streaming.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/spin_glass_solver.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/spin_glass_solver_sparse.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/spin_glass_solver_streaming.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/tfim_magnetization.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/tfim_square_magnetization.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/tsp.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising/tsp_maxcut.py +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising.egg-info/SOURCES.txt +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising.egg-info/dependency_links.txt +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising.egg-info/not-zip-safe +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/pyqrackising.egg-info/top_level.txt +0 -0
- {pyqrackising-9.3.1 → pyqrackising-9.3.2}/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.3.
|
|
13
|
+
version = "9.3.2"
|
|
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"}
|
|
@@ -85,7 +85,7 @@ def expected_closeness_weight(n_rows, n_cols, hamming_weight):
|
|
|
85
85
|
def sample_hamming_weight(thresholds, shots):
|
|
86
86
|
hamming_samples = np.zeros(shots, dtype=np.int32)
|
|
87
87
|
for s in range(shots):
|
|
88
|
-
hamming_samples[s] = sample_mag(thresholds)
|
|
88
|
+
hamming_samples[s] = sample_mag(thresholds) + 1
|
|
89
89
|
|
|
90
90
|
return hamming_samples
|
|
91
91
|
|
|
@@ -488,7 +488,7 @@ def sample_mag(cum_prob):
|
|
|
488
488
|
while True:
|
|
489
489
|
m = (left + right) >> 1
|
|
490
490
|
|
|
491
|
-
if (cum_prob[m] >= p) and ((m == 0) or cum_prob[m - 1] < p):
|
|
491
|
+
if (cum_prob[m] >= p) and ((m == 0) or (cum_prob[m - 1] < p)):
|
|
492
492
|
break
|
|
493
493
|
|
|
494
494
|
if cum_prob[m] < p:
|
|
@@ -496,7 +496,7 @@ def sample_mag(cum_prob):
|
|
|
496
496
|
else:
|
|
497
497
|
right = m - 1
|
|
498
498
|
|
|
499
|
-
return m
|
|
499
|
+
return m
|
|
500
500
|
|
|
501
501
|
|
|
502
502
|
@njit
|
|
@@ -121,10 +121,6 @@ def generate_otoc_samples(J=-1.0, h=2.0, z=4, theta=0.174532925199432957, t=5, n
|
|
|
121
121
|
bases = { 'X': basis_x, 'Y': basis_y, 'Z': basis_z }
|
|
122
122
|
thresholds = { key: fix_cdf(value) for key, value in get_otoc_hamming_distribution(J, h, z, theta, t, n_qubits, cycles, pauli_string).items() }
|
|
123
123
|
|
|
124
|
-
samples_3_axis = {}
|
|
125
|
-
for key, value in thresholds.items():
|
|
126
|
-
basis = bases[key]
|
|
127
|
-
|
|
128
124
|
samples = []
|
|
129
125
|
for _ in range(shots):
|
|
130
126
|
sample_3_axis = { 'X': 0, 'Y': 0, 'Z': 0 }
|
|
@@ -7,7 +7,7 @@ with open(README_PATH) as readme_file:
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name='pyqrackising',
|
|
10
|
-
version='9.3.
|
|
10
|
+
version='9.3.2',
|
|
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
|
|
File without changes
|
|
File without changes
|