Quantum QuirkVis 🙃
A python package that draws quantum circuits written in qasm/OpenQASM 3.0 and outputs as SVG with a strong focus on personalization.
Features
- SVG output
- Theming engine (JSON)
- Personalization (night mode, custom colors)
- Gate symbol substitutions (emojis, icons, animations)
- Awesome "dial" for parametrized gates
- Animations and other CSS filters
- Lightweight
Themes
Default
Night
Matrix
Emoji
Installation
pip install quirkvis
Usage
from quantum_quirkvis import draw
qasm_str = """
OPENQASM 3.0;
qubit[2] q;
h q[0];
cx q[0], q[1];
"""
draw(qasm_str, theme="matrix", filename="path/to/file.svg")
# or
svg = draw(qasm_str, theme="matrix")
Personalization
Check the themes json files to see how much you can customize, you can customize anything!
Then create your own theme, you don't need to overwrite all the file, you only have to change the values of interest, the rest if defaulted.
- mytheme.json
{
"name": "default",
"styles": {
"background": "#777777",
}
}
then simply
draw(qasm_str, theme="mytheme.json")
You can also use the cli provided which exposes the command qasmvis
qasmvis ghz.qasm -t matrix -o ghz.svg
or
qasmvis ghz.qasm -t matrix > ghz.svg
or
cat ghz.qasm | qasmvis -t night > ghz.svg
Libraries
The current package just requires pyqasm to parse the qasm files or string into the AST that is processed to create SVG with the selected theme.
License
MIT
Limitations
Currently the library "unrolls" the circuit, therefore complex or custom gates (like CY, Toffoli, CSWAP, etc) are drawn as their primitives.
U-n gates are not yet supported
unitaryDESIGN
This repo is currently running for a bounty on unitaryDESIGN hackathon
Metadata
Release files for quirkvis 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| quirkvis-0.1.1.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quirkvis-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.8 kB
Release files / quirkvis-0.1.1.tar.gz
| Download URL | quirkvis-0.1.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afcf609002075c68f0fc21f3c581a90d8fb875eafb69a85f5bd4d6f0e7acd4b9
|
|
BLAKE2b-256 checksum How to use checksums |
a0e7483f69e80bbcada4d23486082344a3c2703d306879edfa295b7cc3b6ff12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.
Transparency logRelease files / quirkvis-0.1.1-py3-none-any.whl
| Download URL | quirkvis-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92096afe333849f4f68e27cdf69cbb006f71c67c15be19e7005c24b1746f360c
|
|
BLAKE2b-256 checksum How to use checksums |
6366be37c0fca108abc398c737de3cdc7bcf0892ba1fb6535904dad8da50c94f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.
Transparency log