{"name":"Quantum Expectation Tool","modelVersion":"2.5.0","description":"Given a 2-qubit gate error rate p, qubit count n, and circuit depth d, returns formulas, assumptions, current SOTA hardware, and the historic improvement trend so an agent can derive realistic expectations for whether (and when) the circuit can run on quantum hardware.","endpoints":{"POST /api/expectation":"Compute one scenario. Send the input as JSON in the body.","GET /api/expectation":"Returns this schema document.","GET /api/expectation?qubitErrorRate=...&numQubits=...&compDepth=...":"Compute one scenario via query parameters. Returns the same JSON as POST. Cacheable."},"input":{"qubitErrorRate":{"type":"number","required":"iff hardwareId is not supplied","bounds":{"exclusiveMin":0,"max":0.1},"description":"Per-gate 2-qubit depolarizing error rate (p). Supply exactly one of qubitErrorRate or hardwareId."},"hardwareId":{"type":"string","required":"iff qubitErrorRate is not supplied","enum":["trapped-ion","superconducting","neutral-atom"],"description":"Alias for qubitErrorRate: resolves to the 2-qubit error rate of the given SOTA hardware entry from the Current Quantum Computers table. Supply exactly one of qubitErrorRate or hardwareId. When supplied, the response's result block also includes minimumClockRuntimeSeconds — a lower bound on wall-clock runtime derived from that platform's gate-cycle timings."},"numQubits":{"type":"integer","required":true,"bounds":{"min":1,"max":1000000},"description":"Number of qubits (n)."},"compDepth":{"type":"integer","required":true,"bounds":{"min":1,"max":10000000000000},"description":"Circuit depth (d) — number of sequential 2-qubit gate layers."},"verbose":{"type":"boolean","required":false,"default":true,"description":"When false, the response is limited to modelVersion, scenario, and result. The hardwareContext, formulas, assumptions, caveats, glossary, examples, and exampleProblems blocks are omitted. Use for parameter sweeps where that context would repeat unchanged."},"useErrorCorrection":{"type":"boolean","required":false,"default":false,"description":"When true, apply error correction with the code specified by errorCorrectionCode (default: surface code)."},"distanceSurfaceCode":{"type":"integer","required":"iff useErrorCorrection is true and errorCorrectionCode is \"surface\"","bounds":{"min":3,"max":31,"oddOnly":true},"description":"Surface code distance (odd integer). Required for the surface code; ignored for BB codes."},"errorCorrectionCode":{"type":"string","required":false,"default":"surface","description":"Error correction code to use. \"surface\" for the surface code (default), or a qLDPC code ID from the catalog below.","enum":["surface","bb-144-12-12"],"qldpcCodeCatalog":[{"id":"bb-144-12-12","label":"[[144, 12, 12]]","family":"Bivariate Bicycle","n":144,"k":12,"d":12,"threshold":0.0058,"prefactor":0.0076,"logicalErrorExponent":6,"source":"https://doi.org/10.1038/s41586-024-07107-7","nickname":"Gross code"}]}},"outputTopLevelKeys":{"modelVersion":"String identifier of the noise model. Bumped when the model itself changes.","scenario":"Echo of the validated input.","result":"Computed numbers: effectiveErrorRate, successProbability, and (if EC) logicalErrorRatePerGate, physicalQubitsPerLogicalQubit, totalPhysicalQubits. When hardwareId was supplied on input, also includes minimumClockRuntimeSeconds — a lower bound on wall-clock runtime derived from compDepth and that platform's gate-cycle timings (see formulas.minimumClockRuntime for assumptions).","formulas":"Every formula used, with variable definitions and the named constants the math actually executed (no drift).","assumptions":"Plain-English list of what the model assumes (e.g. depolarizing noise, no leakage).","caveats":"Plain-English list of what the agent should communicate to the user when results are borderline.","methodology":"Rationale behind four choices agents commonly question: hardwareSelection (why so few current-hardware entries — universal gate-set, one per hardware type, record-holder), noiseModel (why depolarizing — hardware-agnostic, standard QEC basis), vendorBenchmarks (why an independent first-principles model rather than QV/CLOPS — enables extrapolation), and qldpcCodeSelection (why so few qLDPC codes in the catalog — published threshold, logical universal gate set, and known P_L suppression fit).","glossary":"Short definitions of the terms used in formulas, assumptions, and caveats.","examples":"A worked example (request + expectedResult) so an agent can sanity-check its parsing on the first call.","hardwareContext":"Current SOTA quantum computers (each entry joined with its gate-cycle timings and a pre-computed Quantum Volume Rate) + latest record points + full historic improvement series (with source URLs) + hardwareTimings: a per-platform table of 2Q gate time and readout time in SI seconds so an agent can reason about cycle speed and extrapolate trends.","exampleProblems":"Curated list of quantum algorithms with known resource estimates (qubits, gate count, source paper). Useful for comparing what algorithms need vs. what hardware can deliver."},"outputCoreKeys":["modelVersion","scenario","result"],"workedExample":{"description":"Trivial sanity check: 10 qubits, depth 10, p=1e-3, no error correction. Use this to verify your parsing of the response shape.","request":{"qubitErrorRate":0.001,"numQubits":10,"compDepth":10,"useErrorCorrection":false},"expectedResult":{"effectiveErrorRate":0.0643264488016432,"successProbability":0.9356735511983568,"logicalErrorRatePerGate":null,"physicalQubitsPerLogicalQubit":null,"totalPhysicalQubits":null}},"reservedQueryParams":{"include":"Reserved for future response slimming (e.g. ?include=core to omit historic series). Currently a no-op."},"discoverability":"/agent.txt — site-wide brief for AI agents.","forwardCompat":{"contract":"additive-only — top-level keys listed above are stable; new keys may be added without notice.","cors":"Access-Control-Allow-Origin: * on both GET and POST so user-built dashboards on arbitrary origins can call the endpoint without a proxy.","caching":"GET responses include Cache-Control and a content-hash ETag. Identical scenario URLs are served from the CDN edge."}}