estimate_tool
Compute quantum expectation values by submitting circuits and observables to estimate ⟨ψ|O|ψ⟩ for quantum state analysis on quantum processing units.
Instructions
Execute expectation estimation task.
Submit a quantum circuit for expectation value estimation. This computes the expectation value ⟨ψ|O|ψ⟩ where |ψ⟩ is the quantum state produced by the circuit and O is the observable.
Args: circuit: Quantum circuit(s) to execute. Accepts: - Single circuit as string (QProg/QCircuit/OriginIR format) - List of circuits for batch execution - Note: Circuit should NOT contain measurement operations observable: Observable to measure. Accepts: - Dict format: {"Z0 Z1": 0.5, "X0": -0.3} - Pauli operator string: "IIXY" 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 - message: Status message - note: Instructions for retrieving results
Example: # Estimate expectation value of Z0*Z1 result = estimate_tool( circuit="QINIT 2\nCREG 2\nH q[0]\nCNOT q[0],q[1]", observable="Z0 Z1", device_id="20" )
Note: Use get_task_status_tool to check progress and get_task_results_tool to retrieve results after the task completes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| circuit | Yes | ||
| observable | Yes | ||
| device_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||