pyqrack-cpu 1.67.0__py3-none-macosx_13_0_x86_64.whl → 1.68.0__py3-none-macosx_13_0_x86_64.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.
Potentially problematic release.
This version of pyqrack-cpu might be problematic. Click here for more details.
- pyqrack/qrack_simulator.py +28 -11
- pyqrack/qrack_system/qrack_lib/{libqrack_pinvoke.9.26.0.dylib → libqrack_pinvoke.9.27.0.dylib} +0 -0
- pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib +0 -0
- pyqrack/qrack_system/qrack_system.py +3 -0
- {pyqrack_cpu-1.67.0.dist-info → pyqrack_cpu-1.68.0.dist-info}/METADATA +1 -1
- {pyqrack_cpu-1.67.0.dist-info → pyqrack_cpu-1.68.0.dist-info}/RECORD +9 -9
- {pyqrack_cpu-1.67.0.dist-info → pyqrack_cpu-1.68.0.dist-info}/LICENSE +0 -0
- {pyqrack_cpu-1.67.0.dist-info → pyqrack_cpu-1.68.0.dist-info}/WHEEL +0 -0
- {pyqrack_cpu-1.67.0.dist-info → pyqrack_cpu-1.68.0.dist-info}/top_level.txt +0 -0
pyqrack/qrack_simulator.py
CHANGED
|
@@ -2132,9 +2132,7 @@ class QrackSimulator:
|
|
|
2132
2132
|
def decompose(self, q):
|
|
2133
2133
|
"""Decompose system
|
|
2134
2134
|
|
|
2135
|
-
|
|
2136
|
-
Warning: The qubit subsystem state must be separable, or the behavior
|
|
2137
|
-
of this method is undefined.
|
|
2135
|
+
Factorize a set of contiguous bits with minimal fidelity loss.
|
|
2138
2136
|
|
|
2139
2137
|
Args:
|
|
2140
2138
|
q: qubit id
|
|
@@ -2144,7 +2142,7 @@ class QrackSimulator:
|
|
|
2144
2142
|
RuntimeError: QrackSimulator with isTensorNetwork=True option cannot decompose()! (Turn off just this option, in the constructor.)
|
|
2145
2143
|
|
|
2146
2144
|
Returns:
|
|
2147
|
-
|
|
2145
|
+
Decomposed subsystem simulator.
|
|
2148
2146
|
"""
|
|
2149
2147
|
if self.is_tensor_network:
|
|
2150
2148
|
raise RuntimeError(
|
|
@@ -2161,10 +2159,8 @@ class QrackSimulator:
|
|
|
2161
2159
|
def dispose(self, q):
|
|
2162
2160
|
"""Dispose qubits
|
|
2163
2161
|
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
Warning: The qubit subsystem state must be separable, or the behavior
|
|
2167
|
-
of this method is undefined.
|
|
2162
|
+
Factorize a set of contiguous bits with minimal fidelity loss,
|
|
2163
|
+
and discard the separable bits.
|
|
2168
2164
|
|
|
2169
2165
|
Args:
|
|
2170
2166
|
q: qubit
|
|
@@ -2172,9 +2168,6 @@ class QrackSimulator:
|
|
|
2172
2168
|
Raises:
|
|
2173
2169
|
RuntimeError: QrackSimulator raised an exception.
|
|
2174
2170
|
RuntimeError: QrackSimulator with isTensorNetwork=True option cannot dispose()! (Turn off just this option, in the constructor.)
|
|
2175
|
-
|
|
2176
|
-
Returns:
|
|
2177
|
-
State of the systems.
|
|
2178
2171
|
"""
|
|
2179
2172
|
if self.is_tensor_network:
|
|
2180
2173
|
raise RuntimeError(
|
|
@@ -2334,6 +2327,30 @@ class QrackSimulator:
|
|
|
2334
2327
|
r |= _r[w]
|
|
2335
2328
|
return r
|
|
2336
2329
|
|
|
2330
|
+
def highest_n_prob_perm(self, n):
|
|
2331
|
+
"""Get the top n permutations (bit strings) with the highest probability
|
|
2332
|
+
|
|
2333
|
+
Returns the top n highest-probability bit strings in the Hilbert space
|
|
2334
|
+
|
|
2335
|
+
Raises:
|
|
2336
|
+
RuntimeError: QrackSimulator raised an exception.
|
|
2337
|
+
|
|
2338
|
+
Returns:
|
|
2339
|
+
Top n highest probability dimension indices
|
|
2340
|
+
"""
|
|
2341
|
+
num_q = self.num_qubits()
|
|
2342
|
+
num_words = (num_q + 63) // 64
|
|
2343
|
+
_r = (ctypes.c_ulonglong * (num_words * n))()
|
|
2344
|
+
Qrack.qrack_lib.HighestProbAllN(self.sid, n, _r)
|
|
2345
|
+
self._throw_if_error()
|
|
2346
|
+
r = [0] * n
|
|
2347
|
+
for i in range(n):
|
|
2348
|
+
r[i] = 0
|
|
2349
|
+
for w in range(num_words):
|
|
2350
|
+
r[i] <<= 64
|
|
2351
|
+
r[i] |= _r[(i * num_words) + w]
|
|
2352
|
+
return r
|
|
2353
|
+
|
|
2337
2354
|
def prob_all(self, q):
|
|
2338
2355
|
"""Probabilities of all subset permutations
|
|
2339
2356
|
|
pyqrack/qrack_system/qrack_lib/{libqrack_pinvoke.9.26.0.dylib → libqrack_pinvoke.9.27.0.dylib}
RENAMED
|
Binary file
|
|
Binary file
|
|
@@ -161,6 +161,9 @@ class QrackSystem:
|
|
|
161
161
|
self.qrack_lib.HighestProbAll.restype = None
|
|
162
162
|
self.qrack_lib.HighestProbAll.argtypes = [c_ulonglong, POINTER(c_ulonglong)]
|
|
163
163
|
|
|
164
|
+
self.qrack_lib.HighestProbAllN.restype = None
|
|
165
|
+
self.qrack_lib.HighestProbAllN.argtypes = [c_ulonglong, c_ulonglong, POINTER(c_ulonglong)]
|
|
166
|
+
|
|
164
167
|
self.qrack_lib.ProbAll.restype = None
|
|
165
168
|
if self.fppow == 5:
|
|
166
169
|
self.qrack_lib.ProbAll.argtypes = [
|
|
@@ -5,19 +5,19 @@ pyqrack/qrack_ace_backend.py,sha256=Prw1NhVVt0csbHiJeW8MJI9rl1P1YS63sXM5quoNPrI,
|
|
|
5
5
|
pyqrack/qrack_circuit.py,sha256=vDCKGbcEHJDFUKprjCpWgit8lXFnMrPimKHURD2_Hj4,19538
|
|
6
6
|
pyqrack/qrack_neuron.py,sha256=UiJdjAGB6usjAGHWSosSFCUUeIkhh3MtZbsaxfsIsNw,9043
|
|
7
7
|
pyqrack/qrack_neuron_torch_layer.py,sha256=Bs5BLC2GFevfSpo_jSJ2AZl-hfDRJmzlGN9pFw1CtoQ,6160
|
|
8
|
-
pyqrack/qrack_simulator.py,sha256=
|
|
8
|
+
pyqrack/qrack_simulator.py,sha256=Ji1djQcZ6AFk5K3H6Y6TKQ6DNjnOh0XoClwlPYm2j90,145981
|
|
9
9
|
pyqrack/qrack_stabilizer.py,sha256=O-7VJ9Vw4h25PK_kesSjIqHXGSo8lLrQLIyGgmzG7Co,2124
|
|
10
10
|
pyqrack/quimb_circuit_type.py,sha256=Sk-Tmn38kUYmAkJJ75btWuhYZyTXOOezmowFhfdiGDc,621
|
|
11
11
|
pyqrack/qrack_system/__init__.py,sha256=-oZ9dsb1hixsnrkUJRY_C5DzQ_l6MtifF_Z465BgqV4,334
|
|
12
|
-
pyqrack/qrack_system/qrack_system.py,sha256=
|
|
12
|
+
pyqrack/qrack_system/qrack_system.py,sha256=qWtnWAIUdTlz7xavsEj8krd_3cVv_36KHex5jn-6kKs,43684
|
|
13
13
|
pyqrack/qrack_system/qrack_cl_precompile/qrack_cl_precompile,sha256=8xQYqoFTKIl-5v6ZkqmbWp14Eowkl8ty2vNF2shC5hU,35040
|
|
14
|
-
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.9.
|
|
15
|
-
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib,sha256=
|
|
14
|
+
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.9.27.0.dylib,sha256=OZmauubMX0Kqt9Lp0A0E49MZjjbztzkw3myVqc76Pvg,3188872
|
|
15
|
+
pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.dylib,sha256=OZmauubMX0Kqt9Lp0A0E49MZjjbztzkw3myVqc76Pvg,3188872
|
|
16
16
|
pyqrack/stats/__init__.py,sha256=Hla85my2fY_roR9lIjGBVpEG7ySOTMwjWa8D6-kgCnY,276
|
|
17
17
|
pyqrack/stats/load_quantized_data.py,sha256=z12u9F7Nt3P-i44nY1xxvso_klS6WIHS3iqq7R2_lqE,1184
|
|
18
18
|
pyqrack/stats/quantize_by_range.py,sha256=UM0_7jJDdQ7g30cR3UQAxkbzkqrmsy1oUfqg0h11FUY,2270
|
|
19
|
-
pyqrack_cpu-1.
|
|
20
|
-
pyqrack_cpu-1.
|
|
21
|
-
pyqrack_cpu-1.
|
|
22
|
-
pyqrack_cpu-1.
|
|
23
|
-
pyqrack_cpu-1.
|
|
19
|
+
pyqrack_cpu-1.68.0.dist-info/LICENSE,sha256=HxB-7SaWTuewAk1nz-3_3FUD6QhgX73kNT_taKVUTq8,1069
|
|
20
|
+
pyqrack_cpu-1.68.0.dist-info/METADATA,sha256=tNL45jTt-xMrtouv1z5hm6FKAzCZ1Nn4e_nGdnxPMKs,5951
|
|
21
|
+
pyqrack_cpu-1.68.0.dist-info/WHEEL,sha256=nZx8s83OrgdDmpcWX-8FgI0sEAjdQimt4SdYsdcCaC8,107
|
|
22
|
+
pyqrack_cpu-1.68.0.dist-info/top_level.txt,sha256=YE_3q9JTGRLMilNg2tGP1y7uU-Dx8PDao2OhwoIbv8E,8
|
|
23
|
+
pyqrack_cpu-1.68.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|