PyQrackIsing 9.16.6__tar.gz → 9.16.8__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.16.6/pyqrackising.egg-info → pyqrackising-9.16.8}/PKG-INFO +1 -1
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyproject.toml +1 -1
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/generate_tfim_samples.py +0 -1
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/otoc.py +13 -9
- {pyqrackising-9.16.6 → pyqrackising-9.16.8/pyqrackising.egg-info}/PKG-INFO +1 -1
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/setup.py +1 -1
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/LICENSE.md +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/MANIFEST.in +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/README.md +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/__init__.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/convert_tensor_network_to_tsp.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/kernels.cl +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/maxcut_tfim.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/maxcut_tfim_sparse.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/maxcut_tfim_streaming.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/maxcut_tfim_util.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/solve_maxcut_bnb.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/solve_maxcut_bnb_sparse.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/solve_maxcut_bnb_streaming.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/solve_maxcut_exact.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/solve_maxcut_exact_sparse.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/solve_maxcut_exact_streaming.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/spin_glass_solver.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/spin_glass_solver_hybrid.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/spin_glass_solver_sparse.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/spin_glass_solver_streaming.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/tfim_magnetization.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/tfim_square_magnetization.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/tsp.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising/tsp_maxcut.py +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising.egg-info/SOURCES.txt +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising.egg-info/dependency_links.txt +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising.egg-info/not-zip-safe +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising.egg-info/requires.txt +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/pyqrackising.egg-info/top_level.txt +0 -0
- {pyqrackising-9.16.6 → pyqrackising-9.16.8}/setup.cfg +0 -0
|
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "pyqrackising"
|
|
10
|
-
version = "9.16.
|
|
10
|
+
version = "9.16.8"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
description = "Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)"
|
|
13
13
|
readme = {file = "README.txt", content-type = "text/markdown"}
|
|
@@ -29,14 +29,12 @@ def get_otoc_hamming_distribution(J=-1.0, h=2.0, z=4, theta=0.0, t=5, n_qubits=6
|
|
|
29
29
|
diff_x *= n_qubits / tot_prob
|
|
30
30
|
|
|
31
31
|
signal_frac = 0.0
|
|
32
|
-
diff_z = np.zeros(n_bias, dtype=np.float64)
|
|
33
|
-
diff_z[0] = n_qubits
|
|
34
32
|
for pauli_string in pauli_strings:
|
|
35
33
|
pauli_string = list(pauli_string)
|
|
36
34
|
if len(pauli_string) != n_qubits:
|
|
37
35
|
raise ValueError("OTOCS pauli_string must be same length as n_qubits! (Use 'I' for qubits that aren't changed.)")
|
|
38
36
|
|
|
39
|
-
term_signal =
|
|
37
|
+
term_signal = pauli_string.count("X") + pauli_string.count("Z") + 2 * pauli_string.count("Y")
|
|
40
38
|
if term_signal == 0:
|
|
41
39
|
continue
|
|
42
40
|
|
|
@@ -54,21 +52,20 @@ def get_otoc_hamming_distribution(J=-1.0, h=2.0, z=4, theta=0.0, t=5, n_qubits=6
|
|
|
54
52
|
for b in pauli_string:
|
|
55
53
|
match b:
|
|
56
54
|
case "X":
|
|
57
|
-
diff_z += diff_theta
|
|
58
|
-
case "Z":
|
|
59
55
|
diff_x += diff_phi
|
|
56
|
+
case "Z":
|
|
57
|
+
diff_x += diff_theta
|
|
60
58
|
case "Y":
|
|
61
|
-
|
|
62
|
-
diff_x += diff_phi
|
|
59
|
+
diff_x += diff_theta + diff_phi
|
|
63
60
|
case _:
|
|
64
61
|
pass
|
|
65
62
|
|
|
66
63
|
# Normalize:
|
|
67
|
-
diff_z /= diff_z.sum()
|
|
68
64
|
diff_x /= diff_x.sum()
|
|
69
65
|
|
|
70
66
|
signal_frac = 2**signal_frac
|
|
71
|
-
diff_z =
|
|
67
|
+
diff_z = (1 - signal_frac) * diff_x
|
|
68
|
+
diff_z[0] += signal_frac
|
|
72
69
|
|
|
73
70
|
# Normalize:
|
|
74
71
|
diff_z /= diff_z.sum()
|
|
@@ -109,6 +106,13 @@ def find_all_str_occurrences(main_string, sub_string):
|
|
|
109
106
|
break
|
|
110
107
|
indices.append(index)
|
|
111
108
|
start_index = index + 1 # Start searching after the found occurrence
|
|
109
|
+
start_index = 0
|
|
110
|
+
while True:
|
|
111
|
+
index = main_string.find("Y", start_index)
|
|
112
|
+
if index == -1:
|
|
113
|
+
break
|
|
114
|
+
indices.append(index)
|
|
115
|
+
start_index = index + 1 # Start searching after the found occurrence
|
|
112
116
|
|
|
113
117
|
return indices
|
|
114
118
|
|
|
@@ -7,7 +7,7 @@ with open(README_PATH) as readme_file:
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name="pyqrackising",
|
|
10
|
-
version="9.16.
|
|
10
|
+
version="9.16.8",
|
|
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
|
|
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
|