ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

MCP Qiskit

โดย daedalusรุ่น 0.1.1i★ 0iรันบนเครื่อง
ชื่อใน registryio.github.daedalus/mcp-qiskit

วิธีติดตั้ง

ใช้ทำอะไรได้

ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ

  • ต่อแบบ ติดตั้งในเครื่อง
  • บัญชีหรือคีย์ ไม่ต้องใส่คีย์
  • หมวด อื่น ๆ
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
MCP server exposing Qiskit 2.3.1 quantum computing functionality

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ผลตรวจผ่าน 2/3 · ทำงานบนเครื่องคุณ · ✓ ตรวจคำสั่งแล้ว 13 พ.ย. 2569

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. เปิดไฟล์ตั้งค่าของแอป Claude บนคอม

    SettingsDeveloperEdit Config

  3. วางค่าตั้งนี้แล้วบันทึกไฟล์

    {
      "mcpServers": {
        "qiskit": {
          "command": "uvx",
          "args": [
            "mcp-qiskit"
          ]
        }
      }
    }
  4. ปิดแอป Claude แล้วเปิดใหม่

  5. ลองเลย

    ใช้ MCP Qiskit บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ MCP Qiskit หรือมีชื่อเครื่องมือของ MCP Qiskit ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ChatGPT ยังต่อ MCP Qiskit ไม่ได้

MCP Qiskit ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ

คุณทำแบบนี้แทนได้

ก · ใช้แอปที่ต่อ MCP Qiskit ได้

  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

ข · ตัวอื่นในหมวด อื่น ๆ ที่ต่อกับ ChatGPT ได้

เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์

ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  3. วางคำสั่งนี้แล้วกด Enter

    claude mcp add --scope user qiskit -- uvx mcp-qiskit
  4. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น MCP Qiskit ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  5. ลองเลย

    ใช้ MCP Qiskit บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ MCP Qiskit หรือมีชื่อเครื่องมือของ MCP Qiskit ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. กดปุ่มนี้เพื่อเปิด Cursor

    เปิดใน Cursor

    Cursor จะถามยืนยันการติดตั้ง ให้กด Install

  3. เปิดแชตของ AI ใน Cursor โหมด Agent

  4. ลองเลย

    ใช้ MCP Qiskit บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ MCP Qiskit หรือมีชื่อเครื่องมือของ MCP Qiskit ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. กดปุ่มนี้เพื่อเปิด VS Code

    เปิดใน VS Code

    VS Code จะถามยืนยันการติดตั้ง ให้กด Install

  3. เปิดแชตของ AI ใน VS Code โหมด Agent

  4. ลองเลย

    ใช้ MCP Qiskit บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ MCP Qiskit หรือมีชื่อเครื่องมือของ MCP Qiskit ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ MCP Qiskit อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ติดตั้งในเครื่อง

Claude Code

claude mcp add --scope user qiskit -- uvx mcp-qiskit

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "qiskit": {
      "command": "uvx",
      "args": [
        "mcp-qiskit"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "qiskit": {
      "command": "uvx",
      "args": [
        "mcp-qiskit"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "qiskit": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-qiskit"
      ]
    }
  }
}

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
24/สัปดาห์
การเชื่อมต่อ
รันบนเครื่อง
รุ่นล่าสุดi
0.1.1
หมวดi
อื่น ๆ
ส่งเข้า registryi
6 เม.ย. 2569
แก้โค้ดล่าสุดi
3 พ.ค. 2569
ผู้ทำ
daedalus
แพ็กเกจ
pypi: mcp-qiskit
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 13 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub daedalus ซึ่งเป็นเจ้าของ repo

  • ! ควรระวัง

    ยังมีคนดูแล

    แก้โค้ดล่าสุด 6 เดือนที่ผ่านมา นานกว่า 6 เดือน

  • ✓ ผ่าน

    มีสัญญาอนุญาต (license)

    ใช้ MIT

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบด้วย Google เพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด อื่น ๆi

  • ดาวมากกว่า 0% ของอีก 19661 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 4% ของอีก 19661 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 44% ของอีก 19661 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

MCP Qiskit ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 2 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 6 เดือนที่ผ่านมา และส่งรุ่นล่าสุด (0.1.1) เข้า registry 7 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี World Monitor, Claude Flow, Windmill

ตัวอื่นในหมวดเดียวกัน

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

World Monitor

ข่าวกรองโลกแบบเรียลไทม์: ความขัดแย้ง ตลาด พลังงาน การค้า การขนส่ง และไซเบอร์

โดย koala73ใช้กันมาก★ 90.6Kอัปเดต วันนี้

รันบนคลาวด์✓ เจ้าของบริการ · worldmonitor.app

Claude Flow

AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev.

โดย ruvnetใช้กันมาก↓ 13.5K/สัปดาห์★ 81.6Kอัปเดต 14 เดือนที่ผ่านมา

รันบนเครื่อง

Windmill

Run Windmill scripts and flows and manage jobs, schedules, resources and variables.

โดย windmill-labsใช้กันมาก★ 18.6Kอัปเดต เมื่อวาน

รันบนคลาวด์

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

mcp-qiskit

MCP server exposing Qiskit 2.3.1 quantum computing functionality through the Model Context Protocol. Enables LLMs to create, manipulate, and execute quantum circuits via standardized MCP tools and resources.

mcp-name: io.github.daedalus/mcp-qiskit

Overview

This project provides a Model Context Protocol (MCP) server that exposes Qiskit quantum computing functionality to Large Language Models (LLMs). It allows AI assistants to:

  • Create and manipulate quantum circuits
  • Execute circuits on quantum simulators or real backends
  • Analyze circuit properties (depth, gates, operations)
  • Visualize circuits in various formats
  • Manage quantum backends
Why Use This?
  • LLM Integration: Enables AI assistants to perform quantum computing tasks without external tooling
  • Standardized Interface: MCP provides a consistent tool-based interface for quantum operations
  • Qiskit 2.3.1 Compatible: Specifically designed for Qiskit 2.3.1 with all its features
  • Extensible: Easy to add new tools or backends

Installation

Prerequisites
  • Python 3.11 or higher
  • Qiskit 2.3.1
  • A running MCP client (Claude Desktop, Cursor, etc.)
Install from PyPI
pip install mcp-qiskit[qiskit]

The [qiskit] extra installs the required Qiskit dependencies. Other extras available:

# Install with development dependencies

pip install mcp-qiskit[dev,test]

Install with MCP server dependencies

pip install mcp-qiskit[mcp]

Install from Source
git clone https://github.com/daedalus/mcp-qiskit.git

cd mcp-qiskit pip install -e ".[all]"

Quick Start

As a Python Library
from mcp_qiskit import create_quantum_circuit, add_gate, add_gates, add_measurement, run_circuit

Create a 2-qubit circuit with 2 classical bits

circuit = create_quantum_circuit(2, 2)

Apply a Hadamard gate on qubit 0

circuit = add_gate(circuit, "h", [0])

Apply CNOT gate (control: qubit 0, target: qubit 1)

circuit = add_gate(circuit, "cx", [0, 1])

Or add multiple gates at once with add_gates

circuit = add_gates(circuit, [ {"gate": "h", "qubits": [0]}, {"gate": "cx", "qubits": [0, 1]}, ])

Measure all qubits

circuit = add_measurement(circuit, [0, 1])

Execute on Aer simulator

result = run_circuit(circuit, "aer_simulator", shots=1024) print(f"Measurement results: {result['counts']}")

As an MCP Server
Claude Desktop

Add to your claude_desktop_config.json:

{

"mcpServers": { "mcp-qiskit": { "command": "mcp-qiskit", "env": {} } } }

Cursor

Add to your Cursor settings under MCP Servers:

{

"mcpServers": { "mcp-qiskit": { "command": "mcp-qiskit", "args": [] } } }

Other MCP Clients
# Run as stdio server

mcp-qiskit

Or use the Python module directly

python -m mcp_qiskit

MCP Tools Reference

Circuit Creation Tools
create_quantum_circuit_tool

Creates an empty quantum circuit with specified number of qubits and classical bits.

Parameters:

  • num_qubits (int): Number of quantum bits
  • num_classical_bits (int): Number of classical bits for measurements

Returns: Dictionary representing the circuit

Example:

circuit = create_quantum_circuit_tool(num_qubits=3, num_classical_bits=3)

Returns: {"num_qubits": 3, "num_clbits": 3, "operations": [], "name": "circuit"}

add_gate_tool

Adds a quantum gate to a circuit. This tool maintains circuit state between calls.

Parameters:

  • circuit (dict, optional): The circuit to modify. If None, creates a new 8-qubit circuit with 8 classical bits automatically.
  • gate_name (str): Name of the gate (e.g., "h", "x", "cx", "rx")
  • qubits (list[int]): List of qubit indices to apply the gate to. Can be a single qubit (e.g., [0]) or multiple qubits (e.g., [0, 1, 2, 3]). When multiple qubits are specified for a single-qubit gate, the gate is applied to each qubit.
  • params (list[float], optional): Parameters for parameterized gates

Supported Gates:

  • Single-qubit: h, x, y, z, s, t, sdg, tdg, i, id
  • Parameterized: rx, ry, rz, u1, u2, u3, p
  • Multi-qubit: cx, cy, cz, swap
  • Multi-controlled: mcx, mct, mcp, ccx, toffoli, c3x, c3sx, c4x
  • Specialized: rxx, ryy, rzz, ch, cswap, cu, crx, cry, crz

State Maintenance Pattern: Always pass the circuit returned by the previous call to maintain state:

# Option 1: Pass circuit explicitly

circuit = add_gate_tool(circuit=None, gate_name="h", qubits=[0]) # Creates new circuit circuit = add_gate_tool(circuit=circuit, gate_name="x", qubits=[1]) # Appends

Option 2: Use returned circuit

circuit = add_gate_tool(None, "h", [0]) circuit = add_gate_tool(circuit, "cx", [0, 1]) circuit = add_gate_tool(circuit, "rx", [0], [0.5])

Apply Single-Quantum Gate to Multiple Qubits: When applying single-qubit gates (like h, x, y, z, etc.) to multiple qubits at once, use a list of qubit indices:

# Apply H gate to qubits 0, 1, 2, 3 simultaneously

circuit = add_gate_tool(circuit, "h", [0, 1, 2, 3])

Apply X gate to qubits 4, 5, 6, 7 simultaneously

circuit = add_gate_tool(circuit, "x", [4, 5, 6, 7])

add_gates_tool

Adds multiple quantum gates to a circuit in a single call. This tool maintains circuit state between calls and reduces the number of tool calls needed.

Parameters:

  • circuit (dict, optional): The circuit to modify. If None, creates a new 8-qubit circuit with 8 classical bits automatically.
  • gates (list[dict]): List of gate specifications, each containing:
  • gate (str): Name of the gate (e.g., "h", "x", "cx", "rx")
  • qubits (list[int]): Qubit indices to apply the gate to
  • params (list[float], optional): Parameters for parameterized gates

Example:

# Add multiple gates in one call (reduces tool calls)

gates = [ {"gate": "h", "qubits": [0]}, {"gate": "cx", "qubits": [0, 1]}, {"gate": "x", "qubits": [2]}, ] circuit = add_gates_tool(circuit=None, gates=gates)

Can be chained to maintain state

circuit = add_gates_tool(None, [{"gate": "h", "qubits": [0, 1]}]) circuit = add_gates_tool(circuit, [{"gate": "rz", "qubits": [0], "params": [0.5]}])

add_measurement_tool

Adds measurement operations to qubits. This tool maintains circuit state between calls.

Parameters:

  • circuit (dict, optional): The circuit to modify. If None, creates a new 8-qubit circuit with 8 classical bits automatically.
  • qubits (list[int]): Qubit indices to measure
  • clbits (list[int], optional): Classical bit indices to store results

Example:

# Maintain state between calls

circuit = add_measurement_tool(circuit=None, qubits=[0, 1]) # Creates new circuit circuit = add_measurement_tool(circuit=circuit, qubits=[2]) # Appends measurement

Or use returned circuit

circuit = add_measurement_tool(None, [0, 1]) # Measure q0->c0, q1->c1 circuit = add_measurement_tool(circuit, [0, 1], [1, 0]) # Measure q0->c1, q1->c0

Analysis Tools
get_circuit_depth_tool

Returns the depth (number of layers) of the circuit.

Parameters:

  • circuit (dict): The circuit to analyze

Returns: Integer representing circuit depth

list_available_gates_tool

Lists all available quantum gates in Qiskit.

Returns: List of gate name strings

get_gate_definition_tool

Gets detailed information about a quantum gate.

Parameters:

  • gate_name (str): Name of the gate

Returns: Dictionary with gate properties:

  • name: Gate name
  • num_qubits: Number of qubits the gate operates on
  • num_parameters: Number of parameters (0 for fixed gates)
  • params: List of parameter values
Visualization Tools
draw_circuit_tool

Renders a circuit in various formats.

Parameters:

  • circuit (dict): The circuit to draw
  • output_format (str): Output format - "ascii", "text", "mpl", "latex"

Returns: String representation of the circuit

Example Output (ASCII):

     ┌───┐

q_0: ┤ H ├──■── └───┘┌─┴─┐ q_1: ────┤ X ├ └───┘ c: 2/═══════╪═══ 0 1

Backend Tools
list_backends_tool

Lists available quantum backends.

Parameters:

  • filters (dict, optional): Filter criteria (e.g., {"status": "ONLINE"})

Returns: List of backend information dictionaries

get_backend_status_tool

Gets status information for a backend.

Parameters:

  • backend_name (str): Name of the backend

Returns: Dictionary with:

  • name: Backend name
  • status: Status (ONLINE/OFFLINE)
  • num_qubits: Number of qubits
get_backend_configuration_tool

Gets detailed configuration for a backend.

Parameters:

  • backend_name (str): Name of the backend

Returns: Dictionary with:

  • name: Backend name
  • num_qubits: Number of qubits
  • coupling_map: Qubit connectivity (if applicable)
  • basis_gates: List of available basis gates
  • max_shots: Maximum allowed shots
Execution Tools
run_circuit_tool

Executes a single quantum circuit.

Parameters:

  • circuit (dict): Circuit to execute
  • backend_name (str, optional): Backend name (default: "aer_simulator")
  • shots (int, optional): Number of measurement shots (default: 1024)
  • seed (int, optional): Random seed for reproducibility

Returns: Dictionary with:

  • status: "COMPLETED" or error message
  • backend: Backend used
  • shots: Number of shots
  • counts: Measurement outcome counts (if shots > 0)
  • statevector: Statevector (if shots=None)
  • time_taken: Execution time in seconds

Example:

result = run_circuit_tool(circuit, "aer_simulator", shots=1000, seed=42)

Returns: {"status": "COMPLETED", "counts": {"00": 512, "11": 488}, ...}

run_circuits_tool

Executes multiple circuits in a batch.

Parameters:

  • circuits (list[dict]): List of circuits to execute
  • backend_name (str, optional): Backend name
  • shots (int, optional): Number of shots
  • seed (int, optional): Random seed

Returns: List of result dictionaries

Example:

circuits = [circuit1, circuit2, circuit3]

results = run_circuits_tool(circuits, shots=100)

Returns list of 3 result dictionaries

transpile_circuit_tool

Transpiles a circuit for optimization or specific backend.

Parameters:

  • circuit (dict): Circuit to transpile
  • optimization_level (int, optional): 0-3 (default: 1)
  • basis_gates (list[str], optional): Target basis gates

Returns: Transpiled circuit dictionary

Example:

transpiled = transpile_circuit_tool(circuit, optimization_level=2)

MCP Resources

resource://backends

Provides a list of available quantum backends. Updated dynamically based on available providers.

resource://gates

Provides a list of all available quantum gates in Qiskit.

Usage Examples

Create a Bell State
# Create 2-qubit circuit

circuit = create_quantum_circuit(2, 2)

Create Bell state: |Φ+⟩ = (|00⟩ + |11⟩) / √2

circuit = add_gate(circuit, "h", [0]) circuit = add_gate(circuit, "cx", [0, 1]) circuit = add_measurement(circuit, [0, 1])

Execute

result = run_circuit(circuit, "aer_simulator", shots=1000) print(result["counts"]) # Approximately {"00": 500, "11": 500}

Run Grover'

ตัดมาแค่ช่วงต้น อ่านต่อใน repo