QuantumArchitect MCP

QuantumArchitect MCP

Enables AI agents to create, validate, evaluate, and score quantum circuits with support for multiple hardware platforms. Provides tools for generating quantum algorithms (Bell states, Grover's, VQE), simulating circuits, checking hardware compatibility, and assessing circuit quality metrics.

Category
Visit Server

README


title: QuantumArchitect MCP emoji: โš›๏ธ colorFrom: indigo colorTo: purple sdk: gradio sdk_version: 6.0.1 app_file: app.py pinned: false license: mit short_description: Quantum Circuit Architect & MCP Server for AI Agents tags:

  • building-mcp-track-enterprise
  • building-mcp-track-consumer
  • building-mcp-track-creative
  • Google-Gemini-API

VIDEO: https://youtu.be/E1Ailx1X1YE SOCIAL: https://www.linkedin.com/posts/nicolas-larenas_quantumarchitect-mcp-a-hugging-face-space-activity-7401024993893044225-RF-R?utm_source=share&utm_medium=member_desktop&rcm=ACoAADmu0wIBjvA0DVdHvqncNUVTEW72gbiGUps

QuantumArchitect-MCP ๐Ÿ”ฌโš›๏ธ

A Python-based MCP (Model Context Protocol) Server for Quantum Circuit creation, validation, and evaluation. This serves as a "Quantum Logic Engine" that AI Agents can call upon to validate, score, and execute quantum logic.

๐Ÿš€ Features

  • Circuit Creation: Generate Bell States, GHZ States, QFT, Grover's Algorithm, and VQE Ansatz circuits
  • Circuit Validation: Syntax checking, connectivity validation for real hardware, unitarity verification
  • Circuit Evaluation: Statevector simulation, noise estimation, resource estimation
  • Circuit Scoring: Complexity metrics, expressibility scores, hardware fitness evaluation
  • MCP Endpoints: Full MCP protocol support for AI Agent integration
  • Hardware Profiles: Support for IBM, Rigetti, and other quantum hardware topologies

๐Ÿ“ฆ Installation

For Hugging Face Spaces

This project is designed to run directly on Hugging Face Spaces. Simply clone and deploy!

Local Installation

pip install -r requirements.txt
python app.py

๐Ÿš€ Quick Start

1. Start the Application

python app.py

The app will start at http://127.0.0.1:7861

2. Build Your First Circuit

  1. Open the web interface in your browser
  2. Go to the "Circuit Builder" tab
  3. Click the "H" button to add a Hadamard gate
  4. Click "Simulate" to see the results
  5. View the Bloch sphere visualization of the qubit state

3. Try a Bell State

  1. Go to the "Templates" tab
  2. Select "Bell State" from the dropdown
  3. Click "Load Template"
  4. Click "Simulate" to see entangled output (50/50 probabilities)

4. Validate a Circuit

  1. Go to the "Validate" tab
  2. Paste or enter QASM code
  3. Select target hardware (e.g., "ibm_eagle")
  4. Click "Validate" to check syntax, connectivity, and unitarity

๐Ÿ”ง Project Structure

QuantumArchitect-MCP/
โ”œโ”€โ”€ app.py                          # Main entry point (Gradio + MCP)
โ”œโ”€โ”€ requirements.txt                # Dependencies
โ”œโ”€โ”€ pyproject.toml                  # Project configuration
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ mcp_server/                 # MCP Protocol handling
โ”‚   โ”‚   โ”œโ”€โ”€ server.py               # MCP capabilities definition
โ”‚   โ”‚   โ”œโ”€โ”€ schemas.py              # JSON schemas for I/O
โ”‚   โ”‚   โ””โ”€โ”€ context_provider.py     # Resource providers
โ”‚   โ”œโ”€โ”€ core/                       # Quantum engine core
โ”‚   โ”‚   โ”œโ”€โ”€ circuit_parser.py       # QASM/circuit parsing
โ”‚   โ”‚   โ”œโ”€โ”€ dag_representation.py   # Internal DAG model
โ”‚   โ”‚   โ””โ”€โ”€ exceptions.py           # Custom exceptions
โ”‚   โ”œโ”€โ”€ plugins/                    # Modular components
โ”‚   โ”‚   โ”œโ”€โ”€ creation/               # Circuit generation
โ”‚   โ”‚   โ”œโ”€โ”€ validation/             # Circuit validation
โ”‚   โ”‚   โ”œโ”€โ”€ evaluation/             # Circuit evaluation
โ”‚   โ”‚   โ””โ”€โ”€ scoring/                # Circuit scoring
โ”‚   โ””โ”€โ”€ data/                       # Knowledge base
โ”‚       โ”œโ”€โ”€ hardware_profiles/      # Hardware topology configs
โ”‚       โ””โ”€โ”€ reference_circuits/     # Standard algorithm references
โ””โ”€โ”€ tests/                          # Test suite

๐ŸŽฏ MCP Endpoints

Creation Tools

  • create_bell_state: Generate a 2-qubit Bell state circuit
  • create_ghz_state: Generate an N-qubit GHZ state
  • create_qft: Generate Quantum Fourier Transform circuit
  • create_grover: Generate Grover's search algorithm
  • create_vqe_ansatz: Generate VQE variational ansatz

Validation Tools

  • validate_syntax: Check circuit syntax validity
  • validate_connectivity: Verify hardware topology compatibility
  • validate_unitarity: Check if circuit is properly unitary

Evaluation Tools

  • simulate_statevector: Get ideal simulation results
  • estimate_noise: Estimate circuit noise accumulation
  • estimate_resources: Calculate required shots and resources

Scoring Tools

  • score_complexity: Get circuit depth, gate count, width
  • score_expressibility: Evaluate VQC expressibility (QML)
  • score_hardware_fitness: Rate circuit for specific hardware

๐Ÿ–ฅ๏ธ Usage

Web Interface

Access the Gradio UI at the deployed URL or http://localhost:7860 for local runs.

MCP Integration

Connect your AI Agent to the MCP endpoints:

# Example: Claude Desktop configuration
{
    "mcpServers": {
        "quantum-architect": {
            "url": "https://your-space.hf.space/mcp"
        }
    }
}

๐Ÿ“š Learning Path Integration

This tool follows the "Zero to Hero" quantum computing curriculum:

  1. Level 0 (Beginner): Use creation templates (Bell, GHZ states)
  2. Level 1 (Practitioner): Validate circuits against real hardware
  3. Level 2 (Advanced): Evaluate noise and optimize for NISQ devices
  4. Level 3 (PhD/Hero): Score expressibility and develop new algorithms

๐Ÿค– AI Agent Integration

Available MCP Tools

Tool Description Parameters
mcp_create_circuit Create from template template_name, num_qubits, parameters_json
mcp_parse_qasm Parse OpenQASM code qasm_code, qasm_version
mcp_build_circuit Build custom circuit num_qubits, gates_json, measurements_json
mcp_validate_circuit Validate circuit qasm_code, hardware_target, check_connectivity, check_unitary
mcp_check_hardware Check hardware compatibility qasm_code, hardware_name
mcp_simulate Simulate circuit qasm_code, shots, include_statevector, noise_model
mcp_get_statevector Get ideal statevector qasm_code
mcp_estimate_fidelity Estimate hardware fidelity qasm_code, hardware_name
mcp_score_circuit Score circuit qasm_code, hardware_name
mcp_compare_circuits Compare multiple circuits circuits_json, hardware_name
mcp_get_gate_info Gate documentation gate_name
mcp_get_algorithm_info Algorithm explanation algorithm_name
mcp_list_hardware List hardware profiles -
mcp_list_templates List circuit templates -
mcp_get_learning_path Get learning resources level

Supported Hardware Profiles

  • IBM Eagle (127 qubits, heavy-hex topology)
  • Rigetti Aspen (80 qubits, octagonal topology)
  • IonQ Aria (25 qubits, all-to-all connectivity)

Circuit Templates

  • bell_state - Maximally entangled 2-qubit state
  • ghz_state - N-qubit GHZ entangled state
  • w_state - N-qubit W state
  • superposition - Uniform superposition
  • qft - Quantum Fourier Transform
  • grover - Grover's search algorithm
  • vqe - VQE variational ansatz
  • qaoa - QAOA optimization circuit

๐Ÿงช Running Tests

pytest tests/ -v

๐Ÿ“„ License

MIT License - See LICENSE file for details.

๐Ÿ™ Acknowledgments

Built with:

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured