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.

Example: Qiskit Hello World

The two-qubit Bell-state circuit from the Qiskit quickstart, rendered as classical sheet music on a white background. A Hadamard gate puts the first qubit in superposition, and a CNOT gate entangles the pair.

Qiskit Hello World as classical sheet music on white

Installation

You can install QuantumSheets directly from PyPI:

pip install QuantumSheets

Features

1. Classical Registers, Chords & Parameter Expressions

  • Classical Registers: Displays classical bits as a crescendo (<) across the bottom of the system, with individual qubit measurement drop lines and bit indicators (▾0, ▾1, ▾2, ▾3).
  • Musical Notation: Single-qubit gates render as notes and multi-qubit gates (CNOT, Toffoli, CZ, SWAP) render as polyphonic chords with authentic stems and clefs.
  • Parameter Expressions: Uses SymPy to format mathematical parameters into musical notation (e.g., RX(π/2), RY(π/4), RZ(π)).

Multi-qubit gates, classical registers, and parameter expressions

2. Control Flow (Loops & Repeat Barlines)

  • Control Flow: Natively unrolls Qiskit loops (ForLoopOp, WhileLoopOp) and renders them using authentic musical repeat barlines (|: and :|) with repeat counts (2x), playing each iteration in sequence.

Quantum loops rendered with repeat barlines

3. MathText Labels & Custom Sub-circuits

  • MathText Rendering: Supports LaTeX/MathText in custom gate labels (e.g., $7^{1} \\% 15$).
  • Sub-circuits: Unpacks custom sub-circuits (such as QFT†) and brackets their internal notes into grouped phrases.
  • Visual Styles: Choose between clean modern white (style="clean") and vintage parchment (style="ink").

Shor's Algorithm with MathText labels and subcircuits

4. Audio Synthesis

  • Acoustic Piano DSP (.wav): Generates 16-bit PCM WAV audio using an acoustic piano synthesis model with hammer strike transients, string inharmonicity, 3-string unison chorus detuning, phase dispersion, and soundboard comb reflections.
  • Musical Note Timing: Target gates ring out as full whole notes while control gates trigger crisp, shorter taps.

Quickstart

from qiskit import QuantumCircuit
from QuantumSheets import draw_circuit, generate_audio

qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)

# Render classical notes on a white background
draw_circuit(qc, filename="hello_world_score.png", style="clean", strip=True)

# Synthesize the circuit's audio to WAV (acoustic grand piano)
generate_audio(qc, filename="hello_world_score.wav", bpm=120)

To regenerate the example scores and WAVs from the repository root:

python docs/hello_world.py
python docs/loop_circuit.py
python docs/my_circuit.py
python docs/test_shor.py

License

MIT License

Metadata

Release files for QuantumSheets 0.1.22

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.22
File Size Uploaded Provenance Actions
quantumsheets-0.1.22.tar.gz 480.5 kB With provenance Details for quantumsheets-0.1.22.tar.gz

Built distribution (wheel)

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

Total release size: 958.6 kB

Release files / quantumsheets-0.1.22.tar.gz

Download URL quantumsheets-0.1.22.tar.gz
Size 480.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9d220d2f7c8c1f077c4bfe48ca029f5eed4df3794f811caf3da9fdd450ae35cf
BLAKE2b-256 checksum
How to use checksums
5a194b680bf4a27bb5b3414e4482db494edc7f5b96cfb3ffb6f4b97c163f63d0
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 Oct 11, 2026.

Transparency log

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

Download URL quantumsheets-0.1.22-py3-none-any.whl
Size 478.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
924c814659d42c3d0616d54631491a35125473d44d66db417e641c1997cb5cb7
BLAKE2b-256 checksum
How to use checksums
f2437cb81f0a23cfbb2294b3b76e756243b779c67c8073c12fd17b9ef13fd917
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 Oct 11, 2026.

Transparency log

Security for QuantumSheets 0.1.22

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.22.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 Oct 11, 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