PyQrackIsing 6.2.1__tar.gz → 6.2.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.
- {pyqrackising-6.2.1/pyqrackising.egg-info → pyqrackising-6.2.3}/PKG-INFO +1 -1
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyproject.toml +1 -1
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/convert_tensor_network_to_tsp.py +1 -1
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/tsp.py +5 -2
- {pyqrackising-6.2.1 → pyqrackising-6.2.3/pyqrackising.egg-info}/PKG-INFO +1 -1
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/setup.py +1 -1
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/CMakeLists.txt +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/LICENSE.md +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/MANIFEST.in +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/README.md +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/__init__.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/_pyqrack_ising.cpp +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/generate_tfim_samples.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/kernels.cl +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/maxcut_tfim.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/maxcut_tfim_sparse.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/maxcut_tfim_streaming.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/maxcut_tfim_util.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/spin_glass_solver.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/spin_glass_solver_sparse.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/spin_glass_solver_streaming.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/spin_glass_solver_util.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/tfim_magnetization.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising/tfim_square_magnetization.py +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising.egg-info/SOURCES.txt +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising.egg-info/dependency_links.txt +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising.egg-info/not-zip-safe +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/pyqrackising.egg-info/top_level.txt +0 -0
- {pyqrackising-6.2.1 → pyqrackising-6.2.3}/setup.cfg +0 -0
|
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
|
|
|
12
12
|
|
|
13
13
|
[project]
|
|
14
14
|
name = "pyqrackising"
|
|
15
|
-
version = "6.2.
|
|
15
|
+
version = "6.2.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"}
|
|
@@ -85,7 +85,7 @@ def convert_quimb_tree_to_tsp(tn, dtype=np.float32):
|
|
|
85
85
|
|
|
86
86
|
for tensor in tn.tensors:
|
|
87
87
|
# Use a unique tag or fallback to name
|
|
88
|
-
tensor_id =
|
|
88
|
+
tensor_id = frozenset(tensor.tags) if tensor.tags else str(tensor.name)
|
|
89
89
|
tensors.append({
|
|
90
90
|
"id": tensor_id,
|
|
91
91
|
"indices": set(tensor.inds)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from .spin_glass_solver import spin_glass_solver
|
|
2
|
+
from .maxcut_tfim_util import opencl_context
|
|
2
3
|
import itertools
|
|
3
4
|
import networkx as nx
|
|
4
5
|
from numba import njit
|
|
@@ -512,13 +513,14 @@ def tsp_symmetric(
|
|
|
512
513
|
multi_start=1,
|
|
513
514
|
is_top_level=True
|
|
514
515
|
):
|
|
516
|
+
dtype = opencl_context.dtype
|
|
515
517
|
nodes = None
|
|
516
518
|
n_nodes = 0
|
|
517
519
|
G_m = None
|
|
518
520
|
if isinstance(G, nx.Graph):
|
|
519
521
|
nodes = list(G.nodes())
|
|
520
522
|
n_nodes = len(nodes)
|
|
521
|
-
G_m = nx.to_numpy_array(G, weight='weight', nonedge=0.0)
|
|
523
|
+
G_m = nx.to_numpy_array(G, weight='weight', nonedge=0.0, dtype=dtype)
|
|
522
524
|
else:
|
|
523
525
|
n_nodes = len(G)
|
|
524
526
|
nodes = list(range(n_nodes))
|
|
@@ -696,13 +698,14 @@ def tsp_asymmetric(
|
|
|
696
698
|
multi_start=1,
|
|
697
699
|
is_top_level=True
|
|
698
700
|
):
|
|
701
|
+
dtype = opencl_context.dtype
|
|
699
702
|
nodes = None
|
|
700
703
|
n_nodes = 0
|
|
701
704
|
G_m = None
|
|
702
705
|
if isinstance(G, nx.Graph):
|
|
703
706
|
nodes = list(G.nodes())
|
|
704
707
|
n_nodes = len(nodes)
|
|
705
|
-
G_m = nx.to_numpy_array(G, weight='weight', nonedge=0.0)
|
|
708
|
+
G_m = nx.to_numpy_array(G, weight='weight', nonedge=0.0, dtype=dtype)
|
|
706
709
|
else:
|
|
707
710
|
n_nodes = len(G)
|
|
708
711
|
nodes = list(range(n_nodes))
|
|
@@ -51,7 +51,7 @@ ext_modules = [CMakeExtension('tfim_sampler')]
|
|
|
51
51
|
|
|
52
52
|
setup(
|
|
53
53
|
name='pyqrackising',
|
|
54
|
-
version='6.2.
|
|
54
|
+
version='6.2.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
|
|
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
|