PyQrackIsing 5.1.2__tar.gz → 5.1.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.
Files changed (27) hide show
  1. {pyqrackising-5.1.2/pyqrackising.egg-info → pyqrackising-5.1.3}/PKG-INFO +1 -1
  2. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyproject.toml +1 -1
  3. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/maxcut_tfim.py +6 -6
  4. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/maxcut_tfim_sparse.py +7 -7
  5. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/maxcut_tfim_streaming.py +6 -6
  6. {pyqrackising-5.1.2 → pyqrackising-5.1.3/pyqrackising.egg-info}/PKG-INFO +1 -1
  7. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/setup.py +1 -1
  8. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/CMakeLists.txt +0 -0
  9. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/LICENSE.md +0 -0
  10. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/MANIFEST.in +0 -0
  11. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/README.md +0 -0
  12. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/__init__.py +0 -0
  13. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/_pyqrack_ising.cpp +0 -0
  14. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/generate_tfim_samples.py +0 -0
  15. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/kernels.cl +0 -0
  16. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/maxcut_tfim_util.py +0 -0
  17. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/spin_glass_solver.py +0 -0
  18. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/spin_glass_solver_sparse.py +0 -0
  19. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/spin_glass_solver_streaming.py +0 -0
  20. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/tfim_magnetization.py +0 -0
  21. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/tfim_square_magnetization.py +0 -0
  22. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising/tsp.py +0 -0
  23. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising.egg-info/SOURCES.txt +0 -0
  24. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising.egg-info/dependency_links.txt +0 -0
  25. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising.egg-info/not-zip-safe +0 -0
  26. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/pyqrackising.egg-info/top_level.txt +0 -0
  27. {pyqrackising-5.1.2 → pyqrackising-5.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrackising
3
- Version: 5.1.2
3
+ Version: 5.1.3
4
4
  Summary: Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)
5
5
  Home-page: https://github.com/vm6502q/PyQrackIsing
6
6
  Author: Dan Strano
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
12
12
 
13
13
  [project]
14
14
  name = "pyqrackising"
15
- version = "5.1.2"
15
+ version = "5.1.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"}
@@ -15,7 +15,7 @@ except ImportError:
15
15
 
16
16
  @njit
17
17
  def probability_by_hamming_weight(J, h, z, theta, t, n_qubits):
18
- bias = np.empty(n_qubits - 1, dtype=np.float64)
18
+ bias = np.empty(n_qubits - 1, dtype=np.float32)
19
19
 
20
20
  # critical angle
21
21
  theta_c = np.arcsin(max(-1.0, min(1.0, abs(h) / (z * J))))
@@ -56,7 +56,7 @@ def maxcut_hamming_cdf(n_qubits, J_func, degrees, quality, hamming_prob):
56
56
  h_mult = 2.0 / tot_t
57
57
  n_bias = n_qubits - 1
58
58
 
59
- theta = np.empty(n_qubits, dtype=np.float64)
59
+ theta = np.empty(n_qubits, dtype=np.float32)
60
60
  for q in range(n_qubits):
61
61
  J = J_func[q]
62
62
  z = degrees[q]
@@ -166,7 +166,7 @@ def sample_for_solution(G_m, shots, thresholds, degrees_sum, J_eff, n):
166
166
  weights = 1.0 / (1.0 + (2 ** -52) - J_eff)
167
167
 
168
168
  solutions = np.empty((shots, n), dtype=np.bool_)
169
- energies = np.empty(shots, dtype=np.float64)
169
+ energies = np.empty(shots, dtype=np.float32)
170
170
 
171
171
  for s in prange(shots):
172
172
  # First dimension: Hamming weight
@@ -197,7 +197,7 @@ def sample_for_solution(G_m, shots, thresholds, degrees_sum, J_eff, n):
197
197
  def init_J_and_z(G_m):
198
198
  n_qubits = len(G_m)
199
199
  degrees = np.empty(n_qubits, dtype=np.uint32)
200
- J_eff = np.empty(n_qubits, dtype=np.float64)
200
+ J_eff = np.empty(n_qubits, dtype=np.float32)
201
201
  J_max = -float("inf")
202
202
  for n in prange(n_qubits):
203
203
  degree = sum(G_m[n] != 0.0)
@@ -214,7 +214,7 @@ def init_J_and_z(G_m):
214
214
  @njit
215
215
  def init_thresholds(n_qubits):
216
216
  n_bias = n_qubits - 1
217
- thresholds = np.empty(n_bias, dtype=np.float64)
217
+ thresholds = np.empty(n_bias, dtype=np.float32)
218
218
  tot_prob = 0
219
219
  p = 1.0
220
220
  if n_qubits & 1:
@@ -234,7 +234,7 @@ def init_thresholds(n_qubits):
234
234
 
235
235
  @njit(parallel=True)
236
236
  def init_theta(delta_t, tot_t, h_mult, n_qubits, J_eff, degrees):
237
- theta = np.empty(n_qubits, dtype=np.float64)
237
+ theta = np.empty(n_qubits, dtype=np.float32)
238
238
  for q in prange(n_qubits):
239
239
  J = J_eff[q]
240
240
  z = degrees[q]
@@ -15,7 +15,7 @@ except ImportError:
15
15
 
16
16
  @njit
17
17
  def probability_by_hamming_weight(J, h, z, theta, t, n_qubits):
18
- bias = np.empty(n_qubits - 1, dtype=np.float64)
18
+ bias = np.empty(n_qubits - 1, dtype=np.float32)
19
19
 
20
20
  # critical angle
21
21
  theta_c = np.arcsin(max(-1.0, min(1.0, abs(h) / (z * J))))
@@ -56,7 +56,7 @@ def maxcut_hamming_cdf(n_qubits, J_func, degrees, quality, hamming_prob):
56
56
  h_mult = 2.0 / tot_t
57
57
  n_bias = n_qubits - 1
58
58
 
59
- theta = np.empty(n_qubits, dtype=np.float64)
59
+ theta = np.empty(n_qubits, dtype=np.float32)
60
60
  for q in range(n_qubits):
61
61
  J = J_func[q]
62
62
  z = degrees[q]
@@ -198,7 +198,7 @@ def sample_for_solution(G_data, G_rows, G_cols, shots, thresholds, J_eff):
198
198
  weights = 1.0 / (1.0 + (2 ** -52) - J_eff)
199
199
 
200
200
  solutions = np.empty((shots, n), dtype=np.bool_)
201
- energies = np.empty(shots, dtype=np.float64)
201
+ energies = np.empty(shots, dtype=np.float32)
202
202
 
203
203
  for s in prange(shots):
204
204
  # First dimension: Hamming weight
@@ -229,7 +229,7 @@ def sample_for_solution(G_data, G_rows, G_cols, shots, thresholds, J_eff):
229
229
  def init_J_and_z(G_data, G_rows, G_cols):
230
230
  n_qubits = G_rows.shape[0] - 1
231
231
  degrees = np.empty(n_qubits, dtype=np.uint32)
232
- J_eff = np.empty(n_qubits, dtype=np.float64)
232
+ J_eff = np.empty(n_qubits, dtype=np.float32)
233
233
  for r in prange(n_qubits):
234
234
  # Row sum
235
235
  start = G_rows[r]
@@ -262,7 +262,7 @@ def init_J_and_z(G_data, G_rows, G_cols):
262
262
  @njit
263
263
  def init_thresholds(n_qubits):
264
264
  n_bias = n_qubits - 1
265
- thresholds = np.empty(n_bias, dtype=np.float64)
265
+ thresholds = np.empty(n_bias, dtype=np.float32)
266
266
  tot_prob = 0
267
267
  p = 1.0
268
268
  if n_qubits & 1:
@@ -282,7 +282,7 @@ def init_thresholds(n_qubits):
282
282
 
283
283
  @njit(parallel=True)
284
284
  def init_theta(delta_t, tot_t, h_mult, n_qubits, J_eff, degrees):
285
- theta = np.empty(n_qubits, dtype=np.float64)
285
+ theta = np.empty(n_qubits, dtype=np.float32)
286
286
  for q in prange(n_qubits):
287
287
  J = J_eff[q]
288
288
  z = degrees[q]
@@ -300,7 +300,7 @@ def init_theta(delta_t, tot_t, h_mult, n_qubits, J_eff, degrees):
300
300
 
301
301
 
302
302
  def to_scipy_sparse_upper_triangular(G, nodes, n_nodes):
303
- lil = lil_matrix((n_nodes, n_nodes), dtype=np.float64)
303
+ lil = lil_matrix((n_nodes, n_nodes), dtype=np.float32)
304
304
  for u in range(n_nodes):
305
305
  u_node = nodes[u]
306
306
  for v in range(u + 1, n_nodes):
@@ -15,7 +15,7 @@ except ImportError:
15
15
 
16
16
  @njit
17
17
  def probability_by_hamming_weight(J, h, z, theta, t, n_qubits):
18
- bias = np.empty(n_qubits - 1, dtype=np.float64)
18
+ bias = np.empty(n_qubits - 1, dtype=np.float32)
19
19
 
20
20
  # critical angle
21
21
  theta_c = np.arcsin(max(-1.0, min(1.0, abs(h) / (z * J))))
@@ -56,7 +56,7 @@ def maxcut_hamming_cdf(n_qubits, J_func, degrees, quality, hamming_prob):
56
56
  h_mult = 2.0 / tot_t
57
57
  n_bias = n_qubits - 1
58
58
 
59
- theta = np.empty(n_qubits, dtype=np.float64)
59
+ theta = np.empty(n_qubits, dtype=np.float32)
60
60
  for q in range(n_qubits):
61
61
  J = J_func[q]
62
62
  z = degrees[q]
@@ -165,7 +165,7 @@ def sample_for_solution(G_func, G_func_args_tuple, nodes, max_weight, shots, thr
165
165
  weights = 1.0 / (1.0 + (2 ** -52) - J_eff)
166
166
 
167
167
  solutions = np.empty((shots, n), dtype=np.bool_)
168
- energies = np.empty(shots, dtype=np.float64)
168
+ energies = np.empty(shots, dtype=np.float32)
169
169
 
170
170
  for s in prange(shots):
171
171
  # First dimension: Hamming weight
@@ -196,7 +196,7 @@ def sample_for_solution(G_func, G_func_args_tuple, nodes, max_weight, shots, thr
196
196
  def init_J_and_z(G_func, G_func_args_tuple, nodes):
197
197
  n_qubits = len(nodes)
198
198
  degrees = np.empty(n_qubits, dtype=np.uint32)
199
- J_eff = np.empty(n_qubits, dtype=np.float64)
199
+ J_eff = np.empty(n_qubits, dtype=np.float32)
200
200
  J_max = -float("inf")
201
201
  G_max = -float("inf")
202
202
  for n in prange(n_qubits):
@@ -221,7 +221,7 @@ def init_J_and_z(G_func, G_func_args_tuple, nodes):
221
221
  @njit
222
222
  def init_thresholds(n_qubits):
223
223
  n_bias = n_qubits - 1
224
- thresholds = np.empty(n_bias, dtype=np.float64)
224
+ thresholds = np.empty(n_bias, dtype=np.float32)
225
225
  tot_prob = 0
226
226
  p = 1.0
227
227
  if n_qubits & 1:
@@ -241,7 +241,7 @@ def init_thresholds(n_qubits):
241
241
 
242
242
  @njit(parallel=True)
243
243
  def init_theta(delta_t, tot_t, h_mult, n_qubits, J_eff, degrees):
244
- theta = np.empty(n_qubits, dtype=np.float64)
244
+ theta = np.empty(n_qubits, dtype=np.float32)
245
245
  for q in prange(n_qubits):
246
246
  J = J_eff[q]
247
247
  z = degrees[q]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrackising
3
- Version: 5.1.2
3
+ Version: 5.1.3
4
4
  Summary: Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)
5
5
  Home-page: https://github.com/vm6502q/PyQrackIsing
6
6
  Author: Dan Strano
@@ -51,7 +51,7 @@ ext_modules = [CMakeExtension('tfim_sampler')]
51
51
 
52
52
  setup(
53
53
  name='pyqrackising',
54
- version='5.1.2',
54
+ version='5.1.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