API Reference
Each page is a guide to one module: what it does in plain words, a QASM example run
through the real parser, then the reference generated from the package's own docstrings
via mkdocstrings , so the reference can't drift out of
sync with the code.
Driving these modules without writing Python : the Composer kernel runs the same
modules from a browser (Composer ) or from an MCP-aware agent
(MCP Server , 32 tools — Claude Code, Claude Desktop, ...). Both call the
exact same kernel, not a separate reimplementation.
Simulators and circuits
Module
What it's for
Simulator
Core dense statevector engine (DenseSVSimulator)
MPS Simulator
Matrix-product-state engine for low-entanglement circuits at scale
Chunk
Anti-OOM statevector chunking, including distributed multi-device dispatch
QASM Parser
OpenQASM 2.0 / 3.0 parsing, including user-defined gate definitions
Compiler
Circuit transpilation (QuantumTranspiler)
Registry
Hardware detection: how many qubits this machine can safely simulate
Precision
64-bit JAX precision: automatic ensure_x64, set_precision, with_x64
Gates
Gate matrix tables (GATES, PARAMETRIC_GATES, GATE_IDS)
Topology
Entangling-layer patterns for variational circuits
States
Common state-preparation circuits (GHZ, ...)
QFT
Quantum Fourier Transform circuit
Arithmetic
Register adders, subtractors, comparators, modular add / multiply / power
Postselection
Keep only the runs where a qubit lands in a chosen state
Random Circuit
Random valid circuits for benchmarking and fuzz-testing
Drawing
Plain-text circuit diagrams
Diagram
Quirk-style box diagrams (plot_circuit)
Interop
Qiskit / PennyLane bridges
Measurement, noise and mitigation
Module
What it's for
Observables
Pauli-string expectation values and Pauli-sum Hamiltonians
Measurement
Shot sampling and pure-state fidelity
Spectral
exp(-iHt) and other matrix functions with correct gradients at exact degeneracy
Entropy
Multi-qubit partial trace, von Neumann entropy, mutual information
Noise
NoiseModel Kraus channels, density-matrix channels, time-varying noise
Mitigation
Zero-Noise Extrapolation (scalar, density-matrix, single-qubit Bloch vector), shot allocation, density-matrix diagnostics
Healing
Predictive-healing primitives
QEC
Erasure-aware stabilizer decoding, MWPM, syndrome-based noise estimation
Cryptography Protocols
BB84, device-independent QKD and conference key agreement (crypto-q)
Chemistry and materials
Module
What it's for
Autodiff
Differentiable circuit-to-energy pipeline for VQE
UCCSD
Native excitation circuits for the UCCSD ansatz
Trotter
Real-time Hamiltonian evolution as an actual gate circuit
Fermions
Majorana-fermion → qubit (Jordan-Wigner) mapping
Native Hartree-Fock
From-scratch JAX/Obara-Saika Hartree-Fock, with libcint integrals on Windows, macOS and Linux
QM/MM
Region partitioning, embedding, Hellmann-Feynman forces, molecular dynamics
Harrison Tight-Binding
Universal (materials-independent) sp3 tight-binding Hamiltonians
VHD Tight-Binding
Material-specific sp3s* tight-binding, validated against real GaAs/Si/Ge gaps
Mass Decomposition
Molecular formulas and neutral losses from mass-spectrometry peaks
These live under tools/, not inside the dense_evolution package: the vector-healing,
adversarial-attack and retrieval utilities (ia_utils) and the Composer kernel
(dashboard_core) behind the Composer, the MCP server and the Streamlit Dashboard.