Real quantum circuit simulator, VQE, molecular Hamiltonians, QM/MM forces, and MD via 21 tools.
io.github.tatopenn-cell/dense-evolution MCP Server
This MCP server exposes functionality for a dense-evolution NISQ quantum simulation toolkit. It supports real quantum circuit simulation, VQE workflows, molecular Hamiltonians, and QM/MM forces, along with MD capabilities. The server is described as providing 21 tools and JAX-native statevector/MPS engines with compilation and noise handling.
π οΈ Key Features
Real quantum circuit simulator
VQE
Molecular Hamiltonians
QM/MM forces and MD
Statevector/MPS engines with compilation and noise
21 tools
π Use Cases
Quantum simulation experiments using VQE
Chemistry-oriented Hamiltonian modeling
Simulating coupled quantum/classical interactions via QM/MM forces
Molecular dynamics workflows
β‘ Developer Benefits
JAX-native tooling
Just-in-time compilation
Acceleration targets include XLA, CUDA, and CuPy
Integrates OpenQASM support
Python-focused development (topics include python)
β οΈ Limitations
No details provided about supported platforms, performance constraints, or compatibility beyond the listed technologies.
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.
A local Streamlit dashboard and web-based Composer editor are also included β see Composer & MCP Server below.
β Install
bash
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.
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 _ inrange(40):
(energy, sv), grad = grad_fn(theta, h)
theta = theta - 0.5 * grad
# energy = -1.0, theta = [3.14159265]
Mitigation (ZNE):
python
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):
bash
pip install "dense-evolution[dashboard]"# JAX already included by default
streamlit run tools/dashboard/app.py
Anti-OOM for large circuits:
python
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
image
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.
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.
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).
URL of the running Dense-Evolution Composer kernel. Start it first with 'dense-evolution serve' (requires the [composer] extra). Defaults to http://127.0.0.1:8800.