QuantumSheets
QuantumSheets is a Python library that renders Qiskit quantum circuits as classical sheet music. It maps quantum gates to musical notes on a staff, providing an alternative visual representation for quantum algorithms.
Installation
You can install QuantumSheets directly from PyPI:
pip install QuantumSheets
Features
- Universal Gate Support: Completely supports ALL standard Qiskit gates natively, and flawlessly renders completely custom multi-qubit gates of any size.
- Advanced Circuit Features:
- Control Flow: Natively unrolls Qiskit loops (
ForLoopOp,WhileLoopOp) and renders them using authentic musical repeat barlines (|:and:|). - Sub-circuits: Automatically unpacks custom sub-circuits and brackets their internal notes into grouped phrases.
- Parameter Expressions: Uses SymPy to beautifully format mathematical parameters (e.g.,
RX(θ/2 + π)). - Classical Registers: Displays classical bits as a crescendo (
<) at the bottom of the system, with measurements dropping down to it.
- Control Flow: Natively unrolls Qiskit loops (
- Musical Notation: Renders single-qubit gates as notes and multi-qubit gates as polyphonic chords with proper stems and clefs.
- Audio Synthesis: Generates
.wavfiles playing the circuit's sequence. Pitches are mapped to gates, and multi-qubit gates generate beautiful harmonic intervals. - MathText Rendering: Supports LaTeX/MathText in custom gate labels (e.g.,
$7^{1} \\% 15$). - Dynamic Layout: Automatically wraps long circuits across multiple systems and gracefully adjusts horizontal spacing for massive labels to prevent overlap.
Example: Shor's Algorithm
An 8-qubit implementation of Shor's Algorithm containing custom, 5-qubit mathematical control operations:
Quickstart
from qiskit import QuantumCircuit
from QuantumSheets import draw_circuit
from QuantumSheets.audio import generate_audio
qc = QuantumCircuit(3)
qc.h(0)
qc.cx(0, 1)
qc.cx(1, 2)
qc.measure_all()
# Render circuit to image (supports "ink" and "clean" styles)
draw_circuit(qc, filename="circuit.png", style="clean", strip=True)
# Synthesize the circuit's audio to a WAV file
generate_audio(qc, filename="circuit.wav", bpm=120)
CLI Usage
You can generate both images and audio directly from the command line:
python -m QuantumSheets.cli my_circuit.py -o output.png --style clean --audio
License
MIT License
Metadata
Release files for QuantumSheets 0.1.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quantumsheets-0.1.15.tar.gz | 478.8 kB | With provenance | Details for quantumsheets-0.1.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantumsheets-0.1.15-py3-none-any.whl | Python 3 | none | any | Details for quantumsheets-0.1.15-py3-none-any.whl |
Total release size: 956.0 kB
Release files / quantumsheets-0.1.15.tar.gz
| Download URL | quantumsheets-0.1.15.tar.gz |
|---|---|
| Size | 478.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab3a2ee5f86925e210d210f6e4b37ecbb68e37bd5a5319678da2a13b51fc8d06
|
|
BLAKE2b-256 checksum How to use checksums |
f42885e4533a34c8d9c75ce99b56191694c7520534f98708f58f97f0433f6623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 2, 2026.
Transparency logRelease files / quantumsheets-0.1.15-py3-none-any.whl
| Download URL | quantumsheets-0.1.15-py3-none-any.whl |
|---|---|
| Size | 477.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c077d67574ebd949bc400646acdc603a7fbe920c2f7f4a9f99b73bf816c20c4
|
|
BLAKE2b-256 checksum How to use checksums |
c5ec2fff279074efd68b8c7395c14f90208f9252b7129ddd77b751a36c3f4a0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 2, 2026.
Transparency logSecurity for QuantumSheets 0.1.15
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for quantumsheets-0.1.15.tar.gz
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 Sep 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.