sample_tool
Submit a quantum sampling task using an OpenQASM 2.0 circuit and receive a task ID for result retrieval.
Instructions
Submit a sampling task. Provide the circuit as an OpenQASM 2.0 string
(OpenQASM 3 also works if the optional qiskit_qasm3_import is installed).
Returns a task_id; poll get_task_status_tool then get_task_result_tool. SAS-CPU simulator requires amplitude_index.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"qasm": "<qasm>",
"backend_name": "<backend_name>"
},
"name": "sample_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qasm | Yes | ||
| shots | No | ||
| transpile | No | ||
| backend_name | Yes | ||
| amplitude_index | No | ||
| optimization_level | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||