batch_estimate_tool
Execute batch expectation estimation with a single observable to compare multiple quantum circuits against the same metric using the QPanda3 Runtime MCP Server.
Instructions
Execute batch expectation estimation with a single observable.
Submit multiple quantum circuits for expectation value estimation with a single observable. This is the "n circuits + 1 observable" pattern, useful for comparing different circuit strategies against the same metric.
Args: circuits: List of quantum circuits in QProg/QCircuit/OriginIR format. Note: Circuits should NOT contain measurement operations. observable: Observable to measure for all circuits. Supports: - Dict format: {"Z0 Z1": 0.5, "X0": -0.3} device_id: Target device ID (e.g., '20').
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 - message: Status message
Example: result = batch_estimate_tool( circuits=[ "QINIT 2\nCREG 2\nH q[0]\nCNOT q[0],q[1]", "QINIT 2\nCREG 2\nX q[0]\nCNOT q[0],q[1]" ], observable={"Z0 Z1": 1.0}, device_id="20" )
Note: Use get_task_status_tool and get_task_results_tool to check progress and retrieve results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| circuits | Yes | ||
| observable | Yes | ||
| device_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||