pennylane-qrack 0.9.7__py3-none-win_amd64.whl → 0.10.0__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.

@@ -142,8 +142,8 @@ is_qbdd = "isBinaryDecisionTree"
142
142
  is_gpu = "isOpenCL"
143
143
  # 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)
144
144
  is_host_pointer = "isHostPointer"
145
- # Use noisy simulation? (Default is "false"; depolarizing noise intensity can be controlled by "QRACK_GATE_DEPOLARIZATION" environment variable)
146
- is_noisy = "isNoisy"
145
+ # Noise parameter. (Default is "0"; depolarizing noise intensity can also be controlled by "QRACK_GATE_DEPOLARIZATION" environment variable)
146
+ noise = "noise"
147
147
 
148
148
  # In the above example, a dictionary will be constructed at run time.
149
149
  # The dictionary will contain the string key "option_key" and its value
@@ -16,4 +16,4 @@
16
16
  Version number (major.minor.patch[-label])
17
17
  """
18
18
 
19
- __version__ = "0.9.7"
19
+ __version__ = "0.10.0"
@@ -406,9 +406,10 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
406
406
  keyMap["'is_qbdd'"] = 5;
407
407
  keyMap["'is_gpu'"] = 6;
408
408
  keyMap["'is_host_pointer'"] =7;
409
- keyMap["'is_noisy'"] = 8;
409
+ keyMap["'noise'"] = 8;
410
410
 
411
411
  size_t pos;
412
+ Qrack::real1_f noiseParam = 0;
412
413
  while ((pos = kwargs.find(":")) != std::string::npos) {
413
414
  std::string key = trim(kwargs.substr(0, pos));
414
415
  kwargs.erase(0, pos + 1U);
@@ -439,7 +440,8 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
439
440
  hp = val;
440
441
  break;
441
442
  case 8:
442
- nw = val;
443
+ noiseParam = std::stof(value);
444
+ nw = noiseParam > ZERO_R1;
443
445
  break;
444
446
  default:
445
447
  break;
@@ -447,6 +449,9 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
447
449
  }
448
450
 
449
451
  qsim = QSIM_CONFIG(0U);
452
+ if (noiseParam > ZERO_R1) {
453
+ qsim->SetNoiseParameter(noiseParam);
454
+ }
450
455
  }
451
456
 
452
457
  QrackDevice &operator=(const QuantumDevice &) = delete;
@@ -158,8 +158,8 @@ class QrackDevice(QubitDevice):
158
158
  isOpenCL = True
159
159
  # 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)
160
160
  isHostPointer = False
161
- # Use noisy simulation? (Default is "false"; depolarizing noise intensity can be controlled by "QRACK_GATE_DEPOLARIZATION" environment variable)
162
- isNoisy = False
161
+ # Noise parameter. (Default is "0"; depolarizing noise intensity can also be controlled by "QRACK_GATE_DEPOLARIZATION" environment variable)
162
+ noise = 0
163
163
 
164
164
  @staticmethod
165
165
  def get_c_interface():
@@ -187,8 +187,8 @@ class QrackDevice(QubitDevice):
187
187
  self.isOpenCL = options['isOpenCL']
188
188
  if 'isHostPointer' in options:
189
189
  self.isHostPointer = options['isHostPointer']
190
- if 'isNoisy' in options:
191
- self.isNoisy = options['isNoisy']
190
+ if 'noise' in options:
191
+ self.noise = options['noise']
192
192
  super().__init__(wires=wires, shots=shots)
193
193
  self._state = QrackSimulator(
194
194
  self.num_wires,
@@ -198,7 +198,7 @@ class QrackDevice(QubitDevice):
198
198
  isBinaryDecisionTree=self.isBinaryDecisionTree,
199
199
  isOpenCL=self.isOpenCL,
200
200
  isHostPointer=self.isHostPointer,
201
- isNoisy=self.isNoisy
201
+ noise = self.noise
202
202
  )
203
203
 
204
204
  def _reverse_state(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pennylane-qrack
3
- Version: 0.9.7
3
+ Version: 0.10.0
4
4
  Summary: PennyLane plugin for Qrack.
5
5
  Home-page: http://github.com/vm6502q
6
6
  Maintainer: vm6502q
@@ -0,0 +1,11 @@
1
+ pennylane_qrack/QrackDeviceConfig.toml,sha256=cVamrrq847D0AoU6OA06S_8PA8MI0QT6JehZlrClSSk,6374
2
+ pennylane_qrack/__init__.py,sha256=5iuZ5OqhRPLxj5cs9jGaUTDv55iPXRVbcDHM6FNk-5c,689
3
+ pennylane_qrack/_version.py,sha256=Daafu-SMiUx4epWAuKpx0_9UAxERfNg2qKTu4Zm7ySY,711
4
+ pennylane_qrack/qrack_device.cpp,sha256=pvta3wfz9NVc5snpu8ptwy2EFSAKoEcEX6nbHEPBBsQ,37704
5
+ pennylane_qrack/qrack_device.py,sha256=h_HJJHzMvDx25pvO0HalQOVklCYDCpE3i02uImYCMFo,26684
6
+ pennylane_qrack-0.10.0.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
7
+ pennylane_qrack-0.10.0.dist-info/METADATA,sha256=yZSrFONzXsZbFzqibQLrG6grQvRMVz0PChMLLSW5u4E,5669
8
+ pennylane_qrack-0.10.0.dist-info/WHEEL,sha256=MKsKTYcJ8UB7nlhmb6_u5qoYj_ULa0PDSKtamp2tTfc,98
9
+ pennylane_qrack-0.10.0.dist-info/entry_points.txt,sha256=V6f1sN6IZZZaEvxrI47A3K_kksp8fDUWjLWD0Met7Ww,79
10
+ pennylane_qrack-0.10.0.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
11
+ pennylane_qrack-0.10.0.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- pennylane_qrack/QrackDeviceConfig.toml,sha256=F7u3h-coiXe0bm978GbU2uCiOaGMVdUOgGETZO4X1Vg,6383
2
- pennylane_qrack/__init__.py,sha256=5iuZ5OqhRPLxj5cs9jGaUTDv55iPXRVbcDHM6FNk-5c,689
3
- pennylane_qrack/_version.py,sha256=8HPTP86_e4l7AaxjJfazvFZhnmqrdJC7kEorv1TORhk,710
4
- pennylane_qrack/qrack_device.cpp,sha256=7RRwhGBaN9fvRASYDgQI9DA21PEcq6grkZRBNP9YGMg,37500
5
- pennylane_qrack/qrack_device.py,sha256=sGVTLXoh3SwBGOmVHqo1ivUS1h1x1bM7iP8aegXeUzQ,26702
6
- pennylane_qrack-0.9.7.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
7
- pennylane_qrack-0.9.7.dist-info/METADATA,sha256=6gwQMNGwjiJPdtNdhESZoUg2gb3KUJ_AX1KXq2C1mRA,5668
8
- pennylane_qrack-0.9.7.dist-info/WHEEL,sha256=MKsKTYcJ8UB7nlhmb6_u5qoYj_ULa0PDSKtamp2tTfc,98
9
- pennylane_qrack-0.9.7.dist-info/entry_points.txt,sha256=V6f1sN6IZZZaEvxrI47A3K_kksp8fDUWjLWD0Met7Ww,79
10
- pennylane_qrack-0.9.7.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
11
- pennylane_qrack-0.9.7.dist-info/RECORD,,