← Back to Home

API Quick Reference

Last Updated: October 31, 2025

Base URL

Production: https://api.qsurf.ai Local Dev: http://localhost:8080

Authentication

Quick Endpoints

Health Check

GET /api/v1/health

FTQC Standard Validation (7 metrics)

curl -X POST https://api.qsurf.ai/api/v1/ftqc_standard_validation \
  -F "syndromes_d3=@d3_detection_events.b8" \
  -F "syndromes_d5=@d5_detection_events.b8" \
  -F "syndromes_d7=@d7_detection_events.b8" \
  -F "platform=google_willow" \
  -F "rounds=10"

Hardware Quality

curl -X POST https://api.qsurf.ai/api/v1/hardware_quality \
  -F "file=@detection_events.b8" \
  -F "platform=google_willow" \
  -F "distance=7" \
  -F "rounds=50"

GA Validation (Test Account Only)

curl -X POST https://api.qsurf.ai/api/v1/ga_validation \
  -F "syndromes=@detection_events.b8" \
  -F "platform=google_willow" \
  -F "distance=7" \
  -F "rounds=50"

Hypothesis Discovery (Sprint 12 - Scientific Defensibility)

# Basic request (Free tier - edge detection + multi-criteria)
curl -X POST https://api.qsurf.ai/api/v1/analyze/discover-hypothesis \
  -H "Content-Type: application/json" \
  -d '{
    "data": [[1.2, 3.4, ...], ...],
    "enable_edge_detection": true,
    "enable_multi_criteria": true,
    "criteria": ["mdl", "bic", "aic"]
  }'

# Full validation (Premium tier - includes bootstrap stability)
curl -X POST https://api.qsurf.ai/api/v1/analyze/discover-hypothesis \
  -H "Content-Type: application/json" \
  -d '{
    "data": [[1.2, 3.4, ...], ...],
    "enable_edge_detection": true,
    "enable_multi_criteria": true,
    "criteria": ["mdl", "bic", "aic"],
    "enable_bootstrap": true,
    "bootstrap_samples": 20
  }'

# Health check
GET /api/v1/analyze/discover-hypothesis/health

Key Parameters: - enable_edge_detection (bool, default: true) - Condition number & rank checks (~2ms) - enable_multi_criteria (bool, default: false) - MDL/BIC/AIC consensus (~5ms) - criteria (list, default: ["mdl", "bic", "aic"]) - Which criteria to use - enable_bootstrap (bool, default: false, Premium only) - Stability validation (~500ms) - bootstrap_samples (int, default: 20) - Number of bootstrap iterations

Tier Restrictions: - Free: Edge detection + multi-criteria evaluation - Premium: All features including bootstrap stability testing

Response Fields: - suggestions[]: Ranked hypothesis candidates with scores - metadata.edge_detection: Numerical stability checks - metadata.multi_criteria: Criterion agreement analysis - metadata.bootstrap_stability: Resampling validation (Premium only)

List Platforms

GET /api/v1/platforms
GET /api/v1/platforms/google_willow

Single Validation (Legacy)

curl -X POST https://api.qsurf.ai/api/v1/validate \
  -F "file=@detection_events.b8" \
  -F "platform=google_willow" \
  -F "distance=3" \
  -F "rounds=10"

Response Codes

Key Metrics Explained

Pre-Decoder Observable Flip Ratio (ρ_obs)

R² Linearity

Gate Fidelity

Coherence Time

Readout Fidelity

Sprint 12: Scientific Defensibility Features

Layer 0: Data Quality Firewall (v1.2.1)

🎯 Why This Matters (ELI5):

Imagine trying to tune a guitar by only knowing if each string is "too high" or "too low" (binary data). You can't tell HOW MUCH to adjust - you need the actual pitch values (continuous data).

The Problem: Quantum error correction systems output two types of data:

What Layer 0 Does: Automatically detects when you accidentally send binary data to an analysis that needs continuous values. Instead of wasting 30+ minutes on doomed calculations, it blocks the request in 20ms with a helpful error message explaining what data to request from your hardware provider.

How to Use It:

  1. Just send your data - Layer 0 runs automatically
  2. If you get HTTP 422 (BLOCK): Read the error message - it tells you exactly what's wrong and what to request
  3. If you see WARN: Your data passed but has quality concerns - consider the warnings before trusting results
  4. If you see PASS: Data quality is good, proceed with confidence! ✅

📖 Detailed Example: Read the Layer 0 blog post for the complete story of how binary syndrome data was the hidden problem that IT Gate missed.


Technical Details:

Example error message (binary data detected):

{
  "error": "LAYER0_BLOCK",
  "blocked_reason": "Binary syndrome data detected (2 unique values)",
  "recommendation": "Request pre-threshold soft syndrome data from hardware provider",
  "educational_note": "Spectral mode analysis requires continuous detector values..."
}

Layer 1: Edge Case Detection

Layer 2: Multi-Criteria Evaluation

Layer 3: Bootstrap Stability (Premium Only)

Countering AI-Driven Overconfidence

Sprint 12 addresses the "Illusion of Competence" problem where researchers trust automated model selection without validation. Read more: https://storage.googleapis.com/getqore-validation-data/blog/scientific-defensibility-hypothesis-discovery.html

File Formats

B8 (Google Willow)

NumPy (.npy)

CSV

Common Parameters

Complete API Documentation

See: README.md in qcore_context/ or prod_v1/


Home | Blog | Contact Support