Quantum Circuit Optimisation and Compilation using the ZX-calculus
Project description
QuiZX: A quick backend for PyZX
PyZX is a Python library for quantum circuit optimisation and compiling using the ZX-calculus. It's great for hacking, learning, and trying things out in Jupyter notebooks. However, it's written to maximise clarity and fun, not performance.
This is a port of some of the core functionality of PyZX to the Rust programming language. This is a modern systems programming language, which enables writing software that is very fast and memory efficient.
See the CONTRIBUTING.md file for detailed instructions for building the libraries from source and contributing to the project.
A bit about performance
As a very anecdotal example of the performance difference, the program spider_chain builds a chain of 1 million green spiders and fuses them all. In PyZX, you can fuse all the spiders in a ZX-diagram as follows:
from pyzx.basicrules import *
success = True
while success:
success = any(fuse(g, g.edge_s(e), g.edge_t(e)) for e in g.edges())
In QuiZX, the Rust code is slightly more verbose, but similar in spirit:
use quizx::basic_rules::*;
loop {
match g.find_edge(|v0,v1,_| check_spider_fusion(&g, v0, v1)) {
Some((v0,v1,_)) => spider_fusion_unchecked(&mut g, v0, v1),
None => break,
};
}
On my laptop, the PyZX code takes about 98 seconds to fuse 1 million spiders, whereas the QuiZX code takes 17 milliseconds.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quizx-0.3.0.tar.gz.
File metadata
- Download URL: quizx-0.3.0.tar.gz
- Upload date:
- Size: 137.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80e7977e7e6445c9a6b1bc09c98b679d7e55e3497ba8590e55351bb6a764c0fc
|
|
| MD5 |
3ffc31675ccb1a0cbd5200c0bd93d4ee
|
|
| BLAKE2b-256 |
63a8c5d93f6f95e91fb2782e9b9f4c3be9206bbe58dbdf285c9a6d305b65bce7
|
File details
Details for the file quizx-0.3.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 706.1 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38bf9d4af1cd61ff25c9ae866e944fcacf03831bef93cc27829b51bf34ea3b6b
|
|
| MD5 |
ec0cf3f485f2198e550f8f6a7b7d2273
|
|
| BLAKE2b-256 |
8dfba1b8a6af0dc50076fca6524c5881fd9e5ee129a1c30ad1559f60d933f987
|
File details
Details for the file quizx-0.3.0-cp39-abi3-win32.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-win32.whl
- Upload date:
- Size: 658.9 kB
- Tags: CPython 3.9+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fbd1c6a4375a59cd26377cc285cacbe95411164724e9da719c051fb069f5d9c
|
|
| MD5 |
381ebcc193ddfd87533019e135cd9ac0
|
|
| BLAKE2b-256 |
b37e6ff02c510b7a718f1a1c355a212106dc49577def89b5cf8384a1f3c5607b
|
File details
Details for the file quizx-0.3.0-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aede4b59f1113335e27efba7b2c3e90f2a4e8803b0cf35a84b5a53eb98b81ecf
|
|
| MD5 |
18c78f76f8df9578159124ed834f2232
|
|
| BLAKE2b-256 |
492d68a7d273d8ec028eb8f1be3ae7e75b4254757177b78d2ec56704678c1c59
|
File details
Details for the file quizx-0.3.0-cp39-abi3-musllinux_1_2_i686.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a13a281911ed672bbd057080d72dac7f3b611da9d7dd12c1f80d13725834c68
|
|
| MD5 |
292e7bb9646d8a1ec09dcb0c53fa05c5
|
|
| BLAKE2b-256 |
78076a087383c2af17f3cb7ba400f3e0bd9f8d58367a5e72e0c8cff4fa8c36af
|
File details
Details for the file quizx-0.3.0-cp39-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2258de25e5c3f604bfe7ff00e4fc07f3fbaca508b03d4e6ae2c831705478c97f
|
|
| MD5 |
23d5c34ffa4d4153e2cdd3f120332440
|
|
| BLAKE2b-256 |
59675ef1d83e8e90e6982fe065f7d3011e82378d6f17aa8ec86de563eab9d18a
|
File details
Details for the file quizx-0.3.0-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c10cbf04c818ed21c83159460438a800239f0a4d54d2f2e98ebe27768dd1cf22
|
|
| MD5 |
bc14dcd80a4d3c773cd34c84b012b0f1
|
|
| BLAKE2b-256 |
5540b603c562a61004e5b42101e31cc926266df795d40be019e40bde54b5b355
|
File details
Details for the file quizx-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 981.3 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4acdff540a8a194848aed80f0f897cffda082e424e82274585a24eddfb942d7
|
|
| MD5 |
db28d8ac52c772d4c28781768b946312
|
|
| BLAKE2b-256 |
2779cc1ec43ddf8315da769019132529c3e186aaf30bcda7e8df515679723477
|
File details
Details for the file quizx-0.3.0-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 962.6 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fee85c08b5f0b4275facb91fe58e8950d238b85cee2e98582b07785ddb2c732e
|
|
| MD5 |
6985d9b4663d874b09d3fcadceadb6ed
|
|
| BLAKE2b-256 |
f64f789f97a0cdcc128d026e29b3680a8295dde1c3bfc26a7e928c59fde250c0
|
File details
Details for the file quizx-0.3.0-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fd0627c7318a2d2416472097014d75a8502132ed5de9664dafae9d8df234928
|
|
| MD5 |
07ba88c06214484269beaeed43ab45b8
|
|
| BLAKE2b-256 |
fae927a5ddfa5fffdc39d105ea1e6a47cfa9f966528f2f6ed6b7b92ac8a24b16
|
File details
Details for the file quizx-0.3.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23cdcab38359a57ae8e7f7ef4923febc10e11f6b49c81a1e30f1694ad9440993
|
|
| MD5 |
0b3fa6386bdffcd5dcc6ac47f744c650
|
|
| BLAKE2b-256 |
252eae0a183db8a8620cd2816c46a3e6f905136b2f5076025cb2f945266e55e2
|
File details
Details for the file quizx-0.3.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 919.0 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12c3ef6165d38349c4a415cb67263a92013d8e0d91b179329cd90ad38760a4a7
|
|
| MD5 |
4934df74152743f1dc953cf3133f1bf7
|
|
| BLAKE2b-256 |
f15f32c61beefd3070dbc6fb29297f8c63ee92dd7cc216e0e0eb781fb09e38de
|
File details
Details for the file quizx-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 903.0 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f345e40c927e023f5358c44070c4c339e5bc92c40b23ab5962fa62f625e314b6
|
|
| MD5 |
d5495c9456bfb73a382f57c3ca2ee22d
|
|
| BLAKE2b-256 |
ca6410b91306bf6dbe2143ed5321f9cde64be249360a3c71be328e71d71ccf1d
|
File details
Details for the file quizx-0.3.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: quizx-0.3.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 836.9 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4ed59a6f7637658bab5e52df027f9542962f3e06be1f8d2eb6101d3d4facedd
|
|
| MD5 |
ddc84224d4d355f714153205b7b5704f
|
|
| BLAKE2b-256 |
b974afe0bf45acf4ed97b17796d2b421290551d874150886fa0c3025d5452efa
|