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

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.23
File Size Uploaded Provenance Actions
quantumsheets-0.1.23.tar.gz 483.8 kB With provenance Details for quantumsheets-0.1.23.tar.gz

Built distribution (wheel)

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

Total release size: 963.5 kB

Release files / quantumsheets-0.1.23.tar.gz

Download URL quantumsheets-0.1.23.tar.gz
Size 483.8 kB
Tags Source
SHA-256 checksum
How to use checksums
845f2d942e18023d0d3ece5cc020c26d57ded3a9bf1e9c9edfe31a3472455474
BLAKE2b-256 checksum
How to use checksums
43286c85dae7c7afb16a8d8ad63dc06a963e61b97bc2b4f5d2c6c12cffbc29cc
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.23-py3-none-any.whl

Download URL quantumsheets-0.1.23-py3-none-any.whl
Size 479.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79f161ea7d513d17ae191b776309bd9270c92f1d3d207b38c5501b90475aeb59
BLAKE2b-256 checksum
How to use checksums
251d5fee63ecf3f0ff726f224fe29fbca36137661469032e76c7c0da31f69f77
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.23

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