Pyqrack

Latest version: v1.27.8

Safety actively analyzes 628924 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 23 of 45

1.0.1

After fixing several parallelism errors, no memory errors have been detected at all with `valgrind`, in `QBdt`. (Depending on one's system, a couple of string comparison memory errors might be present on program initialization, not rooted in Qrack user code, but this is all the developers currently detect with `valgrind`.)

We still recommend, depending on simulation method, that simulations with _maximum separable subsystem footprints_ larger than 32 qubits use at least `double` build precision, and footprints larger than 64 qubits should use `quad`. (PyQrack on PyPi only provides a 32-bit `float` build, but build from source, to tailor for your needs.)

1.0.0

Quantum binary decision tree simulation has been overhauled from a pre-release serial implementation, to a production-ready (_very_) parallel implementation.

Remember that PyQrack as distributed on PyPi is built with 32-bit `float` precision option, for the underlying Qrack library. If you actually intend to attempt "quantum supremacy" recreations with PyQrack, 32-bit `float` precision will likely lead to segmentation faults, by interim design: as the authors experiment with such use cases ourselves, we have found that 128-bit `quad` precision might be strictly necessary. To enable `quad` (or `double`) precision, **you need to build and install C++11 Qrack from source,** and use the `main` branch of PyQrack that works with a system installation of Qrack. **If you encounter segmentation faults, first build from source with increased precision before filing a bug report,** (CMake option `-DFPPOW=7 -DENABLE_COMPLEX_X2=OFF` or `-DFPPOW=6`, for Qrack.)

**Happy Qrackin'! You rock!**

0.21.20

In the underlying Qrack library, inline methods have been reviewed and refactored, based upon our best guess as to what methods could be optimized when inline. In some cases, this results in a very slightly smaller binary. Most users will likely notice no difference in performance, but, on hypothetical very limited systems, CPU cache performance might benefit.

0.21.19

In line with the previous release, SSE2.0 and SSE3.0 are now optionally available in Qrack for `float`-precision complex norm operations. Further, calls to measure probability leverage this optional support by reading 2 complex number amplitudes at a time, before calculating their norm. (Binaries without SSE support did not require an update.) Credit for this incremental change to Qrack should go to https://stackoverflow.com/questions/6996764/fastest-way-to-do-horizontal-sse-vector-sum-or-other-reduction#answer-35270026.

0.21.18

This release makes minor improvements in CPU-based simulation. CPU-based state vector reads are now loaded two at a time into a `complex2` object, giving a minor improvement to CPU-based gate simulation in general. Also. the default value of `PSTRIDEPOW` has been re-tuned, which will tend to increase speed, but we suggest looking at benchmarks (such as `test_qft_cosmology` in the C++ Qrack benchmark suite) for comparing `PSTRIDEPOW` value performance and tuning this setting on a per-system basis, in general.

0.21.17

Most or all gate methods in Qrack ultimately call `Mtrx()`, `Phase()`, or `Invert()`, or their controlled variants, at base. Hence, gate "shortcuts" like Pauli X/Y/Z, H, S, T, and others only define a constant vector of 2 or 4 complex numbers that correspond to the named gate operator and call `Mtrx()`/`Phase()`/`Invert()`. Typically, such methods would be good candidates for `inline` compilation.

This release moves these "shortcuts" out of a module and into the `QInterface` header, giving the compiler the opportunity to make them inline. Judging by the slightly increased binary size, this leads to significant additional inline method calls, as compiled. Making methods inline can have varied and counterintuitive effects on speed and binary size, but, for the increased binary size, calls to "shortcut" gates are likely a tiny bit faster and of a higher likelihood to be optimized together with other code at different scopes, by the compiler.

This release also fixes edge cases in `PhaseRootN()` variants that have been present and sub-optimal for years.

Page 23 of 45

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.