# Dense Evolution

Runs quantum circuit simulations, VQE routines, and molecular Hamiltonians through agent tooling. It handles circuits up to 28 qubits with disk-spill memory fallbacks.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 19
- Author: tatopenn-cell
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/tatopenn-cell/Dense-Evolution
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/dense-evolution

## What it does

This server equips coding assistants with 21 quantum computing tools. Simulations run on statevector and MPS engines backed by JAX XLA JIT compilation. It translates OpenQASM routines and computes VQE ground states alongside QM/MM molecular forces. A 28-qubit circuit finishes in about 3 seconds.

Memory scaling relies on automated chunking and disk spilling. When large state vectors exceed available system RAM, data writes to storage rather than triggering an out-of-memory crash. Python 3.9 or newer is required. JAX comes installed as the foundational dependency.

macOS users on Apple Silicon face an upstream segfault inside Qiskit initialization. Because of that bug, switching to the PennyLane interop package prevents terminal crashes. You can also point the server to a local Composer kernel using `DENSE_EVOLUTION_KERNEL_URL`.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `DENSE_EVOLUTION_KERNEL_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env DENSE_EVOLUTION_KERNEL_URL=<DENSE_EVOLUTION_KERNEL_URL> --transport stdio dense-evolution -- uvx dense-evolution
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>

### Codex

**Platform CLI**
```bash
codex mcp add dense-evolution --env DENSE_EVOLUTION_KERNEL_URL=<DENSE_EVOLUTION_KERNEL_URL> -- uvx dense-evolution
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "dense-evolution": {
            "command": "uvx",
            "args": [
                "dense-evolution"
            ],
            "env": {
                "DENSE_EVOLUTION_KERNEL_URL": "<DENSE_EVOLUTION_KERNEL_URL>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "dense-evolution": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "dense-evolution"
            ],
            "env": {
                "DENSE_EVOLUTION_KERNEL_URL": "<DENSE_EVOLUTION_KERNEL_URL>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e DENSE_EVOLUTION_KERNEL_URL=<DENSE_EVOLUTION_KERNEL_URL> dense-evolution uvx dense-evolution
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>

## When to use it
- simulate quantum circuits up to 28 qubits with JIT compilation
- parse and execute OpenQASM 2.0 and 3.0 circuit code
- calculate ground state energy using VQE algorithms
- apply noise models to simulated quantum statevectors
- evaluate molecular Hamiltonians and QM/MM forces

## Example prompts
- Simulate the OpenQASM circuit in `circuit.qasm` and output measurement probabilities.
- Optimize the VQE energy function for my molecular Hamiltonian using `dense-evolution`.
- Apply a depolarizing noise model with probability 0.05 to the statevector.

## Similar
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5548
- [arxiv-mcp-server](https://affpapa.org/en/nevibecode/mcp/arxiv-mcp-server.md) — MCP server · ★ 3231
- [PaperBanana](https://affpapa.org/en/nevibecode/mcp/paperbanana.md) — MCP server · ★ 2417
- [MATLAB MCP Server](https://affpapa.org/en/nevibecode/mcp/matlab-mcp-server.md) — MCP server · ★ 1716
- [Hex Research](https://affpapa.org/en/nevibecode/mcp/hex-research.md) — MCP server · ★ 583
- [DocsAgent — Zotero, Obsidian & Apple Notes MCP Server](https://affpapa.org/en/nevibecode/mcp/docsagent-zotero-obsidian-apple-notes-mcp-server.md) — MCP server · ★ 578

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
