Quantum Code Validator
About
A server for validating quantum computing library code, with support for PennyLane.
Details
- Author
- qyusu
- Categories
- Developer Tools
Jump to
Setup
Install Quantum Code Validator in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/qyusu/quantum-code-validator
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server for validating quantum computing library code. Currently supports PennyLane, with plans to expand support for other quantum computing libraries in the future.
The Quantum Code Validator is a tool that helps developers ensure their quantum computing code is valid and follows the correct usage patterns for various quantum libraries. It provides static validation of quantum code against official documentation and offers reference documentation lookup capabilities.
- Static Code Validation: Validates quantum code by:
- Checking code syntax using Python'sastmodule
- Verifying code compilation usingpy_compile
- Comparing quantum library method usage against official documentation
- PennyLane: Full support for static validation and reference documentation lookup
- Supported versions: v0.35.0 - v0.41.1
The following quantum computing libraries are planned for future support:
- Qulacs
- Qiskit
- Cirq
- cuQuantum
- And more...
# Example usage result = validate_quantum_method_by_static( code="your_quantum_code_here", version="v0.41.1" # Optional )
# Example usage docs = request_quantum_method_reference( method_name="qml.CNOT", # Method name without arguments version="v0.41.1" # Optional )
git clone https://github.com/yourusername/quantum-code-validator.git cd quantum-code-validator
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
curl -LsSf https://astral.sh/uv/install.sh | sh
1.1 Load and Parse PennyLane Source Code
Load basic information from PennyLane's source code and save it as JSON files by version. The PennyLane version will be the one installed in the execution environment, so please switch it using the uv command as needed.
uv run scripts/parse_pennylane_api.py ./refdocs/pennylane/raw/v0.41.1.json
Next, we will use an LLM to format the basic information extracted in Step 1 into document information that can be accessed on MCP. Please specify the PennyLane versions to be converted into documents as a comma-separated list. Note that this process uses an LLM, so the "OPENAI_API_KEY" environment variable must be set, and there is a cost of approximately $2.50 per version. The formatting results will be saved in"./refdocs/pennylane/formatted".
uv run scripts/format_docs_by_llm.py v0.41.0,v0.41.1
Finally, by configuring themcp.jsonfile according to the platform and starting the MCP server, the tool becomes available for use with the target tool. As a reference, alinkto the documentation on how to configure it for Claude Desktop is provided.
{ "mcpServers": { "quantum-code-validator": { "command": "uv", "args": [ "--directory", "/your/mcp/server/directory/quantum-code-validator", "run", "server.py", "--transport", "stdio" ] } } }
This project is licensed under the MIT License - see theLICENSEfile for details.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Help agents automatically write and test stories for your UI components
Six read-only decision tools for coding agents to assess GitHub bounties, audit agent instructions, diagnose GitHub Actions failures and flakes, and detect MCP tool drift. Remote Streamable HTTP
AI-Safe Code Analysis with 113+ MCP tools for guard validation, memory, workflow, and testing.
fable-discipline is a Claude Code plugin that makes agentic software work follow repeatable working patterns: design before code, verify after edits, separate author from reviewer, preserve verified state between sessions, and report uncertainty honestly.
MCP server that generates production-grade engineering standards (SOLID, testing, architecture, CI/CD) for AI coding assistants
Execute JavaScript code in a modern runtime environment with support for various built-in modules.
Provides a secure JavaScript execution environment for running code snippets.
A server for JavaScript/TypeScript development with intelligent project tooling and testing capabilities.
Execute code securely in isolated sandbox environments using the E2B API.
A powerful Model Context Protocol (MCP) server that supercharges your Python development workflow with AI-powered code review, intelligent test generation, and comprehensive test execution.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





