Skip to main content

Dense Evolution — NISQ quantum simulation toolkit, JAX-native

A high-performance quantum simulation toolkit Statevector/MPS engines with compilation, noise, VQE, QEC, chemistry, and agent-native tooling.


Download the Dense Evolution Dashboard (Streamlit)
Windows (.bat) · macOS / Linux (.sh)

CI Docs codecov PyPI PyPI Downloads Python License Build Cross-Validation CI Latest Release Last Commit Issues Stars JAX DOI Featured in Awesome Quantum Software


Table of Contents

▍ What It Is

Run up to 28 qubits in about 3 seconds, without crashing. Dense Evolution JIT-compiles statevector circuits through JAX XLA, automatically chunks and — past even that RAM ceiling — spills to disk when memory fills up, so a real simulation stays alive instead of OOM-ing.

📖 Full documentation, API reference, and worked examples →

A local Streamlit dashboard and web-based Composer editor are also included — see Composer & MCP Server below.


▍ Install

pip install dense-evolution  # JAX is a core dependency, installed by default

# full stack: GPU · dashboard · Qiskit/PennyLane interop
pip install dense-evolution[full]

# just the interop bridge
pip install dense-evolution[qiskit]
pip install dense-evolution[pennylane]

# Composer's local kernel (see "Composer" below)
pip install dense-evolution[composer]

# MCP server for the Composer kernel (see "MCP Server" below)
pip install dense-evolution[mcp]

# development
git clone https://github.com/tatopenn-cell/Dense-Evolution.git
cd Dense-Evolution && pip install -e .[full]
⚠️ macOS + dense-evolution[qiskit] users

Qiskit's own QuantumCircuit.__init__ is known to segfault the whole process on macOS/arm64 (an upstream Qiskit bug, not something Dense-Evolution can fix from its side — see release v8.1.43 for the full reproduction). dense_evolution/interop.py now warns (RuntimeWarning, once per process) the first time you touch the Qiskit bridge on sys.platform == 'darwin', but it does not block — some Qiskit/macOS combinations may work fine. If you hit a crash, pip install dense-evolution[pennylane] gives the same circuit-interop functionality without constructing any Qiskit object.

Google Colab (3 lines):

!git clone https://github.com/tatopenn-cell/Dense-Evolution.git
%cd Dense-Evolution
!pip install -e .

▍ Quick Start

from dense_evolution import DenseSVSimulator, QASMParser

# parse any OpenQASM 2.0 / 3.0 string -- single-qubit rotations, a barrier
# (a real OpenQASM synchronization marker: parsed like hardware would, no
# effect on the simulated state), then an entangling layer
qasm = """
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
rx(pi/3) q[0];
ry(pi/4) q[1];
h q[2];
barrier q;
cx q[0], q[1];
cx q[1], q[2];
rz(pi/6) q[2];
"""

parser = QASMParser()
circuit = parser.parse(qasm)

sim = DenseSVSimulator(n_qubits=3)
sim.run_circuit_jit(circuit.to_tuples())

probs = sim.get_probabilities()
sv    = sim.get_statevector()
# probs = [0.3201 0.3201 0.0549 0.0549 0.0183 0.0183 0.1067 0.1067]

Noise:

import numpy as np
from dense_evolution import DenseSVSimulator, QASMParser, NoiseModel

qasm = 'OPENQASM 2.0; include "qelib1.inc"; qreg q[2]; h q[0]; cx q[0],q[1];'
circuit = QASMParser().parse(qasm)

sim = DenseSVSimulator(n_qubits=2)
sim.run_circuit_jit(circuit.to_tuples())

noisy_sv = NoiseModel.apply_to_sv(np.asarray(sim.sv), n=2, model='depolarizing', p=0.05, rng=np.random.default_rng(0))
np.abs(noisy_sv) ** 2
# [0.   0.5  0.5  0.  ]

VQE:

import jax
import jax.numpy as jnp
from dense_evolution import QASMParser, circuit_to_energy_fn

qasm = 'OPENQASM 2.0; include "qelib1.inc"; qreg q[1]; ry(0.0) q[0];'
circuit = QASMParser().parse(qasm)
energy_fn, n_params = circuit_to_energy_fn(circuit, n_qubits=1)
h = jnp.array([[1.0, 0.0], [0.0, -1.0]], dtype=jnp.complex128)  # Pauli Z

theta = jnp.array([0.1])
grad_fn = jax.value_and_grad(energy_fn, argnums=0, has_aux=True)
for _ in range(40):
    (energy, sv), grad = grad_fn(theta, h)
    theta = theta - 0.5 * grad
# energy = -1.0, theta = [3.14159265]

Mitigation (ZNE):

import dense_evolution as de

e1, e2, e3 = 1.234, 0.876, 0.611  # values at 1x, 2x, 3x noise
de.zero_noise_extrapolation([e1, e2, e3], [1.0, 2.0, 3.0])
# 1.622

Dashboard (local, Streamlit):

pip install "dense-evolution[dashboard]"  # JAX already included by default
streamlit run tools/dashboard/app.py

Anti-OOM for large circuits:

from dense_evolution import Chunk, QASMParser

qasm = 'OPENQASM 2.0; include "qelib1.inc"; qreg q[27]; h q[0:27];'
circuit = QASMParser().parse(qasm)

sim = Chunk(27)
sim.run_chunk(circuit.to_tuples(), chunk_size_gates=500)

▍ Key Features

  • JIT-fused statevector engine. No Kronecker-product overhead — stride-sliced linear kernel fusion compiled through JAX XLA, real GPU/TPU dispatch with no code change. Simulator · MPS backend for low-entanglement circuits at scale.
  • Anti-OOM Chunk engine. Circuits too large for one array, split dynamically and sized off the real compute device's own free memory — with disk-backed overflow past even that ceiling. Chunk guide.
  • Real noise, real mitigation. Stochastic Kraus channels, real-device noise imported from Qiskit backends, and Zero-Noise Extrapolation to correct for it. Noise · Mitigation · what noise/mitigation/healing each mean.
  • Differentiable VQE, from scratch. circuit_to_energy_fn is the same JAX-differentiable engine real molecular VQE runs on — real Hartree-Fock Hamiltonians, UCCSD/hardware-efficient ansätze, Adam optimization. Autodiff.
  • libcint integrals on Windows, macOS and Linux. pip install dense-evolution ships libcint compiled for each system: the full two-electron tensor of ethanol in 6-31G* in 0.32 s. native_hf.
  • OpenQASM 2.0/3.0, both directions. A real parser, plus Qiskit/PennyLane interop bridges. QASM Parser · Interop.
  • Code-agnostic QEC decoding, Majorana/Jordan-Wigner fermion mapping, from-scratch Hartree-Fock for elements outside PennyLane's own basis set, a traversable-wormhole-inspired teleportation protocol, and real QM/MM region partitioning (ring-safe BFS, Diffuse2Seg-derived relevance propagation) — see the full API reference for all of it.

▍ Benchmarks

Measured on Windows, CPU only, 8 GB RAM — PennyLane's default.qubit allocates the full statevector; Dense Evolution's Chunk holds constant ~2 GB regardless of qubit count.

Qubits Hilbert Space PennyLane Dense Evolution Chunk Geometry
26 67,108,864 ✅ 1,074 MB ✅ 2,050 MB 1× (2²⁷)
28 268,435,456 ❌ OOM ✅ 2,050 MB 2× (2²⁷)
32 4,294,967,296 ❌ OOM ✅ 2,048 MB 32× (2²⁷)

On Google Colab (12 GB RAM), n=28 runs in ~3s end-to-end (JIT-compiled, num_chunks=2) — the multi-chunk path is fast, not just OOM-safe. Past the real RAM ceiling (Chunk alone raises MemoryPressureError cleanly rather than crashing the process), allow_disk_overflow=True falls back to a slower disk-backed path instead of failing — correctness-first, not benchmarked for speed yet. Full measured table: docs/api/chunk.md.

▍ Composer & MCP Server

A real circuit editor (graphical or OpenQASM) running on your own machine, plus an MCP server exposing 22 tools so an agent (Claude Code, Claude Desktop, ...) can drive it directly. Composer · MCP Server.

▍ Key Resources


▍ Changelog

📜 Full Changelog & Releases — every version, latest first.


▍ License

Business Source License 1.1 — converts automatically to Apache 2.0 on 1 June 2029.

  • Non-commercial use: unrestricted
  • Commercial use: ≤ 24 allocated qubits · ≤ 1,000 circuits/day · ≤ 10,000 shots/circuit
  • Attribution required: © 2026 Salvatore Pennacchio <jtatopenn@libero.it> — Dense Evolution

Full text: LICENSE.md


▍ Cite This

If Dense-Evolution is useful in academic work, please cite it via the metadata in CITATION.cff (recognized by GitHub's own "Cite this repository" button, and by reference managers that support the Citation File Format).

Archived on Zenodo:


© 2026 Salvatore Pennacchio — Dense Evolution

Metadata

Release files for dense-evolution 8.3.0

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

Source distribution (sdist)

Source distribution for dense-evolution 8.3.0
File Size Uploaded
dense_evolution-8.3.0.tar.gz 389.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dense-evolution 8.3.0
File Interpreter ABI Platform
dense_evolution-8.3.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
dense_evolution-8.3.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
dense_evolution-8.3.0-py3-none-macosx_11_0_universal2.whl Python 3 none macOS 11.0+ universal2 (ARM64, x86-64) Details

Total release size: 3.2 MB

Release files / dense_evolution-8.3.0.tar.gz

Download URL dense_evolution-8.3.0.tar.gz
Size 389.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a9d2da104905fbd2212128ae2e82ed46a4903f4fa9d2edaaa01cd7b7a995b24d
BLAKE2b-256 checksum
How to use checksums
dcea58b5c4fdbcb83e16031f501e6a0fd9a13fe2eb390ead64caf6f3c609648e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / dense_evolution-8.3.0-py3-none-win_amd64.whl

Download URL dense_evolution-8.3.0-py3-none-win_amd64.whl
Size 785.3 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
78d40e9de684f7b190036e14962994ceea9ffd2a336feabd6812da0f8adfdd04
BLAKE2b-256 checksum
How to use checksums
37d15bef0b5f8acea1487499f580299e5d0ef1218fbbdcd93cb510b9ea5a1670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / dense_evolution-8.3.0-py3-none-manylinux_2_28_x86_64.whl

Download URL dense_evolution-8.3.0-py3-none-manylinux_2_28_x86_64.whl
Size 779.5 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d08ba6efa4ce44d6659be19889f948a8420dc3f068c547136e66e17bbf5c4698
BLAKE2b-256 checksum
How to use checksums
e31965c216fa07f2d7438b1f832de4151591583cd53fc9617fb10353f1a64b7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / dense_evolution-8.3.0-py3-none-macosx_11_0_universal2.whl

Download URL dense_evolution-8.3.0-py3-none-macosx_11_0_universal2.whl
Size 1.2 MB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
c456d28201c14871e1915c73660f932ead7ea1af6c8d38fb611fd560f694de5c
BLAKE2b-256 checksum
How to use checksums
a0b2d87dceace455e612ef8731dea018636ff39e7b1099ee9a0efdb8717a5e9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

8.3.2

4 release files

8.3.1

4 release files

This release

8.3.0 This release

4 release files

8.2.3

2 release files

8.2.2

2 release files

8.2.1

2 release files

8.2.0

2 release files

8.1.81

2 release files

8.1.80

2 release files

8.1.79

2 release files

8.1.78

2 release files

8.1.77

2 release files

8.1.76

2 release files

8.1.70

2 release files

8.1.69

2 release files

8.1.68

2 release files

8.1.67

2 release files

8.1.66

2 release files

8.1.65

2 release files

8.1.64

2 release files

8.1.63

2 release files

8.1.62

2 release files

8.1.61

2 release files

8.1.60

2 release files

8.1.59

2 release files

8.1.58

2 release files

8.1.57

2 release files

8.1.43

2 release files

8.1.41

2 release files

8.1.40

2 release files

8.1.39

2 release files

8.1.38

2 release files

8.1.37

2 release files

8.1.35

2 release files

8.1.34

2 release files

8.1.33

2 release files

8.1.32

2 release files

8.1.30

2 release files

8.1.29

2 release files

8.1.28

2 release files

8.1.27

2 release files

8.1.25

2 release files

8.1.24

2 release files

8.1.23

2 release files

8.1.21

2 release files

8.1.20

2 release files

8.1.19

2 release files

8.1.18

2 release files

8.1.17

2 release files

8.1.16

2 release files

8.1.15

2 release files

8.1.14

2 release files

8.1.13

2 release files

8.1.12

2 release files

8.1.11

2 release files

8.1.10

2 release files

8.1.9

2 release files

8.1.8

2 release files

8.1.7

2 release files

8.1.6

2 release files

8.1.5

2 release files

8.1.4

2 release files

8.1.3

2 release files

8.1.2

2 release files

8.1.1

2 release files

8.1.0

2 release files

8.0.9

2 release files

8.0.8

2 release files

8.0.7

2 release files

8.0.6

2 release files

8.0.5

2 release files

8.0.4

2 release files

8.0.3

2 release files

8.0.2

2 release files

8.0.1

2 release files

8.0.0

2 release files

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