Get Circuit Metrics Evolution
curl --request GET \
--url 'https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?HAIQU_API_KEY='import requests
url = "https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?HAIQU_API_KEY="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?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}/metrics_evolution?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}/metrics_evolution?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}/metrics_evolution?HAIQU_API_KEY=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?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[
{
"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>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Get Circuit Metrics Evolution
Get the ordered analytics snapshots recorded for a circuit.
Use this tool to show how metrics such as depth, two-qubit gate count, and qubit count changed across successive transformations of a circuit, for example original to transpiled to compressed.
When to Use:
- Call this when the caller asks how a circuit improved or degraded through transpilation or compression.
- Call this after
compute_circuit_analyticswithanalytics_type='evolution'has recorded a snapshot.
Constraints:
- An empty list is a valid result and means no evolution snapshots have been recorded for this circuit yet.
- Snapshots are stored per circuit, so compare against the parent circuit ID rather than expecting cross-circuit history here.
Notes:
- For agent-facing output, report the first and last snapshot plus the delta on the metrics the caller cares about instead of every entry.
Args: circuit_id: Circuit identifier from a prior MCP response. user: Authenticated user resolved from the API key. db: Active database session.
Returns: Analytics snapshots in recorded order, oldest first.
Raises:
HTTPException: Raised with 404 when the circuit or its experiment is
not available to the caller.
GET
/
ai
/
circuit
/
{circuit_id}
/
metrics_evolution
Get Circuit Metrics Evolution
curl --request GET \
--url 'https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?HAIQU_API_KEY='import requests
url = "https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?HAIQU_API_KEY="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?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}/metrics_evolution?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}/metrics_evolution?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}/metrics_evolution?HAIQU_API_KEY=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/circuit/{circuit_id}/metrics_evolution?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[
{
"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>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
APIKeyQueryAPIKeyHeader
Path Parameters
Response
Successful Response
Number of qubits (must be >= 1)
Required range:
x >= 1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes