pyqrack-cpu 1.76.0__py3-none-macosx_14_0_arm64.whl → 1.80.3__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.
@@ -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 = [c_ulonglong, c_ulonglong, POINTER(c_ulonglong), POINTER(c_float)]
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 = [c_ulonglong, c_ulonglong, POINTER(c_ulonglong), POINTER(c_double)]
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
@@ -1251,6 +1255,9 @@ class QrackSystem:
1251
1255
  self.qrack_lib.destroy_qneuron.restype = None
1252
1256
  self.qrack_lib.destroy_qneuron.argtypes = [c_ulonglong]
1253
1257
 
1258
+ self.qrack_lib.set_qneuron_sim.restype = None
1259
+ self.qrack_lib.set_qneuron_sim.argtypes = [c_ulonglong, c_ulonglong]
1260
+
1254
1261
  self.qrack_lib.set_qneuron_angles.restype = None
1255
1262
  self.qrack_lib.get_qneuron_angles.restype = None
1256
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()!")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyqrack-cpu
3
- Version: 1.76.0
3
+ Version: 1.80.3
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=Ix5AoE_rhufDaBheEFIOCWYCFj-yHksG_mIngFsTs4Y,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.2.dylib,sha256=rMu5RPf5PYheq8swrAe7d2aHdBD8JbtDMCjBbEIx2v4,3642576
15
+ pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib,sha256=rMu5RPf5PYheq8swrAe7d2aHdBD8JbtDMCjBbEIx2v4,3642576
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-1.80.3.dist-info/LICENSE,sha256=HxB-7SaWTuewAk1nz-3_3FUD6QhgX73kNT_taKVUTq8,1069
20
+ pyqrack_cpu-1.80.3.dist-info/METADATA,sha256=RQjAgZJaiEc6_9NliH5i08HzIhwmVrxG9D2T4wJOuRw,5974
21
+ pyqrack_cpu-1.80.3.dist-info/WHEEL,sha256=BM14wstXunLvpW3hePaerLq1eZfN4NnYgS3CIXR7_AM,106
22
+ pyqrack_cpu-1.80.3.dist-info/top_level.txt,sha256=YE_3q9JTGRLMilNg2tGP1y7uU-Dx8PDao2OhwoIbv8E,8
23
+ pyqrack_cpu-1.80.3.dist-info/RECORD,,
@@ -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=oC5xl6YPBFRlsWJwVHxpYPE19hQe1fYnHrpwEknwcUc,11669
7
- pyqrack/qrack_neuron_torch_layer.py,sha256=Bs5BLC2GFevfSpo_jSJ2AZl-hfDRJmzlGN9pFw1CtoQ,6160
8
- pyqrack/qrack_simulator.py,sha256=x0sG7NpnENUfAiQDxKxfAJF9zFNVryZR3BZGJ4j4nzg,147177
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=fcX9Lwmbbpx4bQiOs1SSUNu4y5v-PazvhsdbfJaag5U,43976
13
- pyqrack/qrack_system/qrack_cl_precompile/qrack_cl_precompile,sha256=oVv74H7l9G0k6YTYFqYWygQ9XV-xt7IcyPwZlpudbuw,36224
14
- pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.9.34.5.dylib,sha256=RMi864QZAftG0tMtw1AImj7SxduqxtNJTBjcxPk4Mwk,3642480
15
- pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib,sha256=RMi864QZAftG0tMtw1AImj7SxduqxtNJTBjcxPk4Mwk,3642480
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-1.76.0.dist-info/LICENSE,sha256=HxB-7SaWTuewAk1nz-3_3FUD6QhgX73kNT_taKVUTq8,1069
20
- pyqrack_cpu-1.76.0.dist-info/METADATA,sha256=E91GP8p82zQ3oo9BKqpjSFTSHbwkS3qm_7dlclQQECI,5972
21
- pyqrack_cpu-1.76.0.dist-info/WHEEL,sha256=BM14wstXunLvpW3hePaerLq1eZfN4NnYgS3CIXR7_AM,106
22
- pyqrack_cpu-1.76.0.dist-info/top_level.txt,sha256=YE_3q9JTGRLMilNg2tGP1y7uU-Dx8PDao2OhwoIbv8E,8
23
- pyqrack_cpu-1.76.0.dist-info/RECORD,,