pennylane-qrack 0.22.6__tar.gz → 0.22.8__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 (34) hide show
  1. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/Makefile +1 -1
  2. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/PKG-INFO +1 -1
  3. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/_version.py +1 -1
  4. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/qrack_stabilizer_device.py +17 -0
  5. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack.egg-info/PKG-INFO +1 -1
  6. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/CHANGELOG.md +0 -0
  7. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/CMakeLists.txt +0 -0
  8. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/LICENSE +0 -0
  9. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/MANIFEST.in +0 -0
  10. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/README.rst +0 -0
  11. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/catalyst/runtime/include/DataView.hpp +0 -0
  12. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/catalyst/runtime/include/Exception.hpp +0 -0
  13. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/catalyst/runtime/include/OQDRuntimeCAPI.h +0 -0
  14. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/catalyst/runtime/include/QuantumDevice.hpp +0 -0
  15. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/catalyst/runtime/include/RuntimeCAPI.h +0 -0
  16. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/catalyst/runtime/include/Types.h +0 -0
  17. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/QrackAceDeviceConfig.toml +0 -0
  18. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/QrackDeviceConfig.toml +0 -0
  19. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/QrackStabilizerDeviceConfig.toml +0 -0
  20. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/__init__.py +0 -0
  21. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/qrack_ace_device.py +0 -0
  22. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/qrack_device.cpp +0 -0
  23. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack/qrack_device.py +0 -0
  24. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack.egg-info/SOURCES.txt +0 -0
  25. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack.egg-info/dependency_links.txt +0 -0
  26. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack.egg-info/entry_points.txt +0 -0
  27. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack.egg-info/requires.txt +0 -0
  28. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/pennylane_qrack.egg-info/top_level.txt +0 -0
  29. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/requirements.txt +0 -0
  30. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/setup.cfg +0 -0
  31. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/setup.py +0 -0
  32. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/tests/test_apply.py +0 -0
  33. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/tests/test_integration.py +0 -0
  34. {pennylane_qrack-0.22.6 → pennylane_qrack-0.22.8}/tests/test_units.py +0 -0
@@ -24,7 +24,7 @@ help:
24
24
  build-deps:
25
25
  ifneq ($(OS),Windows_NT)
26
26
  ifeq ($(QRACK_PRESENT),)
27
- git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout 5d04b51c373cdd6e033df0189d35fb27f2fc13df; cd ..
27
+ git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout f69f664da0d4845222a4e603e7db1e920dce79df; cd ..
28
28
  endif
29
29
  mkdir -p qrack/build
30
30
  ifeq ($(UNAME_S),Linux)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pennylane-qrack
3
- Version: 0.22.6
3
+ Version: 0.22.8
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.22.6"
19
+ __version__ = "0.22.8"
@@ -244,7 +244,24 @@ class QrackStabilizerDevice(QubitDevice):
244
244
  b = [self._observable_map[observable.name]]
245
245
 
246
246
  if None not in b:
247
+ # This will trigger Gaussian elimination,
248
+ # so it only happens once.
249
+ self._state.try_separate_1qb(0)
250
+ # It's cheap to clone a stabilizer,
251
+ # but we don't want to have to transform
252
+ # back after terminal measurement.
253
+ state_clone = self._state.clone()
254
+
247
255
  q = self.map_wires(observable.wires)
256
+ for qb, base in zip(q, b):
257
+ match base:
258
+ case Pauli.PauliX:
259
+ state_clone.h(qb)
260
+ case Pauli.PauliY:
261
+ state_clone.adjs(qb)
262
+ state_clone.h(qb)
263
+ b = [Pauli.PauliZ] * len(b)
264
+
248
265
  return self._state.pauli_expectation(q, b)
249
266
 
250
267
  # exact expectation value
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pennylane-qrack
3
- Version: 0.22.6
3
+ Version: 0.22.8
4
4
  Summary: PennyLane plugin for Qrack.
5
5
  Home-page: http://github.com/vm6502q
6
6
  Maintainer: vm6502q