pyqrack-cpu-complex128 1.72.5__py3-none-macosx_14_0_arm64.whl → 1.80.2__py3-none-macosx_14_0_arm64.whl
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.
- pyqrack/__init__.py +2 -2
- pyqrack/qrack_ace_backend.py +44 -70
- pyqrack/qrack_circuit.py +51 -40
- pyqrack/qrack_neuron.py +112 -5
- pyqrack/qrack_neuron_torch_layer.py +182 -106
- pyqrack/qrack_simulator.py +304 -271
- pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.9.35.1.dylib +0 -0
- pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib +0 -0
- pyqrack/qrack_system/qrack_system.py +25 -12
- pyqrack/stats/load_quantized_data.py +1 -3
- pyqrack/stats/quantize_by_range.py +2 -6
- {pyqrack_cpu_complex128-1.72.5.dist-info → pyqrack_cpu_complex128-1.80.2.dist-info}/METADATA +3 -3
- pyqrack_cpu_complex128-1.80.2.dist-info/RECORD +23 -0
- pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.9.32.6.dylib +0 -0
- pyqrack_cpu_complex128-1.72.5.dist-info/RECORD +0 -23
- {pyqrack_cpu_complex128-1.72.5.dist-info → pyqrack_cpu_complex128-1.80.2.dist-info}/LICENSE +0 -0
- {pyqrack_cpu_complex128-1.72.5.dist-info → pyqrack_cpu_complex128-1.80.2.dist-info}/WHEEL +0 -0
- {pyqrack_cpu_complex128-1.72.5.dist-info → pyqrack_cpu_complex128-1.80.2.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -28,13 +28,9 @@ class QrackSystem:
|
|
|
28
28
|
elif _platform == "win32":
|
|
29
29
|
shared_lib_path = os.path.dirname(__file__) + "/qrack_lib/qrack_pinvoke.dll"
|
|
30
30
|
elif _platform == "darwin":
|
|
31
|
-
shared_lib_path = (
|
|
32
|
-
os.path.dirname(__file__) + "/qrack_lib/libqrack_pinvoke.dylib"
|
|
33
|
-
)
|
|
31
|
+
shared_lib_path = os.path.dirname(__file__) + "/qrack_lib/libqrack_pinvoke.dylib"
|
|
34
32
|
else:
|
|
35
|
-
shared_lib_path = (
|
|
36
|
-
os.path.dirname(__file__) + "/qrack_lib/libqrack_pinvoke.so"
|
|
37
|
-
)
|
|
33
|
+
shared_lib_path = os.path.dirname(__file__) + "/qrack_lib/libqrack_pinvoke.so"
|
|
38
34
|
|
|
39
35
|
try:
|
|
40
36
|
self.qrack_lib = CDLL(shared_lib_path)
|
|
@@ -50,9 +46,7 @@ class QrackSystem:
|
|
|
50
46
|
self.qrack_lib = CDLL(shared_lib_path)
|
|
51
47
|
except Exception as e:
|
|
52
48
|
if _platform == "win32":
|
|
53
|
-
shared_lib_path = (
|
|
54
|
-
"C:/Program Files (x86)/Qrack/bin/qrack_pinvoke.dll"
|
|
55
|
-
)
|
|
49
|
+
shared_lib_path = "C:/Program Files (x86)/Qrack/bin/qrack_pinvoke.dll"
|
|
56
50
|
elif _platform == "darwin":
|
|
57
51
|
shared_lib_path = "/usr/lib/qrack/libqrack_pinvoke.dylib"
|
|
58
52
|
else:
|
|
@@ -97,12 +91,22 @@ class QrackSystem:
|
|
|
97
91
|
self.qrack_lib.InKet.argtypes = [c_ulonglong, POINTER(c_float)]
|
|
98
92
|
self.qrack_lib.OutKet.argtypes = [c_ulonglong, POINTER(c_float)]
|
|
99
93
|
self.qrack_lib.OutProbs.argtypes = [c_ulonglong, POINTER(c_float)]
|
|
100
|
-
self.qrack_lib.OutReducedDensityMatrix.argtypes = [
|
|
94
|
+
self.qrack_lib.OutReducedDensityMatrix.argtypes = [
|
|
95
|
+
c_ulonglong,
|
|
96
|
+
c_ulonglong,
|
|
97
|
+
POINTER(c_ulonglong),
|
|
98
|
+
POINTER(c_float),
|
|
99
|
+
]
|
|
101
100
|
else:
|
|
102
101
|
self.qrack_lib.InKet.argtypes = [c_ulonglong, POINTER(c_double)]
|
|
103
102
|
self.qrack_lib.OutKet.argtypes = [c_ulonglong, POINTER(c_double)]
|
|
104
103
|
self.qrack_lib.OutProbs.argtypes = [c_ulonglong, POINTER(c_double)]
|
|
105
|
-
self.qrack_lib.OutReducedDensityMatrix.argtypes = [
|
|
104
|
+
self.qrack_lib.OutReducedDensityMatrix.argtypes = [
|
|
105
|
+
c_ulonglong,
|
|
106
|
+
c_ulonglong,
|
|
107
|
+
POINTER(c_ulonglong),
|
|
108
|
+
POINTER(c_double),
|
|
109
|
+
]
|
|
106
110
|
|
|
107
111
|
self.qrack_lib.init.restype = c_ulonglong
|
|
108
112
|
self.qrack_lib.init.argtypes = []
|
|
@@ -129,7 +133,7 @@ class QrackSystem:
|
|
|
129
133
|
c_bool,
|
|
130
134
|
c_bool,
|
|
131
135
|
c_bool,
|
|
132
|
-
c_bool
|
|
136
|
+
c_bool,
|
|
133
137
|
]
|
|
134
138
|
|
|
135
139
|
self.qrack_lib.init_count_stabilizer.restype = c_ulonglong
|
|
@@ -1219,6 +1223,12 @@ class QrackSystem:
|
|
|
1219
1223
|
self.qrack_lib.SetNoiseParameter.restype = None
|
|
1220
1224
|
self.qrack_lib.SetNoiseParameter.argtypes = [c_ulonglong, c_double]
|
|
1221
1225
|
|
|
1226
|
+
self.qrack_lib.SetAceMaxQb.restype = None
|
|
1227
|
+
self.qrack_lib.SetAceMaxQb.argtypes = [c_ulonglong, c_ulonglong]
|
|
1228
|
+
|
|
1229
|
+
self.qrack_lib.SetSparseAceMaxMb.restype = None
|
|
1230
|
+
self.qrack_lib.SetSparseAceMaxMb.argtypes = [c_ulonglong, c_size_t]
|
|
1231
|
+
|
|
1222
1232
|
self.qrack_lib.Normalize.restype = None
|
|
1223
1233
|
self.qrack_lib.Normalize.argtypes = [c_ulonglong]
|
|
1224
1234
|
|
|
@@ -1245,6 +1255,9 @@ class QrackSystem:
|
|
|
1245
1255
|
self.qrack_lib.destroy_qneuron.restype = None
|
|
1246
1256
|
self.qrack_lib.destroy_qneuron.argtypes = [c_ulonglong]
|
|
1247
1257
|
|
|
1258
|
+
self.qrack_lib.set_qneuron_sim.restype = None
|
|
1259
|
+
self.qrack_lib.set_qneuron_sim.argtypes = [c_ulonglong, c_ulonglong]
|
|
1260
|
+
|
|
1248
1261
|
self.qrack_lib.set_qneuron_angles.restype = None
|
|
1249
1262
|
self.qrack_lib.get_qneuron_angles.restype = None
|
|
1250
1263
|
|
|
@@ -20,9 +20,7 @@ def load_data(sim, index_bits, value_bits, data):
|
|
|
20
20
|
Value error: Length of value_bits does not match data feature column count!
|
|
21
21
|
"""
|
|
22
22
|
if (len(data) > 0) and (len(value_bits) != len(data[0])):
|
|
23
|
-
raise ValueError(
|
|
24
|
-
"Length of value_bits does not match data feature column count!"
|
|
25
|
-
)
|
|
23
|
+
raise ValueError("Length of value_bits does not match data feature column count!")
|
|
26
24
|
|
|
27
25
|
for i in range(index_bits):
|
|
28
26
|
if sim.m(i):
|
|
@@ -28,9 +28,7 @@ try:
|
|
|
28
28
|
min_val, max_val = data[:, i].min(), data[:, i].max()
|
|
29
29
|
thresholds = np.linspace(min_val, max_val, n_bins + 1)[1:-1]
|
|
30
30
|
bins = np.digitize(data[:, i], bins=thresholds)
|
|
31
|
-
bin_bits = ((bins[:, None] & (1 << np.arange(bits)[::-1])) > 0).astype(
|
|
32
|
-
int
|
|
33
|
-
)
|
|
31
|
+
bin_bits = ((bins[:, None] & (1 << np.arange(bits)[::-1])) > 0).astype(int)
|
|
34
32
|
new_features.append(bin_bits)
|
|
35
33
|
else:
|
|
36
34
|
new_features.append(data[:, i][:, None]) # Keep original
|
|
@@ -51,6 +49,4 @@ except ImportError:
|
|
|
51
49
|
Returns:
|
|
52
50
|
np.ndarray: Transformed data with selected features replaced by binary bit columns.
|
|
53
51
|
"""
|
|
54
|
-
raise NotImplementedError(
|
|
55
|
-
"You must have numpy installed to use quantize_by_percentile()!"
|
|
56
|
-
)
|
|
52
|
+
raise NotImplementedError("You must have numpy installed to use quantize_by_percentile()!")
|
{pyqrack_cpu_complex128-1.72.5.dist-info → pyqrack_cpu_complex128-1.80.2.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyqrack-cpu-complex128
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.80.2
|
|
4
4
|
Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
|
|
5
5
|
Home-page: https://github.com/vm6502q/pyqrack
|
|
6
6
|
Author: Daniel Strano
|
|
@@ -15,8 +15,6 @@ Classifier: Operating System :: MacOS
|
|
|
15
15
|
Classifier: Operating System :: POSIX :: Linux
|
|
16
16
|
Classifier: Programming Language :: C++
|
|
17
17
|
Classifier: Programming Language :: Python :: 2
|
|
18
|
-
Classifier: Programming Language :: Python :: 2.3
|
|
19
|
-
Classifier: Programming Language :: Python :: 2.4
|
|
20
18
|
Classifier: Programming Language :: Python :: 2.5
|
|
21
19
|
Classifier: Programming Language :: Python :: 2.6
|
|
22
20
|
Classifier: Programming Language :: Python :: 2.7
|
|
@@ -34,6 +32,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
34
32
|
Classifier: Programming Language :: Python :: 3.10
|
|
35
33
|
Classifier: Programming Language :: Python :: 3.11
|
|
36
34
|
Classifier: Programming Language :: Python :: 3.12
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
37
37
|
Classifier: Topic :: Scientific/Engineering :: Quantum Computing
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
39
39
|
License-File: LICENSE
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
pyqrack/__init__.py,sha256=P-J0gPYsYfeoBdJA0EqGwrmGwM0-hyI6pqb0Qd40Rpg,790
|
|
2
|
+
pyqrack/neuron_activation_fn.py,sha256=fQTTFfsvwcot_43Vopacot47IV2Rxk8pelUyuzwpXPs,593
|
|
3
|
+
pyqrack/pauli.py,sha256=wg500wDOwdIU4lEVJoMmjtbAdmtakZYzLPjdzC2rwUQ,654
|
|
4
|
+
pyqrack/qrack_ace_backend.py,sha256=-LSEX-M_hg-17LL27rLh8fpwuJaMEQeQpXzYoiuC21A,49143
|
|
5
|
+
pyqrack/qrack_circuit.py,sha256=jcelcoRrAWJBs9OrjBKkCba1MEIUcXeXDMKH3iwOl2Y,19778
|
|
6
|
+
pyqrack/qrack_neuron.py,sha256=TQl3jNFu5E41yuILBQIeSeagr4mRAPakKufFvniJOOc,12219
|
|
7
|
+
pyqrack/qrack_neuron_torch_layer.py,sha256=zAcB_xGnCGKZQSJQLth-nyYob-ewdOs4EEmms6lr4nw,9715
|
|
8
|
+
pyqrack/qrack_simulator.py,sha256=41nQEjC8IRhPz2_McpH9G-1T7V1aFK82RRKLxt1oJeo,148879
|
|
9
|
+
pyqrack/qrack_stabilizer.py,sha256=O-7VJ9Vw4h25PK_kesSjIqHXGSo8lLrQLIyGgmzG7Co,2124
|
|
10
|
+
pyqrack/quimb_circuit_type.py,sha256=Sk-Tmn38kUYmAkJJ75btWuhYZyTXOOezmowFhfdiGDc,621
|
|
11
|
+
pyqrack/qrack_system/__init__.py,sha256=-oZ9dsb1hixsnrkUJRY_C5DzQ_l6MtifF_Z465BgqV4,334
|
|
12
|
+
pyqrack/qrack_system/qrack_system.py,sha256=2Me1K7z74dzx1u5wcLpNK8mVrgn3aA1fCoj4jcf2guQ,44155
|
|
13
|
+
pyqrack/qrack_system/qrack_cl_precompile/qrack_cl_precompile,sha256=oVv74H7l9G0k6YTYFqYWygQ9XV-xt7IcyPwZlpudbuw,36224
|
|
14
|
+
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.9.35.1.dylib,sha256=NiRG8bQF2Ve0A4Up9jux6sf3krHOCbl8v1VENOg7cn8,3660640
|
|
15
|
+
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib,sha256=NiRG8bQF2Ve0A4Up9jux6sf3krHOCbl8v1VENOg7cn8,3660640
|
|
16
|
+
pyqrack/stats/__init__.py,sha256=Hla85my2fY_roR9lIjGBVpEG7ySOTMwjWa8D6-kgCnY,276
|
|
17
|
+
pyqrack/stats/load_quantized_data.py,sha256=10-ZULlnSX45br7fDtJuiCzcMTAL4eI3QyhSENXZjgM,1162
|
|
18
|
+
pyqrack/stats/quantize_by_range.py,sha256=zPLMNuuyzMPvB-K9Ukc-RjzIzwCsZkzuT2gZneCeCBg,2210
|
|
19
|
+
pyqrack_cpu_complex128-1.80.2.dist-info/LICENSE,sha256=HxB-7SaWTuewAk1nz-3_3FUD6QhgX73kNT_taKVUTq8,1069
|
|
20
|
+
pyqrack_cpu_complex128-1.80.2.dist-info/METADATA,sha256=pLhd3THujhQng4xinIulU31-Ek7balN-9xln15c_b28,6051
|
|
21
|
+
pyqrack_cpu_complex128-1.80.2.dist-info/WHEEL,sha256=BM14wstXunLvpW3hePaerLq1eZfN4NnYgS3CIXR7_AM,106
|
|
22
|
+
pyqrack_cpu_complex128-1.80.2.dist-info/top_level.txt,sha256=YE_3q9JTGRLMilNg2tGP1y7uU-Dx8PDao2OhwoIbv8E,8
|
|
23
|
+
pyqrack_cpu_complex128-1.80.2.dist-info/RECORD,,
|
|
Binary file
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
pyqrack/__init__.py,sha256=3tBwfCCD-zQjQ2g1EUZdggKdn-3b2uSFTbT7LS0YLaU,785
|
|
2
|
-
pyqrack/neuron_activation_fn.py,sha256=fQTTFfsvwcot_43Vopacot47IV2Rxk8pelUyuzwpXPs,593
|
|
3
|
-
pyqrack/pauli.py,sha256=wg500wDOwdIU4lEVJoMmjtbAdmtakZYzLPjdzC2rwUQ,654
|
|
4
|
-
pyqrack/qrack_ace_backend.py,sha256=Prw1NhVVt0csbHiJeW8MJI9rl1P1YS63sXM5quoNPrI,49392
|
|
5
|
-
pyqrack/qrack_circuit.py,sha256=vDCKGbcEHJDFUKprjCpWgit8lXFnMrPimKHURD2_Hj4,19538
|
|
6
|
-
pyqrack/qrack_neuron.py,sha256=UiJdjAGB6usjAGHWSosSFCUUeIkhh3MtZbsaxfsIsNw,9043
|
|
7
|
-
pyqrack/qrack_neuron_torch_layer.py,sha256=Bs5BLC2GFevfSpo_jSJ2AZl-hfDRJmzlGN9pFw1CtoQ,6160
|
|
8
|
-
pyqrack/qrack_simulator.py,sha256=PSrcEIlzCt33WXjoEo5dZdmzx9zR90QI_Dw9LTphjMg,146030
|
|
9
|
-
pyqrack/qrack_stabilizer.py,sha256=O-7VJ9Vw4h25PK_kesSjIqHXGSo8lLrQLIyGgmzG7Co,2124
|
|
10
|
-
pyqrack/quimb_circuit_type.py,sha256=Sk-Tmn38kUYmAkJJ75btWuhYZyTXOOezmowFhfdiGDc,621
|
|
11
|
-
pyqrack/qrack_system/__init__.py,sha256=-oZ9dsb1hixsnrkUJRY_C5DzQ_l6MtifF_Z465BgqV4,334
|
|
12
|
-
pyqrack/qrack_system/qrack_system.py,sha256=3NFejSMePILaND-h3bdwRrX-WuhdZj-Uzt-8i90_xQE,43719
|
|
13
|
-
pyqrack/qrack_system/qrack_cl_precompile/qrack_cl_precompile,sha256=oVv74H7l9G0k6YTYFqYWygQ9XV-xt7IcyPwZlpudbuw,36224
|
|
14
|
-
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.9.32.6.dylib,sha256=X-Znc3OoiY8Ot67HKDrebBL5PS8mntq8DVGt0NBwNBs,3642544
|
|
15
|
-
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib,sha256=X-Znc3OoiY8Ot67HKDrebBL5PS8mntq8DVGt0NBwNBs,3642544
|
|
16
|
-
pyqrack/stats/__init__.py,sha256=Hla85my2fY_roR9lIjGBVpEG7ySOTMwjWa8D6-kgCnY,276
|
|
17
|
-
pyqrack/stats/load_quantized_data.py,sha256=z12u9F7Nt3P-i44nY1xxvso_klS6WIHS3iqq7R2_lqE,1184
|
|
18
|
-
pyqrack/stats/quantize_by_range.py,sha256=UM0_7jJDdQ7g30cR3UQAxkbzkqrmsy1oUfqg0h11FUY,2270
|
|
19
|
-
pyqrack_cpu_complex128-1.72.5.dist-info/LICENSE,sha256=HxB-7SaWTuewAk1nz-3_3FUD6QhgX73kNT_taKVUTq8,1069
|
|
20
|
-
pyqrack_cpu_complex128-1.72.5.dist-info/METADATA,sha256=586W-g2Q48xlnIYw0VbS6a4kpuLV-vZS7S1HORxW1Cw,6049
|
|
21
|
-
pyqrack_cpu_complex128-1.72.5.dist-info/WHEEL,sha256=BM14wstXunLvpW3hePaerLq1eZfN4NnYgS3CIXR7_AM,106
|
|
22
|
-
pyqrack_cpu_complex128-1.72.5.dist-info/top_level.txt,sha256=YE_3q9JTGRLMilNg2tGP1y7uU-Dx8PDao2OhwoIbv8E,8
|
|
23
|
-
pyqrack_cpu_complex128-1.72.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{pyqrack_cpu_complex128-1.72.5.dist-info → pyqrack_cpu_complex128-1.80.2.dist-info}/top_level.txt
RENAMED
|
File without changes
|