pennylane-qrack 0.15.4__py3-none-manylinux_2_35_x86_64.whl → 0.15.5__py3-none-manylinux_2_35_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 pennylane-qrack might be problematic. Click here for more details.

@@ -16,4 +16,4 @@
16
16
  Version number (major.minor.patch[-label])
17
17
  """
18
18
 
19
- __version__ = "0.15.4"
19
+ __version__ = "0.15.5"
Binary file
@@ -393,7 +393,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
393
393
  , hp(false)
394
394
  , nw(false)
395
395
  , shots(1U)
396
- , noise_param(0)
396
+ , noise_param(ZERO_R1_F)
397
397
  , qsim(nullptr)
398
398
  {
399
399
  // Cut leading '{' and trailing '}'
@@ -567,7 +567,12 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
567
567
  {
568
568
  return qsim->GetQubitCount();
569
569
  }
570
- void SetDeviceShots(size_t s) override { shots = s; }
570
+ void SetDeviceShots(size_t s) override {
571
+ if ((s > 1U) && (noise_param > ZERO_R1_F)) {
572
+ throw std::domain_error("Shots > 1 can't be simulated with noise on the Qrack back end! (Likely, you want to set mcm_method=\"one-shot\" on your qnode, with multiple shots.)");
573
+ }
574
+ shots = s;
575
+ }
571
576
  [[nodiscard]] auto GetDeviceShots() const -> size_t override { return shots; }
572
577
  void StartTapeRecording() override { tapeRecording = true; }
573
578
  void StopTapeRecording() override { tapeRecording = false; }
@@ -734,6 +739,10 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
734
739
  {
735
740
  RT_FAIL_IF(samples.size() != shots * qsim->GetQubitCount(), "Invalid size for the pre-allocated samples");
736
741
 
742
+ if ((shots > 1U) && (noise_param > ZERO_R1_F)) {
743
+ throw std::domain_error("Shots > 1 can't be simulated with noise on the Qrack back end! (Likely, you want to set mcm_method=\"one-shot\" on your qnode, with multiple shots.)");
744
+ }
745
+
737
746
  if (shots == 1U) {
738
747
  const bitCapInt rev_sample = qsim->MAll();
739
748
  const bitLenInt numQubits = qsim->GetQubitCount();
@@ -759,6 +768,10 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
759
768
  {
760
769
  RT_FAIL_IF(samples.size() != shots * wires.size(), "Invalid size for the pre-allocated samples");
761
770
 
771
+ if ((shots > 1U) && (noise_param > ZERO_R1_F)) {
772
+ throw std::domain_error("Shots > 1 can't be simulated with noise on the Qrack back end! (Likely, you want to set mcm_method=\"one-shot\" on your qnode, with multiple shots.)");
773
+ }
774
+
762
775
  auto &&dev_wires = getDeviceWires(wires);
763
776
 
764
777
  if (shots == 1U) {
@@ -839,6 +852,10 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
839
852
  RT_FAIL_IF(eigvals.size() != numElements || counts.size() != numElements,
840
853
  "Invalid size for the pre-allocated counts");
841
854
 
855
+ if ((shots > 1U) && (noise_param > ZERO_R1_F)) {
856
+ throw std::domain_error("Shots > 1 can't be simulated with noise on the Qrack back end! (Likely, you want to set mcm_method=\"one-shot\" on your qnode, with multiple shots.)");
857
+ }
858
+
842
859
  auto &&dev_wires = getDeviceWires(wires);
843
860
 
844
861
  std::map<bitCapInt, int> q_samples;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pennylane-qrack
3
- Version: 0.15.4
3
+ Version: 0.15.5
4
4
  Summary: PennyLane plugin for Qrack.
5
5
  Home-page: http://github.com/vm6502q
6
6
  Maintainer: vm6502q
@@ -2,14 +2,14 @@ pennylane_qrack/CMakeCache.txt,sha256=usrm5KNzAubRd78AO_i7k1qmUjtACaRyqi4m-esG7w
2
2
  pennylane_qrack/Makefile,sha256=Od_33AWv8Jgk8ZWvL7lklT2Awce38c1lIgMyys5-RuE,7584
3
3
  pennylane_qrack/QrackDeviceConfig.toml,sha256=oR9-dIAP6BzP3e2QSLroacaloHZsx7iJiKE6w7LGxUo,5459
4
4
  pennylane_qrack/__init__.py,sha256=_g4NKu07_pXqxvQaxjdAPe769S5tWwYjqyHi3z7YKHc,673
5
- pennylane_qrack/_version.py,sha256=9tSW6M-74XyUSjbUwhrrAr3YtIBDV-UTVVOgIDOOq2Y,692
5
+ pennylane_qrack/_version.py,sha256=8-PoMYrZDOLG88PFtMfT8-VpJhAMM5sdKY3aG1iHFho,692
6
6
  pennylane_qrack/cmake_install.cmake,sha256=jP3YWPs_F3JYlifubQTLq95RWHkadWyv_BNvMw3MzhU,3521
7
- pennylane_qrack/libqrack_device.so,sha256=_jnljxy6Y-hVtjxPAZxkxvAzbhSZSbdVWwwQhMwQvEw,5713184
8
- pennylane_qrack/qrack_device.cpp,sha256=qJChB_0n7vqqcgK1h3tipwcU-Pwmy81CtKsVBUmzPO0,37072
7
+ pennylane_qrack/libqrack_device.so,sha256=4q0hGcOf6InFWskva1uHl31Xru_aEZFlDfT4VO9HKDE,5713184
8
+ pennylane_qrack/qrack_device.cpp,sha256=0Dbey1g3DQeWYrzS9622Y7QDhizISuII49XLuv9xFIY,38115
9
9
  pennylane_qrack/qrack_device.py,sha256=DEiYy1eJQumWRIiNgxRWqc4YOYS1f85O2Jio7lWPuV8,27883
10
- pennylane_qrack-0.15.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
11
- pennylane_qrack-0.15.4.dist-info/METADATA,sha256=aI39V92rlrzdEmhwlCX961ar2AHbowTXuenabthQ4aQ,5739
12
- pennylane_qrack-0.15.4.dist-info/WHEEL,sha256=AMMNaGlKLEICDqgnxZojk7k8N6wUjQQ3X9tPjxJ2sOc,110
13
- pennylane_qrack-0.15.4.dist-info/entry_points.txt,sha256=CuMkXXiFq8_T_vUTLu_8fd9uh5C40M1e7x5vrWmsr48,80
14
- pennylane_qrack-0.15.4.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
15
- pennylane_qrack-0.15.4.dist-info/RECORD,,
10
+ pennylane_qrack-0.15.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
11
+ pennylane_qrack-0.15.5.dist-info/METADATA,sha256=lFgVKI2LKNerarUlfLa4gLN1hcPjyBdIHsBCc0cmhS8,5739
12
+ pennylane_qrack-0.15.5.dist-info/WHEEL,sha256=AMMNaGlKLEICDqgnxZojk7k8N6wUjQQ3X9tPjxJ2sOc,110
13
+ pennylane_qrack-0.15.5.dist-info/entry_points.txt,sha256=CuMkXXiFq8_T_vUTLu_8fd9uh5C40M1e7x5vrWmsr48,80
14
+ pennylane_qrack-0.15.5.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
15
+ pennylane_qrack-0.15.5.dist-info/RECORD,,