pennylane-qrack 0.15.4__tar.gz → 0.15.5__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.
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/PKG-INFO +1 -1
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack/_version.py +1 -1
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack/qrack_device.cpp +19 -2
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack.egg-info/PKG-INFO +1 -1
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/CHANGELOG.md +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/CMakeLists.txt +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/LICENSE +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/MANIFEST.in +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/Makefile +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/README.rst +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/DataView.hpp +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/DynamicLibraryLoader.hpp +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/Exception.hpp +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/QuantumDevice.hpp +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/RuntimeCAPI.h +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/Types.h +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack/QrackDeviceConfig.toml +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack/__init__.py +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack/qrack_device.py +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack.egg-info/SOURCES.txt +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack.egg-info/dependency_links.txt +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack.egg-info/entry_points.txt +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack.egg-info/requires.txt +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack.egg-info/top_level.txt +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/requirements.txt +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/setup.cfg +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/setup.py +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/tests/test_apply.py +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/tests/test_integration.py +0 -0
- {pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/tests/test_units.py +0 -0
|
@@ -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(
|
|
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 {
|
|
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;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/DynamicLibraryLoader.hpp
RENAMED
|
File without changes
|
|
File without changes
|
{pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/catalyst/runtime/include/QuantumDevice.hpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pennylane_qrack-0.15.4 → pennylane_qrack-0.15.5}/pennylane_qrack.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|