PyQrackIsing 1.10.0__tar.gz → 1.10.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.
- {pyqrackising-1.10.0/PyQrackIsing.egg-info → pyqrackising-1.10.2}/PKG-INFO +1 -1
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/_pyqrack_ising.cpp +2 -9
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/maxcut_tfim.py +3 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2/PyQrackIsing.egg-info}/PKG-INFO +1 -1
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/pyproject.toml +1 -1
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/setup.py +1 -1
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/CMakeLists.txt +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/LICENSE.md +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/MANIFEST.in +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/__init__.py +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/generate_tfim_samples.py +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/spin_glass_solver.py +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/tfim_magnetization.py +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/tfim_square_magnetization.py +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing/tsp_symmetric.py +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing.egg-info/SOURCES.txt +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing.egg-info/dependency_links.txt +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing.egg-info/not-zip-safe +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/PyQrackIsing.egg-info/top_level.txt +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/README.md +0 -0
- {pyqrackising-1.10.0 → pyqrackising-1.10.2}/setup.cfg +0 -0
|
@@ -73,15 +73,8 @@ static inline std::string int_to_bitstring(BigInteger integer, size_t length) {
|
|
|
73
73
|
return s;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
std::vector<double> maxcut_hamming_cdf(
|
|
77
|
-
|
|
78
|
-
py::array_t<double, py::array::c_style | py::array::forcecast> _degrees,
|
|
79
|
-
int mult_log2
|
|
80
|
-
) {
|
|
81
|
-
auto bufj = _J_func.request();
|
|
82
|
-
size_t n_qubits = bufj.shape[0];
|
|
83
|
-
double* J_func = static_cast<double*>(bufj.ptr);
|
|
84
|
-
double* degrees = static_cast<double*>(_degrees.request().ptr);
|
|
76
|
+
std::vector<double> maxcut_hamming_cdf(std::vector<double> J_func, std::vector<double> degrees, int mult_log2) {
|
|
77
|
+
size_t n_qubits = J_func.size();
|
|
85
78
|
const int n_steps = n_qubits << mult_log2;
|
|
86
79
|
const int shots = n_qubits << mult_log2;
|
|
87
80
|
const double delta_t = 1.0 / (n_steps << (mult_log2 >> 1));
|
|
@@ -107,6 +107,9 @@ def maxcut_tfim(
|
|
|
107
107
|
# Second dimension: permutation within Hamming weight
|
|
108
108
|
samples.append(local_repulsion_choice(nodes, G_dict, degrees, weights, n_qubits, m))
|
|
109
109
|
|
|
110
|
+
# We only need unique instances
|
|
111
|
+
samples = list(set(samples))
|
|
112
|
+
|
|
110
113
|
edge_keys = []
|
|
111
114
|
edge_values = []
|
|
112
115
|
for u, v, data in G.edges(data=True):
|
|
@@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta"
|
|
|
11
11
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "PyQrackIsing"
|
|
14
|
-
version = "1.10.
|
|
14
|
+
version = "1.10.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.10.
|
|
54
|
+
version='1.10.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
|
|
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
|