curl --request GET \
--url 'https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY='import requests
url = "https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"hash": "<string>",
"name": "<string>",
"creation_date": "2023-11-07T05:31:56Z",
"user_id": 123,
"experiment_id": "<string>",
"status": "Submitted",
"generated": true,
"context": "<string>",
"description": "",
"tags": "",
"parameters": {},
"analytics": {
"qubits": 2,
"depth": 123,
"depth_2q": 123,
"gates_1q": 123,
"gates_2q": 123,
"gates_total": 123,
"other_ops": 123,
"num_qubits_active": 123,
"num_parameters": 123,
"other_gates": 123,
"instructions_total": 123,
"operations_counts": {},
"gate_size_distribution": {},
"gate_diversity": {},
"gate_diversity_basis_gates": {},
"gate_count_distribution": {},
"program_communication": "N/A",
"critical_depth": "N/A",
"entanglement_ratio": "N/A",
"parallelism": "N/A",
"liveness_per_qubit": "N/A",
"liveness": "N/A",
"correlation_matrix": {},
"kl_divergence": "N/A",
"entanglement_capability": "N/A",
"expressibility": "N/A",
"quantum_fisher_information_matrix": "N/A",
"circuit_normalized": "<string>"
},
"transpilation_target": "<string>",
"transpilation_options": {},
"transpiled_circuit_ids": [
"<string>"
],
"compressed_circuit_ids": [
"<string>"
],
"job_ids": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Circuit By Id
Get one stored circuit by ID, including its analytics snapshot.
Use this tool when the caller already holds a circuit_id and needs that
circuit alone. Prefer this over list_circuits_in_experiment for a single
known circuit, since listing an experiment returns every circuit it holds.
When to Use:
- Call this to read the analytics of a circuit produced by
transpile_circuits,compress_circuit_with_state_compression, orload_classical_data_with_data_loading. - Call this to compare a derived circuit against its parent after
list_children_circuitsreturns child IDs.
Constraints:
analyticsreflects what has been computed so far and isnulluntil an analytics job has run for the circuit. Usecompute_circuit_analyticsto populate it.- The response carries stored metadata and analytics, not the QASM source.
Notes:
- For agent-facing output, surface
name,status, and the key analytics fields such as qubits, depth, and two-qubit gate counts. - Access is granted when the caller can access the parent experiment.
Args: circuit_id: Circuit identifier from a prior MCP response. user: Authenticated user resolved from the API key. db: Active database session.
Returns: The stored circuit object enriched with MCP context text.
Raises:
HTTPException: Raised with 404 when the circuit or its experiment is
not available to the caller.
curl --request GET \
--url 'https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY='import requests
url = "https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/circuit/{circuit_id}?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"hash": "<string>",
"name": "<string>",
"creation_date": "2023-11-07T05:31:56Z",
"user_id": 123,
"experiment_id": "<string>",
"status": "Submitted",
"generated": true,
"context": "<string>",
"description": "",
"tags": "",
"parameters": {},
"analytics": {
"qubits": 2,
"depth": 123,
"depth_2q": 123,
"gates_1q": 123,
"gates_2q": 123,
"gates_total": 123,
"other_ops": 123,
"num_qubits_active": 123,
"num_parameters": 123,
"other_gates": 123,
"instructions_total": 123,
"operations_counts": {},
"gate_size_distribution": {},
"gate_diversity": {},
"gate_diversity_basis_gates": {},
"gate_count_distribution": {},
"program_communication": "N/A",
"critical_depth": "N/A",
"entanglement_ratio": "N/A",
"parallelism": "N/A",
"liveness_per_qubit": "N/A",
"liveness": "N/A",
"correlation_matrix": {},
"kl_divergence": "N/A",
"entanglement_capability": "N/A",
"expressibility": "N/A",
"quantum_fisher_information_matrix": "N/A",
"circuit_normalized": "<string>"
},
"transpilation_target": "<string>",
"transpilation_options": {},
"transpiled_circuit_ids": [
"<string>"
],
"compressed_circuit_ids": [
"<string>"
],
"job_ids": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Successful Response
Extend a stored circuit model with MCP context text.
Attributes: context: ai summary describing the circuit role in the workflow.