pennylane-qrack 0.10.16__py3-none-win_amd64.whl → 0.10.19__py3-none-win_amd64.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 pennylane-qrack might be problematic. Click here for more details.
- pennylane_qrack/QrackDeviceConfig.toml +2 -1
- pennylane_qrack/_version.py +1 -1
- pennylane_qrack/qrack_device.cpp +12 -6
- pennylane_qrack/qrack_device.py +9 -5
- {pennylane_qrack-0.10.16.dist-info → pennylane_qrack-0.10.19.dist-info}/METADATA +1 -1
- pennylane_qrack-0.10.19.dist-info/RECORD +11 -0
- pennylane_qrack-0.10.16.dist-info/RECORD +0 -11
- {pennylane_qrack-0.10.16.dist-info → pennylane_qrack-0.10.19.dist-info}/LICENSE +0 -0
- {pennylane_qrack-0.10.16.dist-info → pennylane_qrack-0.10.19.dist-info}/WHEEL +0 -0
- {pennylane_qrack-0.10.16.dist-info → pennylane_qrack-0.10.19.dist-info}/entry_points.txt +0 -0
- {pennylane_qrack-0.10.16.dist-info → pennylane_qrack-0.10.19.dist-info}/top_level.txt +0 -0
|
@@ -58,7 +58,6 @@ Identity = { properties = [ "controllable", "invertible" ] }
|
|
|
58
58
|
# SISWAP = {}
|
|
59
59
|
# SQISW = {}
|
|
60
60
|
# BasisState = {}
|
|
61
|
-
# QubitStateVector = {}
|
|
62
61
|
# StatePrep = {}
|
|
63
62
|
# ControlledQubitUnitary = {}
|
|
64
63
|
# DiagonalQubitUnitary = {}
|
|
@@ -140,6 +139,8 @@ is_schmidt_decomposition_parallel = "isSchmidtDecomposeMulti"
|
|
|
140
139
|
is_qbdd = "isBinaryDecisionTree"
|
|
141
140
|
# Use GPU acceleration? (Default is "true")
|
|
142
141
|
is_gpu = "isOpenCL"
|
|
142
|
+
# Use multi-GPU (or "multi-page") acceleration? (Default is "false")
|
|
143
|
+
is_paged = "isPaged"
|
|
143
144
|
# Use CPU/GPU method hybridization? (Default is "false")
|
|
144
145
|
is_hybrid_cpu_gpu = "isCpuGpuHybrid"
|
|
145
146
|
# Allocate GPU buffer from general host heap? (Default is "false"; "true" might improve performance or reliability in certain cases, like if using an Intel HD as accelerator)
|
pennylane_qrack/_version.py
CHANGED
pennylane_qrack/qrack_device.cpp
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
#define CL_HPP_TARGET_OPENCL_VERSION 300
|
|
7
7
|
#include "qrack/qfactory.hpp"
|
|
8
8
|
|
|
9
|
-
#define QSIM_CONFIG(numQubits) Qrack::CreateArrangedLayersFull(nw, md, sd, sh, bdt,
|
|
9
|
+
#define QSIM_CONFIG(numQubits) Qrack::CreateArrangedLayersFull(nw, md, sd, sh, bdt, pg, tn, hy, oc, numQubits, Qrack::ZERO_BCI, nullptr, Qrack::CMPLX_DEFAULT_ARG, false, true, hp)
|
|
10
10
|
|
|
11
11
|
std::string trim(std::string s)
|
|
12
12
|
{
|
|
@@ -38,6 +38,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
|
|
|
38
38
|
bool md;
|
|
39
39
|
bool bdt;
|
|
40
40
|
bool oc;
|
|
41
|
+
bool pg;
|
|
41
42
|
bool hy;
|
|
42
43
|
bool hp;
|
|
43
44
|
bool nw;
|
|
@@ -386,6 +387,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
|
|
|
386
387
|
, md(true)
|
|
387
388
|
, bdt(false)
|
|
388
389
|
, oc(true)
|
|
390
|
+
, pg(false)
|
|
389
391
|
, hy(false)
|
|
390
392
|
, hp(false)
|
|
391
393
|
, nw(false)
|
|
@@ -405,9 +407,10 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
|
|
|
405
407
|
keyMap["'is_schmidt_decomposition_parallel'"] = 4;
|
|
406
408
|
keyMap["'is_qbdd'"] = 5;
|
|
407
409
|
keyMap["'is_gpu'"] = 6;
|
|
408
|
-
keyMap["'
|
|
409
|
-
keyMap["'
|
|
410
|
-
keyMap["'
|
|
410
|
+
keyMap["'is_paged'"] = 7;
|
|
411
|
+
keyMap["'is_hybrid_cpu_gpu'"] = 8;
|
|
412
|
+
keyMap["'is_host_pointer'"] =9;
|
|
413
|
+
keyMap["'noise'"] = 10;
|
|
411
414
|
|
|
412
415
|
size_t pos;
|
|
413
416
|
Qrack::real1_f noiseParam = 0;
|
|
@@ -438,12 +441,15 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
|
|
|
438
441
|
oc = val;
|
|
439
442
|
break;
|
|
440
443
|
case 7:
|
|
441
|
-
|
|
444
|
+
pg = val;
|
|
442
445
|
break;
|
|
443
446
|
case 8:
|
|
444
|
-
|
|
447
|
+
hy = val;
|
|
445
448
|
break;
|
|
446
449
|
case 9:
|
|
450
|
+
hp = val;
|
|
451
|
+
break;
|
|
452
|
+
case 10:
|
|
447
453
|
noiseParam = std::stof(value);
|
|
448
454
|
nw = noiseParam > ZERO_R1;
|
|
449
455
|
break;
|
pennylane_qrack/qrack_device.py
CHANGED
|
@@ -27,7 +27,7 @@ import numpy as np
|
|
|
27
27
|
from pennylane import DeviceError, QuantumFunctionError
|
|
28
28
|
from pennylane.devices import QubitDevice
|
|
29
29
|
from pennylane.ops import (
|
|
30
|
-
|
|
30
|
+
StatePrep,
|
|
31
31
|
BasisState,
|
|
32
32
|
QubitUnitary,
|
|
33
33
|
CRZ,
|
|
@@ -157,8 +157,10 @@ class QrackDevice(QubitDevice):
|
|
|
157
157
|
isBinaryDecisionTree = False
|
|
158
158
|
# Use GPU acceleration? (Default is "true")
|
|
159
159
|
isOpenCL = True
|
|
160
|
+
# Use multi-GPU (or "multi-page") acceleration? (Default is "false")
|
|
161
|
+
isPaged = True
|
|
160
162
|
# Use CPU/GPU method hybridization? (Default is "false")
|
|
161
|
-
isCpuGpuHybrid =
|
|
163
|
+
isCpuGpuHybrid = True
|
|
162
164
|
# Allocate GPU buffer from general host heap? (Default is "false"; "true" might improve performance or reliability in certain cases, like if using an Intel HD as accelerator)
|
|
163
165
|
isHostPointer = False
|
|
164
166
|
# Noise parameter. (Default is "0"; depolarizing noise intensity can also be controlled by "QRACK_GATE_DEPOLARIZATION" environment variable)
|
|
@@ -188,6 +190,8 @@ class QrackDevice(QubitDevice):
|
|
|
188
190
|
self.isBinaryDecisionTree = options["isBinaryDecisionTree"]
|
|
189
191
|
if "isOpenCL" in options:
|
|
190
192
|
self.isOpenCL = options["isOpenCL"]
|
|
193
|
+
if "isPaged" in options:
|
|
194
|
+
self.isPaged = options["isPaged"]
|
|
191
195
|
if "isCpuGpuHybrid" in options:
|
|
192
196
|
self.isCpuGpuHybrid = options["isCpuGpuHybrid"]
|
|
193
197
|
if "isHostPointer" in options:
|
|
@@ -234,8 +238,8 @@ class QrackDevice(QubitDevice):
|
|
|
234
238
|
|
|
235
239
|
def _apply(self):
|
|
236
240
|
for op in self._circuit:
|
|
237
|
-
if isinstance(op,
|
|
238
|
-
self.
|
|
241
|
+
if isinstance(op, StatePrep):
|
|
242
|
+
self._apply_state_prep(op)
|
|
239
243
|
elif isinstance(op, BasisState):
|
|
240
244
|
self._apply_basis_state(op)
|
|
241
245
|
elif isinstance(op, QubitUnitary):
|
|
@@ -264,7 +268,7 @@ class QrackDevice(QubitDevice):
|
|
|
264
268
|
|
|
265
269
|
return state_vector.flatten()
|
|
266
270
|
|
|
267
|
-
def
|
|
271
|
+
def _apply_state_prep(self, op):
|
|
268
272
|
"""Initialize state with a state vector"""
|
|
269
273
|
wires = op.wires
|
|
270
274
|
input_state = op.parameters[0]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
pennylane_qrack/QrackDeviceConfig.toml,sha256=7DBvKiehA9a55767DRAR9di4c16jD2vpJKxP7LdwLLs,6537
|
|
2
|
+
pennylane_qrack/__init__.py,sha256=5iuZ5OqhRPLxj5cs9jGaUTDv55iPXRVbcDHM6FNk-5c,689
|
|
3
|
+
pennylane_qrack/_version.py,sha256=fAYJzkRLhGvUfolIiUi-IF4f6XVwl7lJ0J5oLQt2xO8,712
|
|
4
|
+
pennylane_qrack/qrack_device.cpp,sha256=hbrL0XpvT6tORcH_UUTB-8p58EA0wZ0BJaO_VKvxXL4,37821
|
|
5
|
+
pennylane_qrack/qrack_device.py,sha256=YhoovXH_qDH8aLBj9tl9DF9vrBv_W7WRJDanUi_SSXI,28040
|
|
6
|
+
pennylane_qrack-0.10.19.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
7
|
+
pennylane_qrack-0.10.19.dist-info/METADATA,sha256=68WOwFFwQrZtypvX6NF03O18LneGUApMTqEo5TqRbCE,5670
|
|
8
|
+
pennylane_qrack-0.10.19.dist-info/WHEEL,sha256=rNPRVbVGKrjWvrFestJftL7zG4L3SaPg4hx5cyTUI8U,98
|
|
9
|
+
pennylane_qrack-0.10.19.dist-info/entry_points.txt,sha256=V6f1sN6IZZZaEvxrI47A3K_kksp8fDUWjLWD0Met7Ww,79
|
|
10
|
+
pennylane_qrack-0.10.19.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
|
|
11
|
+
pennylane_qrack-0.10.19.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
pennylane_qrack/QrackDeviceConfig.toml,sha256=CelWh6mjYkhuE659re3YAuaYHrGV9RfTtw-InO53uXk,6470
|
|
2
|
-
pennylane_qrack/__init__.py,sha256=5iuZ5OqhRPLxj5cs9jGaUTDv55iPXRVbcDHM6FNk-5c,689
|
|
3
|
-
pennylane_qrack/_version.py,sha256=z2EBwu6KFED9Qt2WvH5NR0kRiU3HMWkEYC54IWQPexQ,712
|
|
4
|
-
pennylane_qrack/qrack_device.cpp,sha256=KHrEzvKDqESixV18e_bzLpId2MyPUO39AvUySbSh7Xg,37666
|
|
5
|
-
pennylane_qrack/qrack_device.py,sha256=N1TkHgBOdAhA2MH6fZ35SnWaclvMxcrNpjPi7jxuwXA,27896
|
|
6
|
-
pennylane_qrack-0.10.16.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
7
|
-
pennylane_qrack-0.10.16.dist-info/METADATA,sha256=Z6svpOz9KhSU0Vs9517XqtC2z2b_WtheWIUcKPNse2w,5670
|
|
8
|
-
pennylane_qrack-0.10.16.dist-info/WHEEL,sha256=rNPRVbVGKrjWvrFestJftL7zG4L3SaPg4hx5cyTUI8U,98
|
|
9
|
-
pennylane_qrack-0.10.16.dist-info/entry_points.txt,sha256=V6f1sN6IZZZaEvxrI47A3K_kksp8fDUWjLWD0Met7Ww,79
|
|
10
|
-
pennylane_qrack-0.10.16.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
|
|
11
|
-
pennylane_qrack-0.10.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|