pennylane-qrack 0.15.3__tar.gz → 0.15.4__tar.gz

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.

Files changed (30) hide show
  1. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/PKG-INFO +1 -1
  2. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack/_version.py +1 -1
  3. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack/qrack_device.cpp +9 -5
  4. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack.egg-info/PKG-INFO +1 -1
  5. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/CHANGELOG.md +0 -0
  6. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/CMakeLists.txt +0 -0
  7. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/LICENSE +0 -0
  8. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/MANIFEST.in +0 -0
  9. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/Makefile +0 -0
  10. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/README.rst +0 -0
  11. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/catalyst/runtime/include/DataView.hpp +0 -0
  12. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/catalyst/runtime/include/DynamicLibraryLoader.hpp +0 -0
  13. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/catalyst/runtime/include/Exception.hpp +0 -0
  14. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/catalyst/runtime/include/QuantumDevice.hpp +0 -0
  15. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/catalyst/runtime/include/RuntimeCAPI.h +0 -0
  16. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/catalyst/runtime/include/Types.h +0 -0
  17. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack/QrackDeviceConfig.toml +0 -0
  18. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack/__init__.py +0 -0
  19. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack/qrack_device.py +0 -0
  20. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack.egg-info/SOURCES.txt +0 -0
  21. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack.egg-info/dependency_links.txt +0 -0
  22. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack.egg-info/entry_points.txt +0 -0
  23. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack.egg-info/requires.txt +0 -0
  24. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/pennylane_qrack.egg-info/top_level.txt +0 -0
  25. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/requirements.txt +0 -0
  26. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/setup.cfg +0 -0
  27. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/setup.py +0 -0
  28. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/tests/test_apply.py +0 -0
  29. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/tests/test_integration.py +0 -0
  30. {pennylane_qrack-0.15.3 → pennylane_qrack-0.15.4}/tests/test_units.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pennylane-qrack
3
- Version: 0.15.3
3
+ Version: 0.15.4
4
4
  Summary: PennyLane plugin for Qrack.
5
5
  Home-page: http://github.com/vm6502q
6
6
  Maintainer: vm6502q
@@ -16,4 +16,4 @@
16
16
  Version number (major.minor.patch[-label])
17
17
  """
18
18
 
19
- __version__ = "0.15.3"
19
+ __version__ = "0.15.4"
@@ -43,6 +43,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
43
43
  bool hp;
44
44
  bool nw;
45
45
  size_t shots;
46
+ Qrack::real1_f noise_param;
46
47
  Qrack::QInterfacePtr qsim;
47
48
  std::map<QubitIdType, bitLenInt> qubit_map;
48
49
  std::vector<QrackObservable> obs_cache;
@@ -392,6 +393,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
392
393
  , hp(false)
393
394
  , nw(false)
394
395
  , shots(1U)
396
+ , noise_param(0)
395
397
  , qsim(nullptr)
396
398
  {
397
399
  // Cut leading '{' and trailing '}'
@@ -413,7 +415,6 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
413
415
  keyMap["'noise'"] = 10;
414
416
 
415
417
  size_t pos;
416
- Qrack::real1_f noiseParam = 0;
417
418
  while ((pos = kwargs.find(":")) != std::string::npos) {
418
419
  std::string key = trim(kwargs.substr(0, pos));
419
420
  kwargs.erase(0, pos + 1U);
@@ -450,8 +451,8 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
450
451
  hp = val;
451
452
  break;
452
453
  case 10:
453
- noiseParam = std::stof(value);
454
- nw = noiseParam > ZERO_R1;
454
+ noise_param = std::stof(value);
455
+ nw = noise_param > ZERO_R1;
455
456
  break;
456
457
  default:
457
458
  break;
@@ -459,8 +460,8 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
459
460
  }
460
461
 
461
462
  qsim = QSIM_CONFIG(0U);
462
- if (noiseParam > ZERO_R1) {
463
- qsim->SetNoiseParameter(noiseParam);
463
+ if (noise_param > ZERO_R1) {
464
+ qsim->SetNoiseParameter(noise_param);
464
465
  }
465
466
  }
466
467
 
@@ -558,6 +559,9 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
558
559
  {
559
560
  // State vector is left empty
560
561
  qsim = QSIM_CONFIG(0U);
562
+ if (noise_param > ZERO_R1) {
563
+ qsim->SetNoiseParameter(noise_param);
564
+ }
561
565
  }
562
566
  [[nodiscard]] auto GetNumQubits() const -> size_t override
563
567
  {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pennylane-qrack
3
- Version: 0.15.3
3
+ Version: 0.15.4
4
4
  Summary: PennyLane plugin for Qrack.
5
5
  Home-page: http://github.com/vm6502q
6
6
  Maintainer: vm6502q