YQ

yuchenssr/quantum-simulator-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 2 forks Качество 66 Тренд 8MIT

for quantum computing

Обзор

A Docker image providing a quantum circuit simulator that implements the Model Context Protocol (MCP), allowing integration with MCP clients such as Claude for Desktop. - Quantum computing simulator with noise models - Support for OpenQASM 2.0 quantum circuits - Quantum circuit simulation using Qiskit - Support for various noise models (depolarizing, thermal relaxation, readout error) - Multiple result types including counts, statevector, and visualized histograms - Pre-configured example circuits - Seamless integration with MCP clients Simply run the container with the following command: This command: - Mounts the /tmp directory on your host to store histogram output files - Sets the HOST_OUTPUT_DIR environment variable to /tmp - Keeps the container running with -i (interactive mode) - Automatically removes the container when it exits with --rm 1. Install Claude for Desktop 2. Edit the Claude configuration file: - macOS: ~/Library/Application Support/Claude/claude_desktop_config.

README

Показан фрагмент оригинального README. Открыть оригинал.

Quantum Simulator MCP Server

A Docker image providing a quantum circuit simulator that implements the Model Context Protocol (MCP), allowing integration with MCP clients such as Claude for Desktop.

Features

  • Quantum computing simulator with noise models
  • Support for OpenQASM 2.0 quantum circuits
  • Quantum circuit simulation using Qiskit
  • Support for various noise models (depolarizing, thermal relaxation, readout error)
  • Multiple result types including counts, statevector, and visualized histograms
  • Pre-configured example circuits
  • Seamless integration with MCP clients

Quick Start

get the docker image

docker pull ychen94/quantum-simulator-mcp:latest

Simply run the container with the following command:

docker run -i --rm -v /tmp:/data/quantum_simulator_results -e HOST_OUTPUT_DIR="/tmp" ychen94/quantum-simulator-mcp:latest

This command:

  • Mounts the /tmp directory on your host to store histogram output files
  • Sets the HOST_OUTPUT_DIR environment variable to /tmp
  • Keeps the container running with -i (interactive mode)
  • Automatically removes the container when it exits with --rm

Using with Claude for Desktop

  1. Install Claude for Desktop

  2. Edit the Claude configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add the following configuration to the mcpServers section:

{
  "mcpServers": {
    "quantum-simulator": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v", "/tmp:/data/quantum_simulator_results",
        "-e", "HOST_OUTPUT_DIR=/tmp",
        "ychen94/quantum-simulator-mcp:latest"
      ]
    }
  }
}
  1. Restart Claude for Desktop
  2. Look for the hammer icon in the Claude UI, indicating available MCP tools

MCP Tools

The server provides the following MCP tools:

  • run_circuit: Run a quantum circuit with specified noise model
  • list_noise_models: List all available noise models and their descriptions
  • list_result_types: List all available result types and their descriptions
  • get_circuit_stats: Analyze a quantum circuit and return statistics
  • create_test_histogram: Create a test histogram file to verify output directory configuration

MCP Resources

The server provides example quantum circuits:

  • qasm://examples/bell-state.qasm: Bell state preparation circuit
  • qasm://examples/grover-2qubit.qasm: 2-qubit Grover’s algorithm implementation
  • qasm://examples/qft-4qubit.qasm: 4-qubit Quantum Fourier Transform
  • quantum://noise-models/examples.json: Example noise model configurations

Example Usage in Claude

Here are some prompts you can use in Claude:

  1. “Run a Bell state circuit and show me the results”

  2. “What noise models are available in the quantum simulator?”

  3. “Simulate a 2-qubit Grover’s algorithm with 0.01 depolarizing noise”

Открыть полный README на GitHub

Установка

docker run -i --rm -v /tmp:/data/quantum_simulator_results -e HOST_OUTPUT_DIR=/tmp ychen94/quantum-simulator-mcp:latest
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "quantum-simulator": { "command": "docker", "args": [ "run", "-i", "--rm", "-v", "/tmp:/data/quantum_simulator_results", "-e", "HOST_OUTPUT_DIR=/tmp", "ychen94/quantum-simulator-mcp:latest" ] } } }