pennylane-qrack 0.20.3__py3-none-macosx_15_0_arm64.whl → 0.21.0__py3-none-macosx_15_0_arm64.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.20.3"
19
+ __version__ = "0.21.0"
Binary file
@@ -134,11 +134,11 @@ class QrackAceDevice(QubitDevice):
134
134
  # Noise parameter. (Default is "0"; depolarizing noise intensity can also be controlled by "QRACK_GATE_DEPOLARIZATION" environment variable)
135
135
  noise = 0
136
136
  # How many full simulation columns, between border columns
137
- long_range_columns=4
137
+ long_range_columns = 4
138
138
  # How many full simulation rows, between border rows
139
- long_range_rows=4
139
+ long_range_rows = 4
140
140
  # Whether to transpose rows and columns
141
- is_transpose=False
141
+ is_transpose = False
142
142
 
143
143
  def __init__(self, wires=0, shots=None, **kwargs):
144
144
  options = dict(kwargs)
@@ -376,7 +376,9 @@ class QrackAceDevice(QubitDevice):
376
376
  raise DeviceError(f"Operation {opname} is not supported on a {self.short_name} device.")
377
377
 
378
378
  def analytic_probability(self, wires=None):
379
- raise DeviceError(f"analytic_probability is not supported on a {self.short_name} device. (Specify a finite number of shots, instead.)")
379
+ raise DeviceError(
380
+ f"analytic_probability is not supported on a {self.short_name} device. (Specify a finite number of shots, instead.)"
381
+ )
380
382
 
381
383
  def expval(self, observable, **kwargs):
382
384
  if self.shots is None:
@@ -433,7 +435,9 @@ class QrackAceDevice(QubitDevice):
433
435
 
434
436
  # QubitDevice.states_to_binary() doesn't work for >64qb. (Fix by Elara, the custom OpenAI GPT)
435
437
  samples = self._state.measure_shots(list(range(self.num_wires - 1, -1, -1)), self.shots)
436
- self._samples = np.array([list(format(b, f"0{self.num_wires}b")) for b in samples], dtype=np.int8)
438
+ self._samples = np.array(
439
+ [list(format(b, f"0{self.num_wires}b")) for b in samples], dtype=np.int8
440
+ )
437
441
 
438
442
  return self._samples
439
443
 
@@ -483,8 +483,6 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
483
483
  }
484
484
  return ids;
485
485
  }
486
- [[nodiscard]] auto Zero() const -> Result override { return const_cast<Result>(&QRACK_RESULT_FALSE_CONST); }
487
- [[nodiscard]] auto One() const -> Result override { return const_cast<Result>(&QRACK_RESULT_TRUE_CONST); }
488
486
  auto Observable(ObsId id, const std::vector<std::complex<double>> &matrix,
489
487
  const std::vector<QubitIdType> &wires) -> ObsIdType override
490
488
  {
@@ -576,21 +574,6 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
576
574
  [[nodiscard]] auto GetDeviceShots() const -> size_t override { return shots; }
577
575
  void StartTapeRecording() override { tapeRecording = true; }
578
576
  void StopTapeRecording() override { tapeRecording = false; }
579
- void PrintState() override
580
- {
581
- const size_t numQubits = qsim->GetQubitCount();
582
- const size_t maxQPower = (size_t)((uint64_t)qsim->GetMaxQPower());
583
- const size_t maxLcv = maxQPower - 1U;
584
- size_t idx = 0U;
585
- std::cout << "*** State-Vector of Size " << maxQPower << " ***" << std::endl;
586
- std::cout << "[";
587
- std::unique_ptr<Qrack::complex> sv(new Qrack::complex[maxQPower]);
588
- qsim->GetQuantumState(sv.get());
589
- for (; idx < maxLcv; ++idx) {
590
- std::cout << sv.get()[idx] << ", ";
591
- }
592
- std::cout << sv.get()[idx] << "]" << std::endl;
593
- }
594
577
  void NamedOperation(const std::string &name, const std::vector<double> &params,
595
578
  const std::vector<QubitIdType> &wires, bool inverse,
596
579
  const std::vector<QubitIdType> &controlled_wires,
@@ -735,7 +718,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
735
718
  }
736
719
  }
737
720
  }
738
- void Sample(DataView<double, 2> &samples, size_t shots) override
721
+ void Sample(DataView<double, 2> &samples) override
739
722
  {
740
723
  RT_FAIL_IF(samples.size() != shots * qsim->GetQubitCount(), "Invalid size for the pre-allocated samples");
741
724
 
@@ -764,7 +747,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
764
747
  const std::map<bitCapInt, int> q_samples = qsim->MultiShotMeasureMask(qPowers, shots);
765
748
  _SampleBody(qPowers.size(), q_samples, samples);
766
749
  }
767
- void PartialSample(DataView<double, 2> &samples, const std::vector<QubitIdType> &wires, size_t shots) override
750
+ void PartialSample(DataView<double, 2> &samples, const std::vector<QubitIdType> &wires) override
768
751
  {
769
752
  RT_FAIL_IF(samples.size() != shots * wires.size(), "Invalid size for the pre-allocated samples");
770
753
 
@@ -809,8 +792,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
809
792
  }
810
793
  }
811
794
  }
812
- void Counts(DataView<double, 1> &eigvals, DataView<int64_t, 1> &counts,
813
- size_t shots) override
795
+ void Counts(DataView<double, 1> &eigvals, DataView<int64_t, 1> &counts) override
814
796
  {
815
797
  const size_t numQubits = qsim->GetQubitCount();
816
798
  const size_t numElements = 1U << numQubits;
@@ -844,7 +826,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
844
826
  }
845
827
 
846
828
  void PartialCounts(DataView<double, 1> &eigvals, DataView<int64_t, 1> &counts,
847
- const std::vector<QubitIdType> &wires, size_t shots) override
829
+ const std::vector<QubitIdType> &wires) override
848
830
  {
849
831
  const size_t numQubits = wires.size();
850
832
  const size_t numElements = 1U << numQubits;
@@ -720,7 +720,9 @@ class QrackDevice(QubitDevice):
720
720
 
721
721
  # QubitDevice.states_to_binary() doesn't work for >64qb. (Fix by Elara, the custom OpenAI GPT)
722
722
  samples = self._state.measure_shots(list(range(self.num_wires - 1, -1, -1)), self.shots)
723
- self._samples = np.array([list(format(b, f"0{self.num_wires}b")) for b in samples], dtype=np.int8)
723
+ self._samples = np.array(
724
+ [list(format(b, f"0{self.num_wires}b")) for b in samples], dtype=np.int8
725
+ )
724
726
 
725
727
  return self._samples
726
728
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pennylane-qrack
3
- Version: 0.20.3
3
+ Version: 0.21.0
4
4
  Summary: PennyLane plugin for Qrack.
5
5
  Home-page: http://github.com/vm6502q
6
6
  Maintainer: vm6502q
@@ -0,0 +1,17 @@
1
+ pennylane_qrack/CMakeCache.txt,sha256=RHCB8EgzGD7nE0HG-46wFEyVI4ufQ5_LhzvvjnHCTyk,15091
2
+ pennylane_qrack/Makefile,sha256=HMf2JV8WoMeW-rN8dAbzA3ssXMIzvgCPyJO-NvdJwPw,7618
3
+ pennylane_qrack/QrackAceDeviceConfig.toml,sha256=KmPPJEa6TMYpbQqQgMSAPfeGPQE8f1lriteyfGW8WeA,4517
4
+ pennylane_qrack/QrackDeviceConfig.toml,sha256=oR9-dIAP6BzP3e2QSLroacaloHZsx7iJiKE6w7LGxUo,5459
5
+ pennylane_qrack/__init__.py,sha256=_g4NKu07_pXqxvQaxjdAPe769S5tWwYjqyHi3z7YKHc,673
6
+ pennylane_qrack/_version.py,sha256=FpKob9aBwOu01ij4m97Jn4wOeVBp-NTVBEtrXf24IYg,689
7
+ pennylane_qrack/cmake_install.cmake,sha256=ZhG9tI7bh8oZnfUnP0eAVtodPUizqINLahqbb_TXwxY,3108
8
+ pennylane_qrack/libqrack_device.dylib,sha256=71NoxGeO3idTVsFUFr65YTxi52pAnbQTu8aLw_UsAmI,3234424
9
+ pennylane_qrack/qrack_ace_device.py,sha256=XXm3_FSTZGzMyhafX0UnSEda9EVtC2x_Mm9nZxTMqJc,17089
10
+ pennylane_qrack/qrack_device.cpp,sha256=FFP1GLdgqOho9irwdaAF1Lo1T9KIsaVKMiiIglkrOmE,37194
11
+ pennylane_qrack/qrack_device.py,sha256=LkfoH_KHm8VcUNT6Xzo3NZE24iGUMcLz8f1Nk8Jp6Sk,28358
12
+ pennylane_qrack-0.21.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
13
+ pennylane_qrack-0.21.0.dist-info/METADATA,sha256=KQf0e0qnt83Q8xtytVZmD1D5rGnDwjhEkfREix6uZyk,6075
14
+ pennylane_qrack-0.21.0.dist-info/WHEEL,sha256=tt4-VHVHv-wywtMZy9Hvv8M6zRlbacCdJyvDZp-_L0E,105
15
+ pennylane_qrack-0.21.0.dist-info/entry_points.txt,sha256=OrkJ6JVk-yndlQjqc-8dm8PxE-jNoNQRFXFeUBxVuCg,139
16
+ pennylane_qrack-0.21.0.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
17
+ pennylane_qrack-0.21.0.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- pennylane_qrack/CMakeCache.txt,sha256=RHCB8EgzGD7nE0HG-46wFEyVI4ufQ5_LhzvvjnHCTyk,15091
2
- pennylane_qrack/Makefile,sha256=HMf2JV8WoMeW-rN8dAbzA3ssXMIzvgCPyJO-NvdJwPw,7618
3
- pennylane_qrack/QrackAceDeviceConfig.toml,sha256=KmPPJEa6TMYpbQqQgMSAPfeGPQE8f1lriteyfGW8WeA,4517
4
- pennylane_qrack/QrackDeviceConfig.toml,sha256=oR9-dIAP6BzP3e2QSLroacaloHZsx7iJiKE6w7LGxUo,5459
5
- pennylane_qrack/__init__.py,sha256=_g4NKu07_pXqxvQaxjdAPe769S5tWwYjqyHi3z7YKHc,673
6
- pennylane_qrack/_version.py,sha256=KTuI1PxhAftTpnBmvjAzqmc69irJrU-inusyujd6w0w,689
7
- pennylane_qrack/cmake_install.cmake,sha256=ZhG9tI7bh8oZnfUnP0eAVtodPUizqINLahqbb_TXwxY,3108
8
- pennylane_qrack/libqrack_device.dylib,sha256=kZD1u0RSuMcv18i35Mx7vSVmSDKSikG-g-KU3YRlWEk,3234456
9
- pennylane_qrack/qrack_ace_device.py,sha256=Rq58yxkBpI_5x16pLR-_23ivYYDpqlRJ5oBjbwtaJA4,17039
10
- pennylane_qrack/qrack_device.cpp,sha256=0Dbey1g3DQeWYrzS9622Y7QDhizISuII49XLuv9xFIY,38115
11
- pennylane_qrack/qrack_device.py,sha256=MBiJdRZMvkEBc-5MR2hKiC_k8eNBN3yHeUSC35bks2g,28336
12
- pennylane_qrack-0.20.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
13
- pennylane_qrack-0.20.3.dist-info/METADATA,sha256=iFQi45ZerZTdsEvBYfXFbUcoLaYBNkzqXrSN-LDyk5s,6075
14
- pennylane_qrack-0.20.3.dist-info/WHEEL,sha256=tt4-VHVHv-wywtMZy9Hvv8M6zRlbacCdJyvDZp-_L0E,105
15
- pennylane_qrack-0.20.3.dist-info/entry_points.txt,sha256=OrkJ6JVk-yndlQjqc-8dm8PxE-jNoNQRFXFeUBxVuCg,139
16
- pennylane_qrack-0.20.3.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
17
- pennylane_qrack-0.20.3.dist-info/RECORD,,