PyQrackIsing 1.8.1__tar.gz → 1.8.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.
Files changed (20) hide show
  1. {pyqrackising-1.8.1/PyQrackIsing.egg-info → pyqrackising-1.8.2}/PKG-INFO +1 -1
  2. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing/spin_glass_solver.py +1 -0
  3. {pyqrackising-1.8.1 → pyqrackising-1.8.2/PyQrackIsing.egg-info}/PKG-INFO +1 -1
  4. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/README.md +5 -4
  5. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/pyproject.toml +1 -1
  6. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/setup.py +1 -1
  7. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/CMakeLists.txt +0 -0
  8. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/LICENSE.md +0 -0
  9. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/MANIFEST.in +0 -0
  10. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing/__init__.py +0 -0
  11. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing/_pyqrack_ising.cpp +0 -0
  12. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing/generate_tfim_samples.py +0 -0
  13. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing/maxcut_tfim.py +0 -0
  14. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing/tfim_magnetization.py +0 -0
  15. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing/tfim_square_magnetization.py +0 -0
  16. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing.egg-info/SOURCES.txt +0 -0
  17. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing.egg-info/dependency_links.txt +0 -0
  18. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing.egg-info/not-zip-safe +0 -0
  19. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/PyQrackIsing.egg-info/top_level.txt +0 -0
  20. {pyqrackising-1.8.1 → pyqrackising-1.8.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyQrackIsing
3
- Version: 1.8.1
3
+ Version: 1.8.2
4
4
  Summary: Near-ideal closed-form solutions for transverse field Ising model (TFIM)
5
5
  Home-page: https://github.com/vm6502q/PyQrackIsing
6
6
  Author: Dan Strano
@@ -5,6 +5,7 @@ from numba import njit, prange
5
5
  import os
6
6
 
7
7
 
8
+ @njit
8
9
  def evaluate_cut_edges(state, edge_keys, edge_values):
9
10
  cut_edges = []
10
11
  cut_value = 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyQrackIsing
3
- Version: 1.8.1
3
+ Version: 1.8.2
4
4
  Summary: Near-ideal closed-form solutions for transverse field Ising model (TFIM)
5
5
  Home-page: https://github.com/vm6502q/PyQrackIsing
6
6
  Author: Dan Strano
@@ -1,5 +1,5 @@
1
1
  # PyQrack Ising
2
- Efficiently generate near-ideal samples from transverse field Ising model (TFIM)
2
+ Efficiently generate near-ideal samples from transverse field Ising model (TFIM), and TFIM-inspired MAXCUT solutions
3
3
 
4
4
  (It's "the **Ising** on top.")
5
5
 
@@ -68,10 +68,11 @@ def generate_spin_glass_graph(n_nodes=16, degree=3, seed=None):
68
68
  return G
69
69
 
70
70
 
71
- G = generate_spin_glass_graph(n_nodes=64, seed=42, best_guess=None)
72
- cut_value, bitstring, cut_edges, min_energy = spin_glass_solver(G, quality=2)
71
+ G = generate_spin_glass_graph(n_nodes=64, seed=42)
72
+ cut_value, bitstring, cut_edges, energy = spin_glass_solver(G, quality=2, best_guess=None)
73
+ # cut_value, bitstring, cut_edges, energy = spin_glass_solver(G, best_guess=maxcut_tfim(G, quality=12)[1])
73
74
  ```
74
- The `quality` setting default is `2`, and overhead grows roughly like the qubit count to the power of `quality` (so `O(n ** 2)` for default). `best_guess` gives the option to seed the algorithm with a best guess as to the maximal cut (as an integer, binary string, or list of booleans). This function is designed with a sign convention for weights such that it can immediately be used as a MAXCUT solver itself: you might need to reverse the sign convention on your weights for spin glass graphs, but this is only convention.
75
+ The `quality` setting default is `2`, and overhead grows roughly like the qubit count to the power of `quality` (so `O(n ** 2)` for default). `best_guess` gives the option to seed the algorithm with a best guess as to the maximal cut (as an integer, binary string, or list of booleans). By default, `spin_glass_solver()` uses `maxcut_tfim(G, quality=0)` as `best_guess`, which typically works well, but it could be seeded with higher `maxcut_tfim()` `quality` or Goemans-Williamson, for example. This function is designed with a sign convention for weights such that it can immediately be used as a MAXCUT solver itself: you might need to reverse the sign convention on your weights for spin glass graphs, but this is only convention.
75
76
 
76
77
  ## About
77
78
  Transverse field Ising model (TFIM) is the basis of most claimed algorithmic "quantum advantage," circa 2025, with the notable exception of Shor's integer factoring algorithm.
@@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta"
11
11
 
12
12
  [project]
13
13
  name = "PyQrackIsing"
14
- version = "1.8.1"
14
+ version = "1.8.2"
15
15
  requires-python = ">=3.8"
16
16
  description = "Near-ideal closed-form solutions for transverse field Ising model (TFIM)"
17
17
  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.8.1',
54
+ version='1.8.2',
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