vm6502q/qrack
Description
Qrack v8 makes two major changes to the API:
- Qubit index parameters are checked for validity against simulators' allocated qubit bounds, to prevent OpenCL segmentation fault errors from explicitly invalid arguments.
- The public API parameter pattern "pointer, pointerLength" has been replaced with with
std::vector
.
After 5 years of holding out for the more C-like version of the interface, there's very little to be said in favor of "pointer, pointerLength" over std::vector
, which effectively enforces bounds safety. To use a contiguous subset of a std::vector
from user code space, one can still use the appropriate iterator-based std::vector
constructor. This probably requires the system to create a copy of the subset, but at most this is likely fewer than 50 elements copied, typically more like 1 or 2 elements. The benefits of bounds-enforcement have been assessed to be far more important than the additional execution time overhead, if that overhead can even be detected.
If you need support in converting your user code to API v8, please don't hesitate to reach out with a GitHub issue on this repository!
Notes
Files
unitaryfund/qrack-vm6502q.v8.0.0.zip
Files
(565.1 kB)
Name | Size | Download all |
---|---|---|
md5:46a448cc08160e9fd03f65792d949d36
|
565.1 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/unitaryfund/qrack/tree/vm6502q.v8.0.0 (URL)