Skip to main content

QuantumSheets

PyPI

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.
  • Musical Notation: Renders single-qubit gates as notes and multi-qubit gates as polyphonic chords with proper stems and clefs.
  • Audio Synthesis: Generates .wav files 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:

Shor's Algorithm

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.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for QuantumSheets 0.1.16
File Size Uploaded Provenance Actions
quantumsheets-0.1.16.tar.gz 479.1 kB With provenance Details for quantumsheets-0.1.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for QuantumSheets 0.1.16
File Interpreter ABI Platform Actions
quantumsheets-0.1.16-py3-none-any.whl Python 3 none any Details for quantumsheets-0.1.16-py3-none-any.whl

Total release size: 956.8 kB

Release files / quantumsheets-0.1.16.tar.gz

Download URL quantumsheets-0.1.16.tar.gz
Size 479.1 kB
Tags Source
SHA-256 checksum
How to use checksums
82570a220263153399321f7016680925665781db8cd91bce4f10b9481e76e0f3
BLAKE2b-256 checksum
How to use checksums
4f139c9b17e304c0bb5b168202a5716164dc649936850c869935d9f23b914dbd
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 log

Release files / quantumsheets-0.1.16-py3-none-any.whl

Download URL quantumsheets-0.1.16-py3-none-any.whl
Size 477.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40825f08d1183a477277bda92809028dc3ca8d4cb25eabb82082567536409bdd
BLAKE2b-256 checksum
How to use checksums
91347f9c0ab6eb8498ce1ce8805a90c63c27af3999886b128e2132c50ebf2881
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 log

Security for QuantumSheets 0.1.16

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.

Select from 2 files

Attestation for quantumsheets-0.1.16.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page