Skip to main content
Glama

Quantum Expectations

Compute Quantum Expectation

compute_expectation
Read-onlyIdempotent

Given a quantum circuit (2-qubit error rate p, qubit count n, depth d, optional connectivity class), compute the effective error rate, success probability, and optional surface-code or qLDPC overhead. Without error correction a 2d-lattice connectivity is charged as a routing multiplier on depth (result.routingOverheadFactor); hardwareId supplies the device's class automatically. The response is self-describing (formulas, assumptions, caveats, glossary, SOTA hardware, historic series with source URLs) so an agent can reason from one call. For the inverse ("what hardware do I need?") use compute_required_error_rate; to rank multiple platforms in one call use compare_hardware_scenarios.

Input Schema

NameRequiredDescriptionDefault
verboseNoWhen false, omits hardwareContext, formulas, assumptions, caveats, glossary, examples, and exampleProblems from the response — leaving only modelVersion, scenario, and result. Use for parameter sweeps where that context would repeat unchanged.
compDepthYes
numQubitsYes
hardwareIdNoAlias for qubitErrorRate: resolves to the 2-qubit error rate of the given SOTA hardware entry from list_current_quantum_computers. Use this, not a generic qubitErrorRate, whenever the question names a platform without stating its own error rate (superconducting, trapped-ion, neutral-atom). Supply exactly one of qubitErrorRate or hardwareId.
connectivityNoTwo-qubit connectivity of the device: "all-to-all" (ion transport), "reconfigurable" (atom shuttling, treated as all-to-all) or "2d-lattice" (fixed nearest-neighbour couplers, charged as a routing multiplier on depth in the no-EC path). Defaults to the hardware entry's class when hardwareId is supplied, else to all-to-all.
qubitErrorRateNoPer-gate 2-qubit error rate p, in (0, 0.1]. Supply exactly one of qubitErrorRate or hardwareId.
useErrorCorrectionNo
distanceSurfaceCodeNoSurface code distance: odd integer in [3, 31]. Required when useErrorCorrection=true and the surface code is selected; ignored when a qLDPC code is selected.
errorCorrectionCodeNoEither "surface" (default when useErrorCorrection=true) or a qLDPC code id from list_qldpc_codes. "surface-code" is accepted as an alias for "surface".

Output Schema

NameRequiredDescriptionDefault
resultYes
caveatsNo
examplesNo
formulasNoVerbose only: formula specs keyed by name.
glossaryNo
scenarioYes
assumptionsNo
methodologyNo
modelVersionYesNoise-model version; bumps when a formula or constant changes.
exampleProblemsNo
hardwareContextNoVerbose only: current hardware, record series, timings, measured QUOPS scores.
exampleProblemProvenanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / hardwareId / description
      Previous value: -"Alias for qubitErrorRate: resolves to the 2-qubit error rate of the given SOTA hardware entry from list_current_quantum_computers. Supply exactly one of qubitErrorRate or hardwareId."New value: +"Alias for qubitErrorRate: resolves to the 2-qubit error rate of the given SOTA hardware entry from list_current_quantum_computers. Use this, not a generic qubitErrorRate, whenever the question names a platform without stating its own error rate (superconducting, trapped-ion, neutral-atom). Supply exactly one of qubitErrorRate or hardwareId."
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "assumptions": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "caveats": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "exampleProblemProvenance": {},
      +    "exampleProblems": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "examples": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "formulas": {
      +      "additionalProperties": {},
      +      "description": "Verbose only: formula specs keyed by name.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "glossary": {},
      +    "hardwareContext": {
      +      "additionalProperties": {},
      +      "description": "Verbose only: current hardware, record series, timings, measured QUOPS scores.",
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "methodology": {},
      +    "modelVersion": {
      +      "description": "Noise-model version; bumps when a formula or constant changes.",
      +      "type": "string"
      +    },
      +    "result": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "effectiveErrorRate": {
      +          "description": "Probability that at least one gate fails over the (routed) circuit.",
      +          "type": "number"
      +        },
      +        "logicalErrorRatePerCycle": {
      +          "description": "Per-syndrome-cycle logical error rate as the calibration source reports it; null without error correction.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "logicalErrorRatePerGate": {
      +          "description": "Per-logical-qubit, per-logical-operation error rate; null without error correction.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "minimumClockRuntimeSeconds": {
      +          "description": "Lower bound on wall-clock runtime; present only when hardwareId was supplied.",
      +          "type": "number"
      +        },
      +        "physicalQubitsPerLogicalQubit": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "routedDepth": {
      +          "description": "compDepth after routing: the depth the effective-error formula consumed.",
      +          "type": "number"
      +        },
      +        "routingOverheadFactor": {
      +          "description": "Multiplier the connectivity class applied to compDepth (1 for all-to-all and reconfigurable).",
      +          "type": "number"
      +        },
      +        "successProbability": {
      +          "description": "1 - effectiveErrorRate.",
      +          "type": "number"
      +        },
      +        "totalPhysicalQubits": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "effectiveErrorRate",
      +        "successProbability",
      +        "routingOverheadFactor",
      +        "routedDepth",
      +        "logicalErrorRatePerGate",
      +        "logicalErrorRatePerCycle",
      +        "physicalQubitsPerLogicalQubit",
      +        "totalPhysicalQubits"
      +      ],
      +      "type": "object"
      +    },
      +    "scenario": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "compDepth": {
      +          "type": "number"
      +        },
      +        "connectivity": {
      +          "enum": [
      +            "all-to-all",
      +            "reconfigurable",
      +            "2d-lattice"
      +          ],
      +          "type": "string"
      +        },
      +        "distanceSurfaceCode": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "errorCorrectionCode": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "hardwareId": {
      +          "description": "Non-null when qubitErrorRate was resolved from a current-hardware entry.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "numQubits": {
      +          "type": "number"
      +        },
      +        "qubitErrorRate": {
      +          "type": "number"
      +        },
      +        "useErrorCorrection": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "qubitErrorRate",
      +        "hardwareId",
      +        "connectivity",
      +        "numQubits",
      +        "compDepth",
      +        "useErrorCorrection",
      +        "distanceSurfaceCode",
      +        "errorCorrectionCode"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "modelVersion",
      +    "scenario",
      +    "result"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / connectivity
      Added value: +{
      +  "description": "Two-qubit connectivity of the device: \"all-to-all\" (ion transport), \"reconfigurable\" (atom shuttling, treated as all-to-all) or \"2d-lattice\" (fixed nearest-neighbour couplers, charged as a routing multiplier on depth in the no-EC path). Defaults to the hardware entry's class when hardwareId is supplied, else to all-to-all.",
      +  "enum": [
      +    "all-to-all",
      +    "reconfigurable",
      +    "2d-lattice"
      +  ],
      +  "type": "string"
      +}
  4. Changed4 schema fields changed
    • addedInput schema / properties / distanceSurfaceCode / description
      Added value: +"Surface code distance: odd integer in [3, 31]. Required when useErrorCorrection=true and the surface code is selected; ignored when a qLDPC code is selected."
    • removedInput schema / properties / distanceSurfaceCode / maximum
      Removed value: -31
    • removedInput schema / properties / distanceSurfaceCode / minimum
      Removed value: -3
    • changedInput schema / properties / distanceSurfaceCode / type
      Previous value: -"integer"New value: +"number"
  5. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  6. Changed1 schema field changed
    • addedInput schema / properties / errorCorrectionCode / description
      Added value: +"Either \"surface\" (default when useErrorCorrection=true) or a qLDPC code id from list_qldpc_codes. \"surface-code\" is accepted as an alias for \"surface\"."
  7. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish that this is a read-only, idempotent, deterministic computation, so the description adds genuine context: the no-error-correction path charges 2d-lattice connectivity as a routing multiplier on depth (surfaced as result.routingOverheadFactor), hardwareId auto-derives the connectivity class, and the response carries formulas, assumptions, caveats, glossary, and sourced historic series. It stops short of stating model accuracy limits or that results are deterministic closed-form estimates, which would have made it a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with the computation and immediately followed by the sibling routing. The parenthetical inventory of self-describing response fields is slightly long but earns its place by telling the agent one call suffices.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and strong annotations, the description needn't explain return values, and it still signals the response is self-describing enough to reason from a single call. Minor gap: it doesn't characterize the physics model's scope or limitations, which matters for a modeling tool an agent may quote as authoritative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67% and the schema documents most parameters, but the prose adds real meaning beyond it: what connectivity class does to the computation in the no-EC path, how hardwareId resolves and overrides connectivity defaults, and the p/n/d framing of the inputs. Uncovered Boolean/code parameters (useErrorCorrection, errorCorrectionCode) rely on schema descriptions, keeping this from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource set: compute effective error rate, success probability, and optional surface-code/qLDPC overhead from a circuit described by p, n, d, and connectivity class. It explicitly distinguishes itself from the inverse tool (compute_required_error_rate) and the multi-platform ranking sibling, so an agent can select without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names when to use alternatives: compute_required_error_rate for the inverse 'what hardware do I need?' question and compare_hardware_scenarios for ranking multiple platforms in one call. It also routes between hardwareId and qubitErrorRate, stating to use hardwareId whenever the question names a platform without an error rate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources