Pyqrack

Latest version: v1.33.1

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

Scan your dependencies

Page 35 of 55

0.21.9

In the course of preparing an alternate back end implementation, (with that back end not in this release,) various small imperfections became apparent in `OCLEngine` and `QEngineOCL`. Though a number of deviations from Qrack standards were corrected, only two changes in particular are likely to ever be noticed: a minor segmentation fault edge case was corrected in OpenCL callback usage, and `QEngine::clDump()` was modified to correctly track OpenCL memory usage for limits enforcement, whereas it previously relied on the destructor of `QEngineOCL` and might have missed more edge cases.

Unused declarations were also removed from OpenCL kernels, but no significant performance difference is likely. However, **re-compile your OpenCL kernels, if you use `qrack_cl_precompile`**.

0.21.8

A significant bottleneck in `QPager` simulations has been fixed: it is not always necessary to pin host memory for copying GPU-to-GPU in `Compose()`. This improves the case of `Compose()` with multiple GPUs that are in the same OpenCL "platform," (as would commonly be the case for 2 or 4 homogeneous GPUs in the same node, for example).

More checks have been added for whether requested qubit indices are out-of-bounds, in the underlying Qrack API. We can't guarantee unconditional "memory safety," as PyQrack is based upon a shared library C interface that accepts array parameters, for which it is dependent on separate array length parameters to know the allocated length of those array parameters. However, the goal is that, if `QrackSimulator` is given bad method arguments, PyQrack should still never raise a segmentation fault. These improvements (and particularly the related domain checks added in v0.21.7) should also act as a first line of defense against OpenCL buffer overrun.

0.21.7

Underlying `QEngineCPU`, `QEngineOCL`, `QStabilizer`, and `QBdt` types now check to make sure that qubit index arguments do not exceed the allocated number of qubits in a simulator. If they do, `std::invalid_argument` is raised by Qrack (and caught in the shared library C API, and re-thrown at Python level).

Historically, it turns out that the developer misunderstood C++ `const` pointer semantics, and `const pointer*` arguments have been made `pointer const*` arguments, as was originally intended. (The former is a pointer that is itself constant, as opposed to the latter meaning a pointer to memory that will not be modified.)

A redundant call to check probability in `TrySeparate()` was also removed, which increases performance.

(`QBdt` debugging is still underway, though use cases that _don't_ mix quantum binary decision tree qubits with ket qubits under `QBdt` might already work, as either fully "QBDT" qubits or fully ket qubits.)

0.21.6

With this release, `QBdt` ("quantum binary decision tree") passes all unit tests, both with and without "attached" ket qubits, and both with and without `QUnit` or `QUnitMulti` layer operating on top.

(We previously advertised that `QBdt` would become part of the default optimal stack, but there were still bugs at that time that interfered with benchmarks, and we have rolled back that change. However, the same effect can be achieved by turning the `QBdt` layer on in any layer stack and configuring it with the appropriate environment variables from the Qrack README.)

0.21.5

This release is only various micro-optimizations and one edge case bug fix:

- An edge case bug of `QPager::Compose()` was fixed, where qubit count was not previously correctly updated.
- In the more general case, `QPager::Compose()` has been made greedier, to sooner free memory with which it is finished, which might reduce the peaks of `QPager` memory-usage spikes.
- Micro-optimizations were made in the OpenCL program. **If you precompile OpenCL kernels, recompile your kernels, for this release!**
- A (blocking) `clFinish()` call in `QEngineOCL::DecomposeDispose()` was assessed to be unnecessary and removed, which might give a tiny improvement to the parallelism of internal and public API `Dispose()` calls.

**Again, note that If you precompile OpenCL kernels, recompile your kernels, for this release!** (I would guess that the old OpenCL program might be 100% functional anyway, but you would likely prefer to have the benefit of the new OpenCL micro-optimizations.)

0.21.4

This release fixes the proactive distribution of load over devices in `QPager::Compose()`, which allows it to work under `QUnit`, (as on a local test system with a NVIDIA RTX 3080 and an Intel HD, for one additional qubit over that attainable with just the RTX 3080).

Page 35 of 55

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.