Network API Overview
Base URL
Production: https://api.softquantus.com/api/v2/network
Sandbox: https://sandbox.softquantus.com/api/v2/network
Authentication
All requests require Bearer token:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.softquantus.com/api/v2/network/...
14 Network Endpoints
Execution
| Method | Endpoint | Description |
|---|---|---|
| POST | /execute | Execute on multiple backends |
| POST | /execute/batch | Batch circuit execution |
| GET | /execute/{job_id} | Get job status |
| DELETE | /execute/{job_id} | Cancel job |
Backends
| Method | Endpoint | Description |
|---|---|---|
| GET | /backends | List available backends |
| GET | /backends/{id} | Get backend details |
| GET | /backends/{id}/calibration | Get calibration data |
| GET | /backends/{id}/queue | Get queue status |
Network
| Method | Endpoint | Description |
|---|---|---|
| GET | /status | Network-wide status |
| GET | /metrics | Network metrics |
| GET | /topology | Network topology |
Aggregation
| Method | Endpoint | Description |
|---|---|---|
| POST | /aggregate | Aggregate results manually |
| GET | /aggregate/methods | List aggregation methods |
Cost
| Method | Endpoint | Description |
|---|---|---|
| POST | /estimate | Estimate execution cost |
Quick Examples
Execute with Load Balancing
curl -X POST https://api.softquantus.com/api/v2/network/execute \
-H "Authorization: Bearer $QCOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"qasm": "OPENQASM 2.0; ...",
"backends": ["ionq_simulator", "ibm_brisbane"],
"strategy": "fastest",
"shots": 1024
}'
Response:
{
"success": true,
"data": {
"job_id": "net_job_abc123",
"backend": "ionq_simulator",
"status": "completed",
"counts": {"00": 512, "11": 512},
"queue_time_s": 0.5,
"execution_time_s": 2.3
}
}
Execute on All Backends with Aggregation
curl -X POST https://api.softquantus.com/api/v2/network/execute \
-H "Authorization: Bearer $QCOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"qasm": "OPENQASM 2.0; ...",
"backends": ["ionq_simulator", "ibm_brisbane", "rigetti_aspen"],
"strategy": "all",
"shots": 1024,
"aggregate": true,
"aggregation_method": "weighted_average"
}'
Response:
{
"success": true,
"data": {
"job_id": "net_job_xyz789",
"status": "completed",
"results": [
{"backend": "ionq_simulator", "counts": {"00": 510, "11": 514}},
{"backend": "ibm_brisbane", "counts": {"00": 505, "11": 519}},
{"backend": "rigetti_aspen", "counts": {"00": 515, "11": 509}}
],
"aggregated_counts": {"00": 510, "11": 514},
"aggregation_confidence": 0.97
}
}
Get Network Status
curl https://api.softquantus.com/api/v2/network/status \
-H "Authorization: Bearer $QCOS_API_KEY"
Response:
{
"success": true,
"data": {
"overall_status": "operational",
"total_capacity": 289,
"active_jobs": 45,
"backends": [
{"id": "ionq_simulator", "status": "online", "queue_depth": 2},
{"id": "ibm_brisbane", "status": "online", "queue_depth": 15},
{"id": "rigetti_aspen", "status": "maintenance", "queue_depth": 0}
]
}
}
Load Balancing Strategies
| Strategy | Behavior |
|---|---|
fastest | Select backend with lowest queue time |
best_fidelity | Select backend with highest current fidelity |
round_robin | Distribute evenly across backends |
cost_optimized | Minimize execution cost |
ordered | Try backends in specified order |
all | Execute on all backends |
Aggregation Methods
| Method | Description |
|---|---|
weighted_average | Weight by fidelity estimate |
majority_vote | Most common result wins |
confidence_weighted | Weight by confidence metrics |
median | Statistical median of results |
Error Codes
| Code | HTTP | Description |
|---|---|---|
NO_BACKENDS | 503 | No backends available |
ALL_BACKENDS_FAILED | 503 | All backends failed |
AGGREGATION_FAILED | 500 | Results too divergent |
INVALID_STRATEGY | 400 | Unknown strategy |
BACKEND_NOT_FOUND | 404 | Backend ID not found |
QUOTA_EXCEEDED | 403 | Execution quota exceeded |
WebSocket Streaming
For real-time job updates:
const ws = new WebSocket('wss://api.softquantus.com/api/v2/network/stream');
ws.onopen = () => {
ws.send(JSON.stringify({
api_key: 'qcos_live_...',
subscribe: ['job_updates', 'backend_status']
}));
};
ws.onmessage = (event) => {
const update = JSON.parse(event.data);
console.log(`Job ${update.job_id}: ${update.status}`);
};
© 2024-2026 SoftQuantus Innovative OÜ