Skip to content

Releases: unitaryfund/qrack

QCircuit commutation

09 Dec 12:16
Compare
Choose a tag to compare

In this release, QCircuit 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: vm6502q.v9.13.9...vm6502q.v9.13.16

sha1sum results:
36ea69309bdada8dcf7a585139b4a5763f5aabb8 libqrack-macosx_14_0_arm64.zip
d75f5fe860bf0ea43aca7411422d2d5937771f7d libqrack-macosx_15_0_arm64.zip
32d3b0287cebbde73929c10699ec4aedeb2ddad6 libqrack-manylinux2014_x86_64.zip
2c003055386621ca2e69d4a5e6672551258769c6 libqrack-manylinux_2_35_x86_64.zip
d5ab197ea72092109623493a6072ea79c37a9d82 libqrack-manylinux_2_39_x86_64.zip
fc30d93a45f5e4bab617a40c71391f5b114e5636 libqrack-win-amd64.zip

QCircuit light cone

08 Dec 07:55
Compare
Choose a tag to compare

QCircuit 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: vm6502q.v9.13.8...vm6502q.v9.13.9

sha1sum results:
b17d9a3437ecebbc9fb3802e56a53a068be51152 libqrack-macosx_14_0_arm64.zip
b9fa424e04cc203948f155eca2dd5ee774c9e8ac libqrack-macosx_15_0_arm64.zip
291dddde77799af993fcc0687695bd4f86a4a28f libqrack-manylinux2014_x86_64.zip
a69658a77a6fdd1e29c9f8533227c709c515d416 libqrack-manylinux_2_35_x86_64.zip
bde0b43c397d4d0b272e8030150fc7f44ba2aeef libqrack-manylinux_2_39_x86_64.zip
fc6ec66a81819c6b18d8d910406472660a58d7ea libqrack-win-amd64.zip

PSTRIDEPOW default; QCircuit improvement

07 Dec 18:11
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 QCircuit, we noticed that Swap gate could be decomposed as either 3 CNOT or 3 AntiCNOT gates, which can improve performance.

Full Changelog: vm6502q.9.13.7...vm6502q.v9.13.8

sha1sum results:
eeb489e7c6d71e2e5e78537d9273fee6018110a5 libqrack-macosx_14_0_arm64.zip
8cbe0548fc8bd2b25067b30ed8eb7ca83a0dc1e2 libqrack-macosx_15_0_arm64.zip
f5cf3a69f27b03f8ce25b22fa3286d0fe1e9ec78 libqrack-manylinux2014_x86_64.zip
511c0f7db8edba4317d0dc5193b10442cde371bc libqrack-manylinux_2_35_x86_64.zip
70457a156d83e71b8d4bf47f10472fdb72e58887 libqrack-manylinux_2_39_x86_64.zip
d12774e34c689439cb173a90ba15e90bf3c1d975 libqrack-win-amd64.zip

Improve QCircuit

07 Dec 14:28
Compare
Choose a tag to compare

This release reverts the fixed-precision reporting of IO streams and improves the performance of QCircuit.

Full Changelog: vm6502q.v9.13.6...vm6502q.9.13.7

sha1sum results:
a456a5d8cbffda153cee32c0bf683028b978726f libqrack-macosx_14_0_arm64.zip
dd270a04fb9f4caf42fd25a362a465d8eaccd383 libqrack-macosx_15_0_arm64.zip
1d00c88da06e31eca0f480ca2b8acd3f7968329a libqrack-manylinux2014_x86_64.zip
039e7fe5d49cb07de494c5181c94c5c6adb32a3c libqrack-manylinux_2_35_x86_64.zip
e1151e54605577f8a3fd150a032403a62f788930 libqrack-manylinux_2_39_x86_64.zip
765733e3c0114338bae86b22ad537b4b9c47b65b libqrack-win-amd64.zip

IO stream double precision

06 Dec 21:45
Compare
Choose a tag to compare

The extern C shared library interface now reports in double precision, under all build settings. More importantly than double reporting precision, IO streams for unitary matrix operators typically need to be numerically unitary to at least double tolerance. This is enforced by assuming any gate is (approximately-enough) unitary, solving for a 3-paramater representation plus global phase of the operator, and reconstructing the matrix representation from the 3 parameters and global phase in double precision (before writing to an output stream).

Full Changelog: vm6502q.v9.13.1...vm6502q.v9.13.6

sha1sum results:
c5172034c08572570b5fb5cb4aea0c51828d388a libqrack-macosx_14_0_arm64.zip
86f753feb152214a26b0da3bf3a06c7c5dc92a32 libqrack-macosx_15_0_arm64.zip
7afd0502a8ddd6141a7ba7c8e74a1a17486e90f6 libqrack-manylinux2014_x86_64.zip
75c8c2fc892ed5e7ebc0c47a724eae2ed940ec6d libqrack-manylinux_2_35_x86_64.zip
830deb81392d6be9079414ea3b5ed24894e15ee2 libqrack-manylinux_2_39_x86_64.zip
8efe7fde2b103c49b1741e068b2f4a74ec6283d2 libqrack-win-amd64.zip

Shared library qubit ID bounds checking

23 Nov 14:13
Compare
Choose a tag to compare

The shared library and WASM interfaces now raise exception if a qubit label is requested that wasn't already specifically assigned. (Previously, these interfaces simply returned the "0"-label qubit in this case, instead, which wasn't "unsafe," but the exception is more helpful.)

Full Changelog: vm6502q.v9.13.0...vm6502q.v9.13.1

sha1sum results:
9c0688c94a59b491f90f6ec667a36946f21d86f0 libqrack-macosx_14_0_arm64.zip
7ab1f8f90f0984776d50eb9024e212c0057a7d77 libqrack-macosx_15_0_arm64.zip
87ad5cc266d7a3945c0beefff0f1e05e8950ee29 libqrack-manylinux2014_x86_64.zip
ffbec900e4a77ab3b48ab9c42035961918373c64 libqrack-manylinux_2_35_x86_64.zip
df32dcf2b69686286197dc93e7c4244e3e30a3fe libqrack-manylinux_2_39_x86_64.zip
fe957ff79952d0818763d576311351ba3d5ccebc libqrack-win-amd64.zip

QCircuit direct to string in shared library

22 Nov 13:58
8cab84a
Compare
Choose a tag to compare

This feature release adds two new functions to the shared library API that, when used together, allow a QCircuit to be converted directly to a std::string representation (exactly the same as the file representation) and passed back to the shared library caller.

This release does not affect static linkage (like PennyLane Catalyst) at all, except in the context of WASM.

Full Changelog: vm6502q.v9.12.39...vm6502q.v9.13.0

sha1sum results:
952fc677b4560da9eea319126754fccbf840e42d libqrack-macosx_14_0_arm64.zip
1a4b8849b4c55ba182d9c19b531c1af9b5c0ec55 libqrack-macosx_15_0_arm64.zip
56b0e04a17964279497909de0a4efe0d3432f2fc libqrack-manylinux2014_x86_64.zip
b4779ed4a177689c599d8992c286f1816417c93d libqrack-manylinux_2_35_x86_64.zip
a648b6d66940f0159760e4e365fcc182ff6f63da libqrack-manylinux_2_39_x86_64.zip
fa421492c3ad225699031e929938c0404f898393 libqrack-win-amd64.zip

CodeQL warnings and shared library debug

21 Nov 19:59
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.

Full Changelog: vm6502q.v9.12.38...vm6502q.v9.12.39

sha1sum results:
4167f0cf8aa5bbbd13530036ed665dbd65bbfb56 libqrack-macosx_14_0_arm64.zip
31fc9e95ae085199014c124f3dbb14de299684c3 libqrack-macosx_15_0_arm64.zip
a77f78275add153f8be98d0d4277783e6d3948d5 libqrack-manylinux2014_x86_64.zip
c92166baf482af0f1a9a1a5f10d19986a87a8018 libqrack-manylinux_2_35_x86_64.zip
642dd6f3a6ba775b4c5515279fc46f0efb0f3141 libqrack-manylinux_2_39_x86_64.zip
4a63f841a154d56ac8d8e0439f20bbd07bf2ad11 libqrack-win-amd64.zip

Fix segfault for 1-qubit QUnit GetProbs()

20 Nov 18:34
Compare
Choose a tag to compare

5fa8e96 introduced a segmentation fault in QUnit::GetProbs() 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: vm6502q.v9.12.34...vm6502q.v9.12.38

sha1sum results:
817734795acef3344aca164ebd99ac0c246c6f13 libqrack-macosx_14_0_arm64.zip
ae1b73c2229958f503cab3f13b2bf5a1c7a71334 libqrack-macosx_15_0_arm64.zip
61162e30a2b4385b72eff87ca94369387607ef59 libqrack-manylinux2014_x86_64.zip
3ebf3994706d01529fa71b534a62c4cc26d9bb5d libqrack-manylinux_2_35_x86_64.zip
de5886e8894a94b5bbc99c642bdcb971ddf55d9f libqrack-manylinux_2_39_x86_64.zip
797c95b747d23fb5280193fa5c06aa51d4a3d367 libqrack-win-amd64.zip

Optimize and restore QHybrid

19 Nov 14:43
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.)

Full Changelog: vm6502q.v9.12.33...vm6502q.v9.12.34

sha1sum results:
4e69a13d4e60c36b4b9a67ac57941d77f8e509a3 libqrack-macosx_14_0_arm64.zip
2711111874f806f63da1f50fe85716ba1fc73dd6 libqrack-macosx_15_0_arm64.zip
9b6420ed0f19d5681b9de217c692c2a974331070 libqrack-manylinux2014_x86_64.zip
6a47dd89fd307d092308b9b34dbf29bad858fea2 libqrack-manylinux_2_35_x86_64.zip
dc67626ae4d85d7b1ef552e5f594d5661b5628cb libqrack-manylinux_2_39_x86_64.zip
a02e714aa86e81ae4d04f5be3985f93e0e85252e libqrack-win-amd64.zip