PyQrackIsing 8.10.1__tar.gz → 8.10.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 (28) hide show
  1. {pyqrackising-8.10.1/pyqrackising.egg-info → pyqrackising-8.10.3}/PKG-INFO +1 -1
  2. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyproject.toml +1 -1
  3. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/spin_glass_solver.py +1 -2
  4. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/spin_glass_solver_sparse.py +1 -2
  5. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/spin_glass_solver_streaming.py +1 -2
  6. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/tsp.py +8 -4
  7. {pyqrackising-8.10.1 → pyqrackising-8.10.3/pyqrackising.egg-info}/PKG-INFO +1 -1
  8. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/setup.py +1 -1
  9. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/LICENSE.md +0 -0
  10. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/MANIFEST.in +0 -0
  11. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/README.md +0 -0
  12. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/__init__.py +0 -0
  13. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/convert_tensor_network_to_tsp.py +0 -0
  14. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/generate_tfim_samples.py +0 -0
  15. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/kernels.cl +0 -0
  16. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/maxcut_tfim.py +0 -0
  17. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/maxcut_tfim_sparse.py +0 -0
  18. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/maxcut_tfim_streaming.py +0 -0
  19. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/maxcut_tfim_util.py +0 -0
  20. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/spin_glass_solver_util.py +0 -0
  21. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/tfim_magnetization.py +0 -0
  22. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/tfim_square_magnetization.py +0 -0
  23. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising/tsp_maxcut.py +0 -0
  24. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising.egg-info/SOURCES.txt +0 -0
  25. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising.egg-info/dependency_links.txt +0 -0
  26. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising.egg-info/not-zip-safe +0 -0
  27. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/pyqrackising.egg-info/top_level.txt +0 -0
  28. {pyqrackising-8.10.1 → pyqrackising-8.10.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrackising
3
- Version: 8.10.1
3
+ Version: 8.10.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
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
10
10
 
11
11
  [project]
12
12
  name = "pyqrackising"
13
- version = "8.10.1"
13
+ version = "8.10.3"
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"}
@@ -272,7 +272,6 @@ def spin_glass_solver(
272
272
  if n_qubits < k:
273
273
  break
274
274
 
275
- combos = []
276
275
  if len(combos_list) < k:
277
276
  combos = np.array(list(
278
277
  item for sublist in itertools.combinations(range(n_qubits), k) for item in sublist
@@ -304,7 +303,7 @@ def spin_glass_solver(
304
303
  best_theta = reheat_theta.copy()
305
304
  min_energy = reheat_min_energy
306
305
 
307
- if reheat_round < reheat_tries:
306
+ if reheat_round <= reheat_tries:
308
307
  num_to_flip = int(np.round(np.log2(n_qubits)))
309
308
  bits_to_flip = random.sample(list(range(n_qubits)), num_to_flip)
310
309
  for bit in bits_to_flip:
@@ -295,7 +295,6 @@ def spin_glass_solver_sparse(
295
295
  if n_qubits < k:
296
296
  break
297
297
 
298
- combos = []
299
298
  if len(combos_list) < k:
300
299
  combos = np.array(list(
301
300
  item for sublist in itertools.combinations(range(n_qubits), k) for item in sublist
@@ -328,7 +327,7 @@ def spin_glass_solver_sparse(
328
327
  best_theta = reheat_theta.copy()
329
328
  min_energy = reheat_min_energy
330
329
 
331
- if reheat_round < reheat_tries:
330
+ if reheat_round <= reheat_tries:
332
331
  num_to_flip = int(np.round(np.log2(n_qubits)))
333
332
  bits_to_flip = random.sample(list(range(n_qubits)), num_to_flip)
334
333
  for bit in bits_to_flip:
@@ -141,7 +141,6 @@ def spin_glass_solver_streaming(
141
141
  if n_qubits < k:
142
142
  break
143
143
 
144
- combos = []
145
144
  if len(combos_list) < k:
146
145
  combos = np.array(list(
147
146
  item for sublist in itertools.combinations(range(n_qubits), k) for item in sublist
@@ -171,7 +170,7 @@ def spin_glass_solver_streaming(
171
170
  best_theta = reheat_theta.copy()
172
171
  min_energy = reheat_min_energy
173
172
 
174
- if reheat_round < reheat_tries:
173
+ if reheat_round <= reheat_tries:
175
174
  num_to_flip = int(np.round(np.log2(n_qubits)))
176
175
  bits_to_flip = random.sample(list(range(n_qubits)), num_to_flip)
177
176
  for bit in bits_to_flip:
@@ -623,6 +623,8 @@ def tsp_symmetric_driver(G_m, is_cyclic, is_top_level, start_node, end_node, k_n
623
623
 
624
624
  @njit
625
625
  def tsp_symmetric_header(G_m, nodes, quality, shots, anneal_t, anneal_h, repulsion_base, start_node, end_node, monte_carlo, is_cyclic, n_nodes, multi_start):
626
+ n_x = nodes[0]
627
+
626
628
  if is_cyclic:
627
629
  start_node = None
628
630
  end_node = None
@@ -631,7 +633,7 @@ def tsp_symmetric_header(G_m, nodes, quality, shots, anneal_t, anneal_h, repulsi
631
633
  start_node = end_node
632
634
  end_node = None
633
635
 
634
- a, b, c = [0], [0], [0]
636
+ a, b, c = [n_x], [n_x], [n_x]
635
637
  a.clear()
636
638
  b.clear()
637
639
  c.clear()
@@ -641,7 +643,7 @@ def tsp_symmetric_header(G_m, nodes, quality, shots, anneal_t, anneal_h, repulsi
641
643
  else:
642
644
  best_cut = -float("inf")
643
645
  for _ in range(multi_start):
644
- bits = ([0], [0])
646
+ bits = ([n_x], [n_x])
645
647
  bits[0].clear()
646
648
  bits[1].clear()
647
649
  while (len(bits[0]) == 0) or (len(bits[1]) == 0):
@@ -838,6 +840,8 @@ def tsp_asymmetric_driver(G_m, is_reversed, is_cyclic, is_top_level, start_node,
838
840
 
839
841
  @njit
840
842
  def tsp_asymmetric_header(G_m, nodes, quality, shots, anneal_t, anneal_h, repulsion_base, start_node, end_node, monte_carlo, is_cyclic, n_nodes, multi_start):
843
+ n_x = nodes[0]
844
+
841
845
  if is_cyclic:
842
846
  start_node = None
843
847
  end_node = None
@@ -849,7 +853,7 @@ def tsp_asymmetric_header(G_m, nodes, quality, shots, anneal_t, anneal_h, repuls
849
853
  end_node = None
850
854
  G_m = G_m.T
851
855
 
852
- a, b, c = [0], [0], [0]
856
+ a, b, c = [n_x], [n_x], [n_x]
853
857
  a.clear()
854
858
  b.clear()
855
859
  c.clear()
@@ -859,7 +863,7 @@ def tsp_asymmetric_header(G_m, nodes, quality, shots, anneal_t, anneal_h, repuls
859
863
  else:
860
864
  best_cut = -float("inf")
861
865
  for _ in range(multi_start):
862
- bits = ([0], [0])
866
+ bits = ([n_x], [n_x])
863
867
  bits[0].clear()
864
868
  bits[1].clear()
865
869
  while (len(bits[0]) == 0) or (len(bits[1]) == 0):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrackising
3
- Version: 8.10.1
3
+ Version: 8.10.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
@@ -7,7 +7,7 @@ with open(README_PATH) as readme_file:
7
7
 
8
8
  setup(
9
9
  name='pyqrackising',
10
- version='8.10.1',
10
+ version='8.10.3',
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