pyqrack - Pure Python vm6502q/qrack Wrapper
Actively maintained. Last release 10 days ago, commits in 22 of the last 26 weeks. A safe choice.
pip install pyqrackpyqrack
Pure Python bindings for the pure C++11/OpenCL Qrack quantum computer simulator library
(PyQrack is just pure Qrack.)
Note: You must also install OpenCL to use this version of Qrack. (There are also CPU-only and CUDA version.)
If you're looking for Mac ARM support, use the package pyqrack, not pyqrack-cpu. Mac officially "deprecated" OpenCL years ago. Hence, accelerator support is not included in ARM-based Mac wheels, and OpenCL installation is not required on these systems, but, if you have a CUDA accelerator on ARM-based Mac, you could try the package pyqrack-cuda instead.
Performance can benefit greatly from following the Qrack repository "Quick Start" and "Power user considerations."
If you use an integrated graphics accelerator, like the Intel HD, setting environment variable PYQRACK_HOST_POINTER_DEFAULT_ON=1 (or to any "truthy" value) will automatically set the default of isHostPointer option of QrackSimulator to True, to engage "zero-copy" mode by default.
Import and instantiate QrackSimulator instances. This simulator can perform arbitrary single qubit and controlled-single-qubit gates, as well as other specific gates like SWAP.
Any 2x2 bit operator matrix is represented by a list of 4 complex floating point numbers, in row-major order.
Single and array "b" parameters represent Pauli operator bases. They are specified according to the enumeration of the class.