Skip to content

v7 API update

Latest
Compare
Choose a tag to compare
@WrathfulSpatula WrathfulSpatula released this 01 Jan 05:01
· 33 commits to master since this release

Major release v7.0.0 takes lessons learned from the PyQrack API and basically inducts them back into the underlying C++11 library. The public API now follows a general "POCO" principle, letting primitive parameters be simply primitives, while all array pointers that are treated as const are explicitly const. Large but infrequently used method groups of the API can be switched on or off for inclusion in builds with the CMake options ENABLE_ALU, ENABLE_REG_GATES, ENABLE_ROT_API, and (pre-existing) ENABLE_BCD, where ENABLE_ALU for the "arithmetic logic unit" methods is the only option of these left on by default.

Primary generic gate method names have been shortened, to Mtrx for general 2x2 matrix gates, Phase for general 2-component phase gates, and Invert for general 2-component "inversion" (or "Pauli-X-like") gates. Controlled variants are MCMtrx, MCPhase, and MCInvert, (for "multiply-controlled,") and "anti-controlled" variants are MACMtrx, MACPhase, and MACInvert, (which activate the gate "payload" if all control qubits are reset off, as opposed to set on).

This overhaul of the API in itself makes for signficantly smaller binaries and appreciable speed increases, potentially due to better cache utilization, though, of course, many other small, targeted optimizations of specific methods add to this overall performance improvement, like overhauled measurement distribution sampling with MultiShotMeasureMask.

(Happy 2022! You rock!)