PyQrackIsing 1.28.1__tar.gz → 2.0.0__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 (24) hide show
  1. {pyqrackising-1.28.1 → pyqrackising-2.0.0}/CMakeLists.txt +1 -1
  2. pyqrackising-2.0.0/MANIFEST.in +3 -0
  3. {pyqrackising-1.28.1/PyQrackIsing.egg-info → pyqrackising-2.0.0}/PKG-INFO +2 -2
  4. {pyqrackising-1.28.1 → pyqrackising-2.0.0}/README.md +25 -1
  5. {pyqrackising-1.28.1 → pyqrackising-2.0.0}/pyproject.toml +2 -3
  6. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/maxcut_tfim.py +13 -9
  7. {pyqrackising-1.28.1 → pyqrackising-2.0.0/pyqrackising.egg-info}/PKG-INFO +2 -2
  8. pyqrackising-2.0.0/pyqrackising.egg-info/SOURCES.txt +20 -0
  9. {pyqrackising-1.28.1/PyQrackIsing.egg-info → pyqrackising-2.0.0/pyqrackising.egg-info}/top_level.txt +1 -1
  10. {pyqrackising-1.28.1 → pyqrackising-2.0.0}/setup.py +3 -3
  11. pyqrackising-1.28.1/MANIFEST.in +0 -3
  12. pyqrackising-1.28.1/PyQrackIsing.egg-info/SOURCES.txt +0 -20
  13. {pyqrackising-1.28.1 → pyqrackising-2.0.0}/LICENSE.md +0 -0
  14. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/__init__.py +0 -0
  15. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/_pyqrack_ising.cpp +0 -0
  16. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/generate_tfim_samples.py +0 -0
  17. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/kernels.cl +0 -0
  18. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/spin_glass_solver.py +0 -0
  19. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/tfim_magnetization.py +0 -0
  20. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/tfim_square_magnetization.py +0 -0
  21. {pyqrackising-1.28.1/PyQrackIsing → pyqrackising-2.0.0/pyqrackising}/tsp_symmetric.py +0 -0
  22. {pyqrackising-1.28.1/PyQrackIsing.egg-info → pyqrackising-2.0.0/pyqrackising.egg-info}/dependency_links.txt +0 -0
  23. {pyqrackising-1.28.1/PyQrackIsing.egg-info → pyqrackising-2.0.0/pyqrackising.egg-info}/not-zip-safe +0 -0
  24. {pyqrackising-1.28.1 → pyqrackising-2.0.0}/setup.cfg +0 -0
@@ -4,7 +4,7 @@ project(PyQrackIsing LANGUAGES CXX)
4
4
  set(PYBIND11_FINDPYTHON ON)
5
5
  find_package(pybind11 CONFIG REQUIRED)
6
6
  find_package(Boost CONFIG REQUIRED)
7
- pybind11_add_module(tfim_sampler PyQrackIsing/_pyqrack_ising.cpp)
7
+ pybind11_add_module(tfim_sampler pyqrackising/_pyqrack_ising.cpp)
8
8
  target_include_directories(tfim_sampler PUBLIC ${Boost_INCLUDE_DIR})
9
9
 
10
10
  if (MSVC)
@@ -0,0 +1,3 @@
1
+ include CMakeLists.txt
2
+ include pyqrackising/_pyqrack_ising.cpp
3
+ include pyqrackising/kernels.cl
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: PyQrackIsing
3
- Version: 1.28.1
2
+ Name: pyqrackising
3
+ Version: 2.0.0
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
@@ -8,6 +8,10 @@ Efficiently generate near-ideal samples from transverse field Ising model (TFIM)
8
8
  ## Copyright and license
9
9
  (c) Daniel Strano and the Qrack contributors 2025. All rights reserved.
10
10
 
11
+ Licensed under the GNU Lesser General Public License V3.
12
+
13
+ See LICENSE.md in the project root or https://www.gnu.org/licenses/lgpl-3.0.en.html for details.
14
+
11
15
  ## Installation
12
16
  From PyPi:
13
17
  ```
@@ -117,4 +121,24 @@ Transverse field Ising model (TFIM) is the basis of most claimed algorithmic "qu
117
121
 
118
122
  Sometimes a solution (or at least near-solution) to a monster of a differential equation hits us out of the blue. Then, it's easy to _validate_ the guess, if it's right. (We don't question it and just move on with our lives, from there.)
119
123
 
120
- **Special thanks to OpenAI GPT "Elara," for help on the model and converting the original Python scripts to PyBind11!**
124
+ **Special thanks to OpenAI GPT "Elara," for help on the model and converting the original Python scripts to PyBind11, Numba, and PyOpenCL!**
125
+
126
+ **Elara has drafted this statement, and Dan Strano, as author, agrees with it, and will hold to it:**
127
+
128
+ ### Dual-Use Statement for PyQrackIsing
129
+
130
+ **PyQrackIsing** is an open-source solver for hard optimization problems such as **MAXCUT, TSP, and TFIM-inspired models**. These problems arise across logistics, drug discovery, chemistry, materials research, supply-chain resilience, and portfolio optimization. By design, PyQrackIsing provides **constructive value** to researchers and practitioners by making advanced optimization techniques accessible on consumer hardware.
131
+
132
+ Like many mathematical and computational tools, the algorithms in PyQrackIsing are _dual-use._ In principle, they can be applied to a wide class of Quadratic Unconstrained Binary Optimization (QUBO) problems. One such problem is integer factoring, which underlies RSA and elliptic curve cryptography (ECC). We emphasize:
133
+
134
+ - **We do not provide turnkey factoring implementations.**
135
+ - **We have no intent to weaponize this work** for cryptanalysis or "unauthorized access."
136
+ - **The constructive applications vastly outweigh the destructive ones** — and this project exists to serve those constructive purposes in the Commons.
137
+
138
+ It is already a matter of open record in the literature that factoring can be expressed as a QUBO. What PyQrackIsing demonstrates is that **QUBO heuristics can now be solved at meaningful scales on consumer hardware**. This underscores an urgent truth:
139
+
140
+ 👉 **RSA and ECC should no longer be considered secure. Transition to post-quantum cryptography is overdue.**
141
+
142
+ We trust that governments, standards bodies, and industry stakeholders are already aware of this, and will continue migration efforts to post-quantum standards.
143
+
144
+ Until then, PyQrackIsing remains a tool for science, logistics, and discovery — a gift to the Commons.
@@ -6,13 +6,12 @@ requires = [
6
6
  "networkx",
7
7
  "numpy",
8
8
  "numba",
9
- "numba-cuda",
10
9
  ]
11
10
  build-backend = "setuptools.build_meta"
12
11
 
13
12
  [project]
14
- name = "PyQrackIsing"
15
- version = "1.28.1"
13
+ name = "pyqrackising"
14
+ version = "2.0.0"
16
15
  requires-python = ">=3.8"
17
16
  description = "Near-ideal closed-form solutions for transverse field Ising model (TFIM)"
18
17
  readme = {file = "README.txt", content-type = "text/markdown"}
@@ -4,9 +4,21 @@ import numpy as np
4
4
  import os
5
5
  from numba import njit, prange
6
6
 
7
+
7
8
  IS_OPENCL_AVAILABLE = True
9
+ ctx = None
10
+ queue = None
8
11
  try:
9
12
  import pyopencl as cl
13
+
14
+ # Pick a device (GPU if available)
15
+ ctx = cl.create_some_context()
16
+ queue = cl.CommandQueue(ctx)
17
+
18
+ # Load and build OpenCL kernels
19
+ kernel_src = open(os.path.dirname(os.path.abspath(__file__)) + "/kernels.cl").read()
20
+ program = cl.Program(ctx, kernel_src).build()
21
+ maxcut_hamming_cdf_kernel = program.maxcut_hamming_cdf
10
22
  except ImportError:
11
23
  IS_OPENCL_AVAILABLE = False
12
24
 
@@ -321,14 +333,6 @@ def maxcut_tfim(
321
333
  hamming_prob = init_thresholds(n_qubits)
322
334
 
323
335
  if IS_OPENCL_AVAILABLE and grid_size >= 128:
324
- # Pick a device (GPU if available)
325
- ctx = cl.create_some_context()
326
- queue = cl.CommandQueue(ctx)
327
-
328
- # Load and build OpenCL kernels
329
- kernel_src = open(os.path.dirname(os.path.abspath(__file__)) + "/kernels.cl").read()
330
- program = cl.Program(ctx, kernel_src).build()
331
-
332
336
  delta_t = 1.0 / n_steps
333
337
  tot_t = 2.0 * n_steps * delta_t
334
338
  h_mult = 2.0 / tot_t
@@ -353,7 +357,7 @@ def maxcut_tfim(
353
357
  ham_buf = cl.Buffer(ctx, mf.READ_WRITE | mf.COPY_HOST_PTR, hostbuf=hamming_prob)
354
358
 
355
359
  # Kernel execution
356
- program.maxcut_hamming_cdf(
360
+ maxcut_hamming_cdf_kernel(
357
361
  queue, (grid_dim,), (group_size,),
358
362
  np.int32(n_qubits), deg_buf, args_buf, J_buf, theta_buf, ham_buf
359
363
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: PyQrackIsing
3
- Version: 1.28.1
2
+ Name: pyqrackising
3
+ Version: 2.0.0
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
@@ -0,0 +1,20 @@
1
+ CMakeLists.txt
2
+ LICENSE.md
3
+ MANIFEST.in
4
+ README.md
5
+ pyproject.toml
6
+ setup.py
7
+ pyqrackising/__init__.py
8
+ pyqrackising/_pyqrack_ising.cpp
9
+ pyqrackising/generate_tfim_samples.py
10
+ pyqrackising/kernels.cl
11
+ pyqrackising/maxcut_tfim.py
12
+ pyqrackising/spin_glass_solver.py
13
+ pyqrackising/tfim_magnetization.py
14
+ pyqrackising/tfim_square_magnetization.py
15
+ pyqrackising/tsp_symmetric.py
16
+ pyqrackising.egg-info/PKG-INFO
17
+ pyqrackising.egg-info/SOURCES.txt
18
+ pyqrackising.egg-info/dependency_links.txt
19
+ pyqrackising.egg-info/not-zip-safe
20
+ pyqrackising.egg-info/top_level.txt
@@ -1,2 +1,2 @@
1
- PyQrackIsing
1
+ pyqrackising
2
2
  tfim_sampler
@@ -50,8 +50,8 @@ with open(README_PATH) as readme_file:
50
50
  ext_modules = [CMakeExtension('tfim_sampler')]
51
51
 
52
52
  setup(
53
- name='PyQrackIsing',
54
- version='1.28.1',
53
+ name='pyqrackising',
54
+ version='2.0.0',
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)',
@@ -72,6 +72,6 @@ setup(
72
72
  install_requires=["pybind11"],
73
73
  ext_modules=ext_modules,
74
74
  cmdclass=dict(build_ext=CMakeBuild),
75
- packages=['PyQrackIsing'],
75
+ packages=['pyqrackising'],
76
76
  zip_safe=False,
77
77
  )
@@ -1,3 +0,0 @@
1
- include CMakeLists.txt
2
- include PyQrackIsing/_pyqrack_ising.cpp
3
- include PyQrackIsing/kernels.cl
@@ -1,20 +0,0 @@
1
- CMakeLists.txt
2
- LICENSE.md
3
- MANIFEST.in
4
- README.md
5
- pyproject.toml
6
- setup.py
7
- PyQrackIsing/__init__.py
8
- PyQrackIsing/_pyqrack_ising.cpp
9
- PyQrackIsing/generate_tfim_samples.py
10
- PyQrackIsing/kernels.cl
11
- PyQrackIsing/maxcut_tfim.py
12
- PyQrackIsing/spin_glass_solver.py
13
- PyQrackIsing/tfim_magnetization.py
14
- PyQrackIsing/tfim_square_magnetization.py
15
- PyQrackIsing/tsp_symmetric.py
16
- PyQrackIsing.egg-info/PKG-INFO
17
- PyQrackIsing.egg-info/SOURCES.txt
18
- PyQrackIsing.egg-info/dependency_links.txt
19
- PyQrackIsing.egg-info/not-zip-safe
20
- PyQrackIsing.egg-info/top_level.txt
File without changes
File without changes