Skip to content

Releases: unitaryfund/pennylane-qrack

Revert TOML (until Catalyst release)

11 Dec 18:20
Compare
Choose a tag to compare

The recent TOML changes, since v0.11.1, were intended to correspond to an update in Catalyst due to be released at a later date. These changes have been reverted by 98965b5 only until the Catalyst release. They will be added back in with another revert commit at the appropriate time.

v0.11.5

09 Dec 12:37
Compare
Choose a tag to compare

In this release, QrackCircuit checks, when a gate commutes, whether it had any qubits in common with the other gate. If it does, commutation is deemed "productive," and circuit optimization continues. If commutation only occurs without any qubits in common between commuting gates, and if the gate ultimately fails to commute at the last step, then commutation is deemed "non-productive," and the corresponding qubits are removed from the circuit optimization light cone.

Full Changelog:
unitaryfund/qrack@vm6502q.v9.13.9...vm6502q.v9.13.16
unitaryfund/pyqrack@v1.34.8...v1.34.9
v0.11.4...v0.11.5

sha1sum results:
761ee34d6feb5bb85bda54c48a3a5d046b481ee9 pennylane_qrack-0.11.5-py3-none-macosx_13_0_x86_64.whl
dc146e1cd13e5bb96737b6a3e0cdd11e8f3d850f pennylane_qrack-0.11.5-py3-none-macosx_14_0_arm64.whl
5bc4f0b9b37b9880c69edb9198f98bae451a936f pennylane_qrack-0.11.5-py3-none-macosx_15_0_arm64.whl
13d86da9d44adead25908935a97215dd9acfafa9 pennylane_qrack-0.11.5-py3-none-manylinux_2_31_x86_64.whl
0552f70c5a632d688a3375cc424ec7cdec6e7f37 pennylane_qrack-0.11.5-py3-none-manylinux_2_35_x86_64.whl
50333811f84f8ff9605b9bea5a2ab494794e45e6 pennylane_qrack-0.11.5-py3-none-manylinux_2_39_x86_64.whl
7c68845d895fadfe3575512bde8eba32a3fb392e pennylane_qrack-0.11.5-py3-none-win_amd64.whl
3e8deedf46b9f5e75b2c0cec6b0c8cafa38f10da pennylane_qrack-0.11.5.tar.gz

Improve QrackCircuit

08 Dec 08:19
Compare
Choose a tag to compare

QrackCircuit has been improved with further light-cone optimizations. Now, when gates are combined to produce identity operator somewhere mid-circuit, only gates in the light cone are checked for further composability past the identity gate, and, as gates in the light cone fail to produce any further improvements past a certain depth, the blocked wires are removed from the light cone for further optimization checks. (These improvements are inspired by consideration of "directed acyclic graph," "DAG" data structures.)

Full Changelog:
unitaryfund/qrack@vm6502q.v9.13.8...vm6502q.v9.13.9
unitaryfund/pyqrack@v1.34.7...v1.34.8
v0.11.3...v0.11.4

sha1sum results:
4d7333f006896bc87a43b3f760e60d7c62817cde pennylane_qrack-0.11.4-py3-none-macosx_13_0_x86_64.whl
50163ced09820c864b22444621a8c4924f4cf508 pennylane_qrack-0.11.4-py3-none-macosx_14_0_arm64.whl
022eb171d6521a63051e75eb195d1693482a3599 pennylane_qrack-0.11.4-py3-none-macosx_15_0_arm64.whl
2471d8287d389c397ce8f10b3792a97f6b6218e7 pennylane_qrack-0.11.4-py3-none-manylinux_2_31_x86_64.whl
db46bea77328fe48a36b6a1a552d9e705cf2a511 pennylane_qrack-0.11.4-py3-none-manylinux_2_35_x86_64.whl
79282495f76733779a44567188ec57fb5fdee887 pennylane_qrack-0.11.4-py3-none-manylinux_2_39_x86_64.whl
e7d678defcfbe0c6618fce13d3141dbc036c5050 pennylane_qrack-0.11.4-py3-none-win_amd64.whl
72c18cc8074f2b188045b21c28e0067b4a9826d6 pennylane_qrack-0.11.4.tar.gz

v0.11.3

07 Dec 18:37
Compare
Choose a tag to compare

(With apologies for two release iterations in a day...) Environment/build option PSTRIDEPOW default value has been re-tuned based on local benchmarks. In QrackCircuit, we noticed that Swap gate could be decomposed as either 3 CNOT or 3 AntiCNOT gates, which can improve performance.

Full Changelog:
unitaryfund/qrack@vm6502q.9.13.7...vm6502q.v9.13.8
unitaryfund/pyqrack@1.34.6...v1.34.7
v0.11.2...v0.11.3

sha1sum results:
7ac262d3c5d182d0810a39c6b28dae27e902d83a pennylane_qrack-0.11.3-py3-none-macosx_13_0_x86_64.whl
a026c72e31e3b72a215d3bff589d3923915fdcc6 pennylane_qrack-0.11.3-py3-none-macosx_14_0_arm64.whl
790c789363f33b52934f41f0e6adfd39839e9b22 pennylane_qrack-0.11.3-py3-none-macosx_15_0_arm64.whl
bb31f81ae8799844d15d98431531cd565416f5f7 pennylane_qrack-0.11.3-py3-none-manylinux_2_31_x86_64.whl
abc6dc2c45d0f9b8337e1e31f13a54e3b10fb785 pennylane_qrack-0.11.3-py3-none-manylinux_2_35_x86_64.whl
f0d7e8918ec1c2bf03d5c900eab7180f21a0722b pennylane_qrack-0.11.3-py3-none-manylinux_2_39_x86_64.whl
a7e060cf30ebe0ad8ebce4b518cf7da5ce87cae5 pennylane_qrack-0.11.3-py3-none-win_amd64.whl
2a47fbb2382f55c0330de7cef8acb8747a09af80 pennylane_qrack-0.11.3.tar.gz

QTensorNetwork performance improvement

07 Dec 15:52
Compare
Choose a tag to compare

Qrack's QTensorNetwork optimization layer has been sped up through additional light-cone optimization.

Full Changelog:
unitaryfund/qrack@vm6502q.v9.13.6...vm6502q.9.13.7
unitaryfund/pyqrack@1.34.5...1.34.6
v0.11.1...v0.11.2

sha1sum results:
5aafbfa6c9cbdac1c54f13992cd63c9472661005 pennylane_qrack-0.11.2-py3-none-macosx_13_0_x86_64.whl
785a71db982990927a42b915dc88fc7efc4b1791 pennylane_qrack-0.11.2-py3-none-macosx_14_0_arm64.whl
070f1958bdf74c2c691de8f4686c1f5144e388ad pennylane_qrack-0.11.2-py3-none-macosx_15_0_arm64.whl
5c5b1109011828d53c2bbd27262996893ea623b5 pennylane_qrack-0.11.2-py3-none-manylinux_2_31_x86_64.whl
0f244432abc6573eebcf3d788e1645775297cd24 pennylane_qrack-0.11.2-py3-none-manylinux_2_35_x86_64.whl
17224bc46584e224f98e724a6bc12d18467ddc42 pennylane_qrack-0.11.2-py3-none-manylinux_2_39_x86_64.whl
f15bd112f8f95ff64a6fde562ccffe402d1970a9 pennylane_qrack-0.11.2-py3-none-win_amd64.whl
019cc4169ff784a1ed87016f6fa021c97412f45a pennylane_qrack-0.11.2.tar.gz

Update TOML for PennyLane v0.39.0

29 Nov 12:42
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.10.20...v0.11.1

sha1sum results:
bb800f0d2a666e08e70e337d40563579f4709753 pennylane_qrack-0.11.1-py3-none-macosx_13_0_x86_64.whl
b4be340d2ed86ed6ce7ef5c6dbb255b93198be56 pennylane_qrack-0.11.1-py3-none-macosx_14_0_arm64.whl
9d4d0c35224f075f3f4c259146804e8edcd3a332 pennylane_qrack-0.11.1-py3-none-macosx_15_0_arm64.whl
d430d64a80795d7e9789b919b019fa02ba8b1a09 pennylane_qrack-0.11.1-py3-none-manylinux_2_31_x86_64.whl
f12e872adff45f5bb1c58680160a37f26937347f pennylane_qrack-0.11.1-py3-none-manylinux_2_35_x86_64.whl
07b42e407cc5ec59aa49182bf354d69dfa14c80f pennylane_qrack-0.11.1-py3-none-manylinux_2_39_x86_64.whl
f5cb1dc7e36b25d687566d0ab2450384f4e39f8e pennylane_qrack-0.11.1-py3-none-win_amd64.whl
71c5b393566b37e6df36fa898c8490ef98987ab1 pennylane_qrack-0.11.1.tar.gz

CodeQL warnings and Qrack shared library debug

21 Nov 20:40
Compare
Choose a tag to compare

This patch fixes every previous CodeQL warning and an edge case in release()/Decompose()/Dispose() in the shared library.

The CodeQL warnings were purely "false positives." CodeQL wasn't wrong in principle, but it's not capable of detecting that manual bounds checking prevents bitLenInt (which is often an alias for an 8-bit integer) from getting stuck in infinite loops when iterating over vectors of qubit IDs, which could contain 64-bits worth of size_t capacity, but which can't possibly pass manual bounds checking with more entries than the capacity of bitLenInt. a3d9854 roundly prevents these warnings from ever becoming relevant at all, but it's in this release.

The edge case in the shared library likely couldn't be encountered in PyQrack at all, since it does not allow the assignment of arbitrary integer labels for qubit IDs. (They must be sequential.) However, the fix is still important to other potential uses of the Qrack shared library interface, downstream.

The only relevant change for pennylane-qrack, then, is a3d9854, but, as this is a manual bounds-checking issue, it's being prioritized for immediate release as an issue of "safety" and "vulnerability."

Full Changelog:
unitaryfund/qrack@vm6502q.v9.12.38...vm6502q.v9.12.39
unitaryfund/pyqrack@v1.32.29...v1.32.31
v0.10.19...v0.10.20

sha1sum results:
2a316342b6a2318a456c9349ea5befe82e915d05 pennylane_qrack-0.10.20-py3-none-macosx_13_0_x86_64.whl
584d66415d22e3a981e60f8321cc72bcf0af32c4 pennylane_qrack-0.10.20-py3-none-macosx_14_0_arm64.whl
e0d1560b4222b0303f08defe9ba27e1615596b03 pennylane_qrack-0.10.20-py3-none-macosx_15_0_arm64.whl
b463cea968bd708d8728585b4a4f3b25c75a7117 pennylane_qrack-0.10.20-py3-none-manylinux_2_31_x86_64.whl
85e4bcbeaffb2e06c7de0b612a12b9445d7a3d1c pennylane_qrack-0.10.20-py3-none-manylinux_2_35_x86_64.whl
6b90528aeebd71a453048cac1cc034e78e8b3cf3 pennylane_qrack-0.10.20-py3-none-manylinux_2_39_x86_64.whl
c6a152d48c9f341e401575f58f87602f7c13cc7b pennylane_qrack-0.10.20-py3-none-win_amd64.whl
9bfaa6ba75cfd02d9b579217e2620c75c3b9f56f pennylane_qrack-0.10.20.tar.gz

Fix segfault for 1-qubit QUnit GetProbs()

20 Nov 20:04
Compare
Choose a tag to compare

5fa8e96 introduced a segmentation fault in QUnit::GetProbs() (QrackSimulator.out_probs()) in the specific case that the QUnit instance has exactly 1 qubit. I estimate the severity of the vulnerability to be low: all tests so far have resulted in a "caught" segmentation fault rather than a silent one, likely because the first unsafe access to memory is always an attempt to write to memory address 0/NULL. The specific case of calling QUnit::GetProbs() for an instance with just one qubit is likely also uncommon in user code. With that said, please update immediately!

(Thanks to @cosenal for catching this!)

Full Changelog:
unitaryfund/qrack@vm6502q.v9.12.34...vm6502q.v9.12.38
unitaryfund/pyqrack@v1.32.28...v1.32.29
v0.10.18...v0.10.19

sha1sum results:
fa3b19e8e0666a4409986a382eb55ff4f9ac6d39 pennylane_qrack-0.10.19-py3-none-macosx_13_0_x86_64.whl
0e848c7ff92ff4bf902aac4a6525733dcef9e026 pennylane_qrack-0.10.19-py3-none-macosx_14_0_arm64.whl
bb4038b78bdbd99c11d81bcf63490426afecc332 pennylane_qrack-0.10.19-py3-none-macosx_15_0_arm64.whl
661ef9feb5e3ee704edc1fb709752e6945a37e68 pennylane_qrack-0.10.19-py3-none-manylinux_2_31_x86_64.whl
e9ff4a0f3480df3778ccb63959b80e5a92e0fba0 pennylane_qrack-0.10.19-py3-none-manylinux_2_35_x86_64.whl
d4223c8e65ff9cf5699037596b718f52c66a5dae pennylane_qrack-0.10.19-py3-none-manylinux_2_39_x86_64.whl
283d7b7ca7ea7d070bf84f9611eee275ba671687 pennylane_qrack-0.10.19-py3-none-win_amd64.whl
ff014ee16eb69a1492a557be2204eb5e8eabf598 pennylane_qrack-0.10.19.tar.gz

Optimize and restore QHybrid

19 Nov 15:08
Compare
Choose a tag to compare

We got to the bottom of the problem with QHybrid performance, and, with apologies, it had nothing to do with either "driver changes" or "speculative execution": since QHybrid was first entered into the library, optimized methods on QEngineOCL and QEngineCPU remained without direct exposure via the QHybrid layer. Making sure that the full public API was exposed via QHybrid fixed the issue. (It blows my mind that we went this long without MAll() exposed from the wrapped types under QHybrid.) Similarly, the incorrect results from QPager are a known issue where the engine type doesn't work with numbers of qubits smaller than its threshold for at least two "pages" in the simulator type, which is entirely avoided by wrapping in QHybrid.

(I owe an apology for mouthing off. No one was going to realize this problem but me, but, when something seems to work in the library for literally years, and then I notice it's sub-optimal, it's easy to reflexively blame driver and firmware changes before setting out to fix the problem of necessity, anyway.)

What's Changed

  • Replace deprecated QubitStateVector with StatePrep by @andrijapau in #27

New Contributors

Full Changelog:
unitaryfund/qrack@vm6502q.v9.12.33...vm6502q.v9.12.34
unitaryfund/pyqrack@v1.32.27...v1.32.28
v0.10.16...v0.10.18

sha1sum results:
d5d618f88a0c58bcebf729b5a66a39070f3a495b pennylane_qrack-0.10.18-py3-none-macosx_13_0_x86_64.whl
e850b6aaa44bcb313f60a310f92c7a58b37d7b00 pennylane_qrack-0.10.18-py3-none-macosx_14_0_arm64.whl
0037835efd8cc6ce78865c5da6fe9b9748ed7129 pennylane_qrack-0.10.18-py3-none-macosx_15_0_arm64.whl
e3555ff7e78289839bbbb030fd9577d6f50a7b1f pennylane_qrack-0.10.18-py3-none-manylinux_2_31_x86_64.whl
faac6611ae866484df56455514e34f16053ae056 pennylane_qrack-0.10.18-py3-none-manylinux_2_35_x86_64.whl
f6b54f68adad6d4eea2ea01381eb114cc534bab8 pennylane_qrack-0.10.18-py3-none-manylinux_2_39_x86_64.whl
28f7b298f411bc5b7db2f668f530f7bb72beacf1 pennylane_qrack-0.10.18-py3-none-win_amd64.whl
11d96ad41a8c3442ad906a825e0e1f9242f6fcea pennylane_qrack-0.10.18.tar.gz

Disable "hybrid stabilizer" by default

18 Nov 21:35
Compare
Choose a tag to compare

I was hasty in the release notes, earlier today: much has changed on my particular hardware, including Intel firmware. While I was frustrated that something appeared to change, out from under us, it's not necessarily due to NVIDIA drivers (though that might contribute), and, conceivably, it might have everything to do with speculative code execution.

In any case, typical use-case performance seems to benefit from also disabling "hybrid stabilizer" mode in PyQrack by default. Regarding this release and v0.10.15 earlier today, no functionality has been removed. It is possible to recover the original behavior (which might be better suited for your system, depending) with isStabilizerHybrid=True and isCpuGpuHybrid=True passed to the QrackSimulator constructor. However, on an RTX 3080 laptop, performance for typical workloads seems to benefit immensely from turning both options off (by this point in history, whereas this might not have been the case in past years).

We will update the documentation and API reference to indicate the new default constructor options, but the new defaults might be more intuitive for most users: stabilizer (even "hybrid," universal) is a special-case algorithm, and `"hybrid CPU/GPU" is something to experiment with on your local system, whereas GPU could be expected to be used by default if you have a GPU.

Full Changelog:
unitaryfund/pyqrack@v1.32.35...v1.32.26
v0.10.15...v0.10.16

sha1sum results:
5fb88adbdb413ba1f006a432195215aa2d091881 pennylane_qrack-0.10.16-py3-none-macosx_13_0_x86_64.whl
2763b72f2cccc6c31c662682690b890ccb22b30f pennylane_qrack-0.10.16-py3-none-macosx_14_0_arm64.whl
91e8fa69baeb35ff8764c493b19ad6d4094e8ccf pennylane_qrack-0.10.16-py3-none-macosx_15_0_arm64.whl
404ac43a75aafd595b176f6f1b7720bb6b13b92b pennylane_qrack-0.10.16-py3-none-manylinux_2_31_x86_64.whl
ed756f6dbdb8355955d65da7eac962599e8061cf pennylane_qrack-0.10.16-py3-none-manylinux_2_35_x86_64.whl
9ff67061f086deef458d1cb6fe2891dec698b1e7 pennylane_qrack-0.10.16-py3-none-manylinux_2_39_x86_64.whl
0423a41e652df13c3d62da45183191c2667fe51b pennylane_qrack-0.10.16-py3-none-win_amd64.whl
35e5cc602287626d6c05746ef97091690bd27771 pennylane_qrack-0.10.16.tar.gz