Qiskit Gym MCP Server — Claude Code MCP server: install
This MCP server trains RL models for quantum circuit synthesis and applies them to qubit routing, linear functions, and Clifford circuits.
claude mcp add qiskit-gym-mcp-server -- uvx qiskit-gym-mcp-serverWhat Qiskit Gym MCP Server does
Qiskit Gym MCP Server exposes tools for reinforcement-learning training and quantum circuit synthesis. It covers three task types: qubit routing with SWAP gates, CNOT synthesis for linear Boolean functions, and Clifford circuit synthesis with custom gate sets.
Agents can start training in the background, poll its status, stop sessions, and save or load models. The server includes presets for IBM Heron, IBM Nighthawk, grid layouts, and linear chains. It can also extract hardware subtopologies and read exact coupling maps from fake IBM backends. Those offline topology maps require no IBM Quantum credentials.
In Claude Code, add it with claude mcp add qiskit-gym-mcp-server -- uvx qiskit-gym-mcp-server. TensorBoard integration exposes training progress for monitoring.
What it helps with
- train an RL model for Clifford circuit synthesis
- route qubits while reducing SWAP gates
- generate a CNOT circuit for a linear function
- extract subtopologies from an IBM hardware map
- save a trained model to disk
Example prompts for the agent
- Create a Clifford environment on
grid_3x3and train it with PPO. - Get the coupling map for
fake_fez, extract 5-qubit subtopologies, and train routing models for them. - Start background training for a 6-qubit environment, check its status, and save the completed model.
How to install Qiskit Gym MCP Server
Platform CLI
claude mcp add qiskit-gym-mcp-server -- uvx qiskit-gym-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from qiskit-gym-mcp-server <command>
Platform CLI
codex mcp add qiskit-gym-mcp-server -- uvx qiskit-gym-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from qiskit-gym-mcp-server <command>
Config file
{
"mcpServers": {
"qiskit-gym-mcp-server": {
"command": "uvx",
"args": [
"qiskit-gym-mcp-server"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from qiskit-gym-mcp-server <command>
Config file
{
"servers": {
"qiskit-gym-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"qiskit-gym-mcp-server"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from qiskit-gym-mcp-server <command>
Platform CLI
gemini mcp add qiskit-gym-mcp-server uvx qiskit-gym-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from qiskit-gym-mcp-server <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Qiskit Gym MCP Server
How do I install Qiskit Gym MCP Server in Claude Code?
Run claude mcp add qiskit-gym-mcp-server -- uvx qiskit-gym-mcp-server.
What does Qiskit Gym MCP Server do?
It gives an agent tools to train RL models and synthesize SWAP, CNOT, and Clifford circuits. Training sessions can run in the background and their models can be saved.
Do fake IBM backend topologies need credentials?
No. Exact coupling maps from fake IBM backends are available offline without IBM Quantum credentials.