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.
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
- Open the web interface in your browser
- Go to the "Circuit Builder" tab
- Click the "H" button to add a Hadamard gate
- Click "Simulate" to see the results
- View the Bloch sphere visualization of the qubit state
3. Try a Bell State
- Go to the "Templates" tab
- Select "Bell State" from the dropdown
- Click "Load Template"
- Click "Simulate" to see entangled output (50/50 probabilities)
4. Validate a Circuit
- Go to the "Validate" tab
- Paste or enter QASM code
- Select target hardware (e.g., "ibm_eagle")
- 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 circuitcreate_ghz_state: Generate an N-qubit GHZ statecreate_qft: Generate Quantum Fourier Transform circuitcreate_grover: Generate Grover's search algorithmcreate_vqe_ansatz: Generate VQE variational ansatz
Validation Tools
validate_syntax: Check circuit syntax validityvalidate_connectivity: Verify hardware topology compatibilityvalidate_unitarity: Check if circuit is properly unitary
Evaluation Tools
simulate_statevector: Get ideal simulation resultsestimate_noise: Estimate circuit noise accumulationestimate_resources: Calculate required shots and resources
Scoring Tools
score_complexity: Get circuit depth, gate count, widthscore_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:
- Level 0 (Beginner): Use creation templates (Bell, GHZ states)
- Level 1 (Practitioner): Validate circuits against real hardware
- Level 2 (Advanced): Evaluate noise and optimize for NISQ devices
- 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 stateghz_state- N-qubit GHZ entangled statew_state- N-qubit W statesuperposition- Uniform superpositionqft- Quantum Fourier Transformgrover- Grover's search algorithmvqe- VQE variational ansatzqaoa- QAOA optimization circuit
🧪 Running Tests
pytest tests/ -v
📄 License
MIT License - See LICENSE file for details.
🙏 Acknowledgments
Built with:
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。