Skip to main content

pyqrack - Pure Python vm6502q/qrack Wrapper

Reason this release was yanked:

1.32.17 is correct! The erata Qrack commit bc1d5d0.10.11 is correct! The erata Qrack commit bc1d5d8 was unnecessary.8 was unnecessary.

Project description

pyqrack

Downloads Downloads Downloads

Pure Python bindings for the pure C++11/OpenCL Qrack quantum computer simulator library

(PyQrack is just pure Qrack.)

Note, if building from source: You must build and install unitaryfund/qrack to build the main branch from source. CI/CD builds wheels that contain pre-compiled Qrack binaries, and that is the form published on PyPi. You must also install OpenCL.

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 Pauli class.

MC[x] and MAC[x] methods are controlled single bit gates, with as many control qubits as you specify via Python list c argument. MCX is multiply-controlled Pauli X, and MACX is "anti-"controlled Pauli X, i.e. "anti-control" activates the gate if all control bits are specifically off, as opposed to on.

To load the required unitaryfund/qrack libraries from a different location, set the PYQRACK_SHARED_LIB_PATH environment variable.

PyQrack has experimental support for PyZX Circuit definitions as an intermediate representation for QrackSimulator. To try this, load a Circuit in PyZX, (use that module to optimize your circuit, as you like,) and create a QrackSimulator() instance using the pyzxCircuit named argument of the constructor, like so:

sim = QrackSimulator(pyzxCircuit=c)

where c is a PyZX circuit object. The circuit will automatically be simulated in the constructed QrackSimulator instance. This also allows loading from QASM and other intermediate representations supported by PyZX.

See https://pyqrack.readthedocs.io/en/latest/ for an API reference.

For custom Qrack build floating-point precision, where options are half, float, double, and quad, set an environment variable via export QRACK_FPPOW=[n] (or as appropriate to your shell) where [n] is the logarithm base 2 of the number of bits in the systemic floating point type (4, 5, 6, or 7, with 5 or float as default, i.e. 2**5=32 for 32-bit float).

Please feel welcome to open an issue, if you'd like help. 😃

Special thanks go to Zeeshan Ahmed, for bug fixes and design suggestions, Ashish Panigrahi, for documentation and design suggestions, WingCode, for documentation, and to the broader community of Qrack contributors, for years of happy Qracking! You rock!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqrack-1.32.18.tar.gz (33.6 kB view details)

Uploaded Source

Built Distributions

pyqrack-1.32.18-py3-none-win_amd64.whl (868.0 kB view details)

Uploaded Python 3 Windows x86-64

pyqrack-1.32.18-py3-none-manylinux_2_39_x86_64.whl (2.7 MB view details)

Uploaded Python 3 manylinux: glibc 2.39+ x86-64

pyqrack-1.32.18-py3-none-manylinux_2_35_x86_64.whl (2.7 MB view details)

Uploaded Python 3 manylinux: glibc 2.35+ x86-64

pyqrack-1.32.18-py3-none-manylinux_2_31_x86_64.whl (2.7 MB view details)

Uploaded Python 3 manylinux: glibc 2.31+ x86-64

pyqrack-1.32.18-py3-none-macosx_15_0_arm64.whl (1.6 MB view details)

Uploaded Python 3 macOS 15.0+ ARM64

pyqrack-1.32.18-py3-none-macosx_14_0_arm64.whl (1.5 MB view details)

Uploaded Python 3 macOS 14.0+ ARM64

pyqrack-1.32.18-py3-none-macosx_13_0_x86_64.whl (2.2 MB view details)

Uploaded Python 3 macOS 13.0+ x86-64

pyqrack-1.32.18-py3-none-macosx_12_0_x86_64.whl (2.1 MB view details)

Uploaded Python 3 macOS 12.0+ x86-64

File details

Details for the file pyqrack-1.32.18.tar.gz.

File metadata

  • Download URL: pyqrack-1.32.18.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyqrack-1.32.18.tar.gz
Algorithm Hash digest
SHA256 6b20c781ef1487975af188243a0c256b55088c813edf3416042271f327597c8d
MD5 4a9909421e76028351d6726e6b9b819e
BLAKE2b-256 8683951b53266d1b87b869d6e00e96f98b02a9333e7f308da2eb6d7c1b8beb6f

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-win_amd64.whl.

File metadata

  • Download URL: pyqrack-1.32.18-py3-none-win_amd64.whl
  • Upload date:
  • Size: 868.0 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyqrack-1.32.18-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 96e0c9679350665ccdb905bf5433cdcb0adad8631ae25f6c7ae4c205730307ea
MD5 1deb7372e8e769bcc86374a54ed6cd42
BLAKE2b-256 5e341fad7fecd7f38bd1a592d48d64eb429c85e3dd14fe6649a015e5328c842c

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pyqrack-1.32.18-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c19c71bd6934a12ce0b4f816c8e76b60f45b82fcf65b6db9f7de9c91bd90a4d1
MD5 ddd522478fbfbf584e86a787e3702268
BLAKE2b-256 16d69d31f8435b6c36072871ecf451bb9f8cf1113a822ff8eb9257536d8e9c65

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pyqrack-1.32.18-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 834a806698afe406ac531d0bb571706c97a3bd80bae64817dbf126e820af4f45
MD5 e11c4c302e461700926cc90551af7406
BLAKE2b-256 0ea7dc8cf9769bd897461eff76720f7bac2f655a45b4ccf1839b21be0ca91582

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for pyqrack-1.32.18-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b71cf9607b39dfd23acea8769d15862d94a4d94ede9f6e2fc5cf7570d80ccda4
MD5 6a4614824ac1795695ccd5192aad5067
BLAKE2b-256 fafc7efc4f25b12fe44222b048e7788db38943cfc6780ab376b68809284b0f07

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyqrack-1.32.18-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1cfc70ea92eb1fa03fbb848a0eb59519867050847fc17f2225bb380a24afd4e7
MD5 37705051578ae769f3d4cec501024e0f
BLAKE2b-256 ed220688dd0954d85b446b12975adf315ac0da116ce2769564706e019ea14b4c

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyqrack-1.32.18-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ab5eba7cc2e5495087f282265f7a5728934a9f0da6147852a832d502d111c4a3
MD5 52da46d973331d377692d9bff0ea5908
BLAKE2b-256 c365de1b012890afe3a9d4ce557fbc98792da1fe3adff7d771a95c05c07f44a8

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pyqrack-1.32.18-py3-none-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d294b11fa7913eac8c7079d7d2f6e9fbfa31640631e6ebf738c16a5a47c34987
MD5 2f5894881a4befcfee7e54bafa523da5
BLAKE2b-256 a095a29150399471cd6045a3a754b6db03d8f73f36f418ca12e402d8f53c8df1

See more details on using hashes here.

File details

Details for the file pyqrack-1.32.18-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for pyqrack-1.32.18-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 1f9b9f478afa0505196b26226f0e486488d118bef02a44d119738762289b3351
MD5 a7605a0cf235bff82bfefaa28768c666
BLAKE2b-256 b12f3b2a4a9d1d7cb18124df006a93869877775414b2d0a41cd155849bdfad27

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page