qiskit-mcp-server 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qiskit-mcp-server
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: MCP server for Qiskit quantum computing capabilities with circuit serialization utilities
5
5
  Project-URL: Homepage, https://github.com/Qiskit/mcp-servers
6
6
  Project-URL: Repository, https://github.com/Qiskit/mcp-servers
@@ -10,7 +10,7 @@ Author-email: "Quantum+AI Team. IBM Quantum" <Quantum.Plus.AI@ibm.com>
10
10
  License: Apache-2.0
11
11
  License-File: LICENSE
12
12
  Requires-Python: <3.15,>=3.10
13
- Requires-Dist: fastmcp>=2.8.1
13
+ Requires-Dist: fastmcp<3,>=2.8.1
14
14
  Requires-Dist: nest-asyncio>=1.5.0
15
15
  Requires-Dist: pydantic>=2.0.0
16
16
  Requires-Dist: python-dotenv>=1.0.0
@@ -39,6 +39,8 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  # Qiskit MCP Server
41
41
 
42
+ <!-- mcp-name: io.github.Qiskit/qiskit-mcp-server -->
43
+
42
44
  A Model Context Protocol (MCP) server that provides quantum circuit transpilation capabilities using Qiskit's pass managers. This server enables AI assistants to optimize quantum circuits for various hardware targets.
43
45
 
44
46
  ## Features
@@ -48,7 +50,7 @@ A Model Context Protocol (MCP) server that provides quantum circuit transpilatio
48
50
  - **Topology Support**: Built-in support for linear, ring, grid, and custom coupling maps
49
51
  - **Circuit Analysis**: Analyze circuit complexity without transpilation
50
52
  - **Optimization Comparison**: Compare results across all optimization levels
51
- - **Dual API**: Supports both async (MCP) and sync (DSPy, Jupyter, scripts) usage
53
+ - **Dual API**: Supports both async (MCP) and sync (Jupyter, scripts) usage
52
54
 
53
55
  ## Prerequisites
54
56
 
@@ -163,7 +165,7 @@ transpiled_qpy = result["transpiled_circuit"]["circuit_qpy"]
163
165
  result2 = await transpile_circuit(transpiled_qpy, circuit_format="qpy", optimization_level=3)
164
166
  ```
165
167
 
166
- ### Sync Usage (DSPy, Jupyter, Scripts)
168
+ ### Sync Usage (Scripts, Jupyter)
167
169
 
168
170
  ```python
169
171
  from qiskit_mcp_server.transpiler import transpile_circuit, analyze_circuit
@@ -190,6 +192,62 @@ for level in range(4):
190
192
  print(f"Level {level}: depth={result['depth']}, size={result['size']}")
191
193
  ```
192
194
 
195
+ **LangChain Integration Example:**
196
+
197
+ > **Note:** To run LangChain examples you will need to install the dependencies:
198
+ > ```bash
199
+ > pip install langchain langchain-mcp-adapters langchain-openai python-dotenv
200
+ > ```
201
+
202
+ ```python
203
+ import asyncio
204
+ import os
205
+ from langchain.agents import create_agent
206
+ from langchain_mcp_adapters.client import MultiServerMCPClient
207
+ from langchain_mcp_adapters.tools import load_mcp_tools
208
+ from langchain_openai import ChatOpenAI
209
+ from dotenv import load_dotenv
210
+
211
+ # Load environment variables (OPENAI_API_KEY, etc.)
212
+ load_dotenv()
213
+
214
+ # Sample Bell state circuit
215
+ SAMPLE_BELL = """
216
+ OPENQASM 3.0;
217
+ include "stdgates.inc";
218
+ qubit[2] q;
219
+ h q[0];
220
+ cx q[0], q[1];
221
+ """
222
+
223
+ async def main():
224
+ # Configure MCP client
225
+ mcp_client = MultiServerMCPClient({
226
+ "qiskit": {
227
+ "transport": "stdio",
228
+ "command": "qiskit-mcp-server",
229
+ "args": [],
230
+ "env": {},
231
+ }
232
+ })
233
+
234
+ # Use persistent session for efficient tool calls
235
+ async with mcp_client.session("qiskit") as session:
236
+ tools = await load_mcp_tools(session)
237
+
238
+ # Create agent with LLM
239
+ llm = ChatOpenAI(model="gpt-5.2", temperature=0)
240
+ agent = create_agent(llm, tools)
241
+
242
+ # Run a query
243
+ response = await agent.ainvoke(f"Transpile this circuit for IBM Heron: {SAMPLE_BELL}")
244
+ print(response)
245
+
246
+ asyncio.run(main())
247
+ ```
248
+
249
+ For more LLM providers (Anthropic, Google, Ollama, Watsonx) and detailed examples including Jupyter notebooks, see the [examples/](examples/) directory.
250
+
193
251
  ## API Reference
194
252
 
195
253
  ### Tools
@@ -4,8 +4,8 @@ qiskit_mcp_server/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  qiskit_mcp_server/server.py,sha256=4T2i-rf5r5S9ktmBSQJGfEWKJgw_qMM37JGar8XWoXc,8146
5
5
  qiskit_mcp_server/transpiler.py,sha256=QuZHZs9_c_NaE8bO74vfBbeGRr4Ek4BwM7GVnR4n33o,24381
6
6
  qiskit_mcp_server/utils.py,sha256=WV3RMd01Teb66O0N1moQBuY76HzYrRArZk_so9BlZmo,2876
7
- qiskit_mcp_server-0.1.0.dist-info/METADATA,sha256=wFwcu_VMCL-YwmOBy8iKV-hGXyZMJoh5HOAkcLyetL8,12624
8
- qiskit_mcp_server-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
9
- qiskit_mcp_server-0.1.0.dist-info/entry_points.txt,sha256=_Fyujd4uRKkEakqbCqwctaY6RdnqGU8Po-yNlnYY6qM,61
10
- qiskit_mcp_server-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
11
- qiskit_mcp_server-0.1.0.dist-info/RECORD,,
7
+ qiskit_mcp_server-0.1.1.dist-info/METADATA,sha256=ieAt_RYl7D7yO-GKBo1Ebi4xVIP9esFe6RW7YSRSTbA,14198
8
+ qiskit_mcp_server-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
9
+ qiskit_mcp_server-0.1.1.dist-info/entry_points.txt,sha256=_Fyujd4uRKkEakqbCqwctaY6RdnqGU8Po-yNlnYY6qM,61
10
+ qiskit_mcp_server-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
11
+ qiskit_mcp_server-0.1.1.dist-info/RECORD,,