Skip to main content
Glama
OriginQ

QPanda3 Runtime MCP Server

by OriginQ

batch_sample_tool

Submit multiple quantum circuits for sampling in a single batch to improve efficiency compared to individual submissions.

Instructions

Execute batch quantum circuit sampling task.

Submit multiple quantum circuits for sampling in a single batch. This is more efficient than submitting circuits one by one.

Args: circuits: List of quantum circuits in QProg/QCircuit/OriginIR format. device_id: Target device ID (e.g., '20'). shots: Number of sampling shots per circuit (default: 1000). measure_qubits: Qubit indices to measure (optional). If not specified, uses measurement operations in the circuits.

Returns: Dictionary containing: - status: "success" or "error" - task_id: ID for tracking the task - device_id: Target device - num_circuits: Number of circuits in the batch - shots: Number of shots per circuit - message: Status message

Example: result = batch_sample_tool( circuits=[ "QINIT 2\nCREG 2\nH q[0]\nCNOT q[0],q[1]\nMEASURE q[0],c[0]\nMEASURE q[1],c[1]", "QINIT 2\nCREG 2\nX q[0]\nCNOT q[0],q[1]\nMEASURE q[0],c[0]\nMEASURE q[1],c[1]" ], device_id="20", shots=1000 )

Note: Use get_task_status_tool and get_task_results_tool to check progress and retrieve results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
circuitsYes
device_idYes
shotsNo
measure_qubitsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It effectively discloses key behavioral traits: it's an execution tool (implies mutation/write), returns a task ID for tracking, requires follow-up tools for results, and mentions efficiency benefits. It doesn't cover rate limits, authentication needs, or error handling details, but provides substantial operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It starts with the core purpose, explains efficiency benefit, details parameters with clear formatting, specifies return values, provides a practical example, and adds important usage notes. Every section adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (batch execution with 4 parameters), no annotations, and an output schema present, the description is remarkably complete. It covers purpose, parameters, returns, example usage, and integration with sibling tools. The output schema handles return structure, so the description appropriately focuses on operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining all 4 parameters in detail. It clarifies formats (QProg/QCircuit/OriginIR), provides examples, explains defaults (shots: 1000), optional vs. required parameters, and the behavior when 'measure_qubits' is unspecified. The example further illustrates parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Execute batch quantum circuit sampling task. Submit multiple quantum circuits for sampling in a single batch.' It specifies the verb ('execute batch sampling'), resource ('quantum circuits'), and distinguishes it from the sibling 'sample_tool' by emphasizing batch efficiency over individual submissions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: for efficiency when submitting multiple circuits. It explicitly mentions alternatives ('get_task_status_tool and get_task_results_tool') for progress checking and result retrieval. However, it doesn't explicitly state when NOT to use it (e.g., for single circuits) or compare it directly to 'sample_tool'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OriginQ/qpanda3-runtime-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server