pennylane-qrack 0.22.6__py3-none-win_amd64.whl → 0.22.8__py3-none-win_amd64.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.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.1
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
@@ -2,14 +2,14 @@ pennylane_qrack/QrackAceDeviceConfig.toml,sha256=zrGB9gVmB105WX4s7MS-MceoXC5sNTR
2
2
  pennylane_qrack/QrackDeviceConfig.toml,sha256=M3rIJH9GlMJv6lapfSXses5qauSvezs8OqnHYLq6in0,5576
3
3
  pennylane_qrack/QrackStabilizerDeviceConfig.toml,sha256=njxwgqpEEYHvuYINdaBuwXM8i44Nl5TsdIC5zZw-Rag,4064
4
4
  pennylane_qrack/__init__.py,sha256=5iuZ5OqhRPLxj5cs9jGaUTDv55iPXRVbcDHM6FNk-5c,689
5
- pennylane_qrack/_version.py,sha256=t4DaYt6IVUywv5EDGx-FKV1CJ5o5IXKjARAH6w0kIec,708
5
+ pennylane_qrack/_version.py,sha256=Ys2wCKNv170GqyVjXAwNvL-vwZjPpxGiqIHAsh0CvsY,708
6
6
  pennylane_qrack/qrack_ace_device.py,sha256=HvZ3Hbb4pTo7rLfHwyRNTO7TPxJVdBdHf47COpuURok,17540
7
7
  pennylane_qrack/qrack_device.cpp,sha256=E-TO_11A0GlCSJisFtUlT0EERjJD_bsTvlBvNNBeTn8,38065
8
8
  pennylane_qrack/qrack_device.py,sha256=Aart7lENzYKPNcZiN36UrZgQTc8lo18-DO3LTyu-rEs,29096
9
- pennylane_qrack/qrack_stabilizer_device.py,sha256=ehRghmj3kgOB1uCBhz-EdDLtNot4eQXM2l-NQe4ieIA,10254
10
- pennylane_qrack-0.22.6.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
11
- pennylane_qrack-0.22.6.dist-info/METADATA,sha256=lfeGzvigg-b7Oo9a8LxT3z1cI0suOAEYS0bmzX6OKus,6092
12
- pennylane_qrack-0.22.6.dist-info/WHEEL,sha256=JMWfR_Dj7ISokcwe0cBhCfK6JKnIi-ZX11L6d_ntt6o,98
13
- pennylane_qrack-0.22.6.dist-info/entry_points.txt,sha256=5eoa4LFV7DuSLFbs6tzFvuVIHr6zOovxqlDsn2cinP4,220
14
- pennylane_qrack-0.22.6.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
15
- pennylane_qrack-0.22.6.dist-info/RECORD,,
9
+ pennylane_qrack/qrack_stabilizer_device.py,sha256=2VUfJB2W7UzFXKCatdkYZkjlILsuxmWGyUHIezrhFdA,10978
10
+ pennylane_qrack-0.22.8.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
11
+ pennylane_qrack-0.22.8.dist-info/METADATA,sha256=2lEAq9ZjmAFM6N95-96siQx_KTKHQH5Q-TL0mx0ApLE,6092
12
+ pennylane_qrack-0.22.8.dist-info/WHEEL,sha256=JMWfR_Dj7ISokcwe0cBhCfK6JKnIi-ZX11L6d_ntt6o,98
13
+ pennylane_qrack-0.22.8.dist-info/entry_points.txt,sha256=5eoa4LFV7DuSLFbs6tzFvuVIHr6zOovxqlDsn2cinP4,220
14
+ pennylane_qrack-0.22.8.dist-info/top_level.txt,sha256=5NFMNHqCHtVLwNkLg66xz846uUJAlnOJ5VGa6ulW1ow,16
15
+ pennylane_qrack-0.22.8.dist-info/RECORD,,