curl --request POST \
--url 'https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY=' \
--header 'Content-Type: application/json' \
--data '
{
"dl_type": "DistributionLoading",
"num_qubits": 12,
"parameters": {
"num_layers": 3
}
}
'import requests
url = "https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY="
payload = {
"dl_type": "DistributionLoading",
"num_qubits": 12,
"parameters": { "num_layers": 3 }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({dl_type: 'DistributionLoading', num_qubits: 12, parameters: {num_layers: 3}})
};
fetch('https://api.example.com/ai/estimate_data_loading?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/estimate_data_loading?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dl_type' => 'DistributionLoading',
'num_qubits' => 12,
'parameters' => [
'num_layers' => 3
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY="
payload := strings.NewReader("{\n \"dl_type\": \"DistributionLoading\",\n \"num_qubits\": 12,\n \"parameters\": {\n \"num_layers\": 3\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY=")
.header("Content-Type", "application/json")
.body("{\n \"dl_type\": \"DistributionLoading\",\n \"num_qubits\": 12,\n \"parameters\": {\n \"num_layers\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"dl_type\": \"DistributionLoading\",\n \"num_qubits\": 12,\n \"parameters\": {\n \"num_layers\": 3\n }\n}"
response = http.request(request)
puts response.read_body{
"estimated_time": 123,
"estimated_cost": 123,
"context": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Estimate Data Loading
Estimate the time and cost of a data-loading job before submitting it.
Use this tool to size a data-loading run up front, for example to choose a qubit count or layer count that fits a time budget. It creates no job and spends no credits.
When to Use:
- Call this before
load_classical_data_with_data_loadingwhen the user asks how long loading will take or what it will cost. - Call this to compare qubit or layer counts before committing to one.
Constraints:
- Only
DistributionLoadingandVectorLoadinghave resource models. Other modes accepted byload_classical_data_with_data_loadingcannot be estimated and are rejected with422. - The estimate depends only on
num_qubitsandnum_layers; the actual data payload does not change it.
Notes:
- Report the estimate in seconds and credits, and state plainly that it is an estimate rather than a quote.
Args: user: Authenticated user resolved from the API key. data: Loading mode, qubit count, and mode parameters to estimate.
Returns: The estimated time and cost with an explanatory context string.
curl --request POST \
--url 'https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY=' \
--header 'Content-Type: application/json' \
--data '
{
"dl_type": "DistributionLoading",
"num_qubits": 12,
"parameters": {
"num_layers": 3
}
}
'import requests
url = "https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY="
payload = {
"dl_type": "DistributionLoading",
"num_qubits": 12,
"parameters": { "num_layers": 3 }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({dl_type: 'DistributionLoading', num_qubits: 12, parameters: {num_layers: 3}})
};
fetch('https://api.example.com/ai/estimate_data_loading?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/estimate_data_loading?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dl_type' => 'DistributionLoading',
'num_qubits' => 12,
'parameters' => [
'num_layers' => 3
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY="
payload := strings.NewReader("{\n \"dl_type\": \"DistributionLoading\",\n \"num_qubits\": 12,\n \"parameters\": {\n \"num_layers\": 3\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY=")
.header("Content-Type", "application/json")
.body("{\n \"dl_type\": \"DistributionLoading\",\n \"num_qubits\": 12,\n \"parameters\": {\n \"num_layers\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/estimate_data_loading?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"dl_type\": \"DistributionLoading\",\n \"num_qubits\": 12,\n \"parameters\": {\n \"num_layers\": 3\n }\n}"
response = http.request(request)
puts response.read_body{
"estimated_time": 123,
"estimated_cost": 123,
"context": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
Define payload for estimating a data-loading job.
Attributes:
dl_type: Data-loading mode. Only the two modes with resource models
implemented are accepted.
num_qubits: Target qubit count for the loaded state.
parameters: Mode-specific parameters; only num_layers affects the
estimate today.
Data loading mode to estimate. Only DistributionLoading and VectorLoading have resource models; the other modes accepted by load_classical_data_with_data_loading cannot be estimated yet.
DistributionLoading, VectorLoading Target qubit count for the loaded state.
x >= 1Mode-specific parameters. Only num_layers currently affects the estimate.
Response
Successful Response
Represent a pre-submission time and cost estimate.
Attributes: estimated_time: Estimated wall-clock computation time in seconds. estimated_cost: Estimated cost in Haiqu credits. context: Summary of what the estimate covers and how to act on it.