Skip to main content
Glama

Quantum Expectations

Compute Required Error Rate (Inverse)

compute_required_error_rate
Read-onlyIdempotent

Inverse of compute_expectation. Given a circuit (numQubits, compDepth) and an acceptable effective error rate, return the required per-gate logical error rate (requiredLogicalErrorRatePerGate: a number, or null only when the target is genuinely unreachable; never 0) and, for every EC option (no-EC, surface-code per distance, every qLDPC code), the required physical error rate plus the subset of current SOTA hardware that already qualifies. An option whose inverse lands above the code threshold is capped at min(MAX_P, threshold) and carries a note (any sub-threshold p satisfies it); unreachableReason is reserved for genuinely unreachable options. Answers "what hardware do I need to run this algorithm?".

Input Schema

NameRequiredDescriptionDefault
compDepthYesCircuit depth d (sequential 2-qubit gate layers). Accepts values up to 1e13.
numQubitsYesNumber of logical qubits n in the circuit.
acceptableErrorRatePercentYesUpper bound on the effective error rate, as a percent. Default website convention is 33 (i.e. ≤33% effective error is "acceptable").

Output Schema

NameRequiredDescriptionDefault
noECYes
caveatsYes
formulasYes
scenarioYes
qldpcCodesYesOne option per cataloged qLDPC code.
assumptionsYes
surfaceCodeYesOne option per odd surface-code distance.
requiredLogicalErrorRatePerGateYesPer-gate logical error rate every option must deliver; null only when the target is unreachable, never 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +    },
      +    "formulas": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "inverseEffectiveError": {
      +          "type": "string"
      +        },
      +        "inverseQLDPC": {
      +          "type": "string"
      +        },
      +        "inverseSurfaceCode": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "inverseEffectiveError",
      +        "inverseSurfaceCode",
      +        "inverseQLDPC"
      +      ],
      +      "type": "object"
      +    },
      +    "noEC": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "label": {
      +          "type": "string"
      +        },
      +        "note": {
      +          "description": "Present when requiredPhysicalErrorRate is a threshold cap rather than an exact inversion.",
      +          "type": "string"
      +        },
      +        "optionId": {
      +          "description": "\"no-ec\", \"surface-d<odd distance>\", or a qLDPC code id.",
      +          "type": "string"
      +        },
      +        "physicalQubitsPerLogicalQubit": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "qualifyingHardware": {
      +          "description": "Current-hardware entries whose errorRate already meets requiredPhysicalErrorRate.",
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "errorRate": {
      +                "type": "number"
      +              },
      +              "hardwareType": {
      +                "type": "string"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "physicalQubits": {
      +                "maximum": 9007199254740991,
      +                "minimum": -9007199254740991,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "hardwareType",
      +              "errorRate",
      +              "physicalQubits"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "requiredPhysicalErrorRate": {
      +          "description": "Physical per-gate error rate the hardware must reach; null when the option can never satisfy the target.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "totalPhysicalQubits": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "unreachableReason": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "optionId",
      +        "label",
      +        "requiredPhysicalErrorRate",
      +        "physicalQubitsPerLogicalQubit",
      +        "totalPhysicalQubits",
      +        "qualifyingHardware"
      +      ],
      +      "type": "object"
      +    },
      +    "qldpcCodes": {
      +      "description": "One option per cataloged qLDPC code.",
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "label": {
      +            "type": "string"
      +          },
      +          "note": {
      +            "description": "Present when requiredPhysicalErrorRate is a threshold cap rather than an exact inversion.",
      +            "type": "string"
      +          },
      +          "optionId": {
      +            "description": "\"no-ec\", \"surface-d<odd distance>\", or a qLDPC code id.",
      +            "type": "string"
      +          },
      +          "physicalQubitsPerLogicalQubit": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "qualifyingHardware": {
      +            "description": "Current-hardware entries whose errorRate already meets requiredPhysicalErrorRate.",
      +            "items": {
      +              "additionalProperties": {},
      +              "properties": {
      +                "errorRate": {
      +                  "type": "number"
      +                },
      +                "hardwareType": {
      +                  "type": "string"
      +                },
      +                "id": {
      +                  "type": "string"
      +                },
      +                "physicalQubits": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "hardwareType",
      +                "errorRate",
      +                "physicalQubits"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "requiredPhysicalErrorRate": {
      +            "description": "Physical per-gate error rate the hardware must reach; null when the option can never satisfy the target.",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "totalPhysicalQubits": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "unreachableReason": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "optionId",
      +          "label",
      +          "requiredPhysicalErrorRate",
      +          "physicalQubitsPerLogicalQubit",
      +          "totalPhysicalQubits",
      +          "qualifyingHardware"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "requiredLogicalErrorRatePerGate": {
      +      "description": "Per-gate logical error rate every option must deliver; null only when the target is unreachable, never 0.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "scenario": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "acceptableErrorRatePercent": {
      +          "type": "number"
      +        },
      +        "compDepth": {
      +          "type": "number"
      +        },
      +        "numQubits": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "numQubits",
      +        "compDepth",
      +        "acceptableErrorRatePercent"
      +      ],
      +      "type": "object"
      +    },
      +    "surfaceCode": {
      +      "description": "One option per odd surface-code distance.",
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "label": {
      +            "type": "string"
      +          },
      +          "note": {
      +            "description": "Present when requiredPhysicalErrorRate is a threshold cap rather than an exact inversion.",
      +            "type": "string"
      +          },
      +          "optionId": {
      +            "description": "\"no-ec\", \"surface-d<odd distance>\", or a qLDPC code id.",
      +            "type": "string"
      +          },
      +          "physicalQubitsPerLogicalQubit": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "qualifyingHardware": {
      +            "description": "Current-hardware entries whose errorRate already meets requiredPhysicalErrorRate.",
      +            "items": {
      +              "additionalProperties": {},
      +              "properties": {
      +                "errorRate": {
      +                  "type": "number"
      +                },
      +                "hardwareType": {
      +                  "type": "string"
      +                },
      +                "id": {
      +                  "type": "string"
      +                },
      +                "physicalQubits": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "hardwareType",
      +                "errorRate",
      +                "physicalQubits"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "requiredPhysicalErrorRate": {
      +            "description": "Physical per-gate error rate the hardware must reach; null when the option can never satisfy the target.",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "totalPhysicalQubits": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "unreachableReason": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "optionId",
      +          "label",
      +          "requiredPhysicalErrorRate",
      +          "physicalQubitsPerLogicalQubit",
      +          "totalPhysicalQubits",
      +          "qualifyingHardware"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "scenario",
      +    "requiredLogicalErrorRatePerGate",
      +    "noEC",
      +    "surfaceCode",
      +    "qldpcCodes",
      +    "formulas",
      +    "assumptions",
      +    "caveats"
      +  ],
      +  "type": "object"
      +}
  2. 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"
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description discloses key output behavior: null only for genuinely unreachable targets, never 0, threshold capping at min(MAX_P, threshold), explanatory notes for capped options, and unreachableReason reserved for true failures. These are material behavioral details an agent needs.

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?

The description is dense but front-loaded: it starts with the inverse relationship and the core question, then explains output caveats. Some return-value detail is lengthy, but most sentences add useful edge-case semantics.

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

Completeness5/5

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

Given the output schema and annotations, the description is complete enough for an agent to understand the tool's purpose, inputs, output shape, and edge cases. It also supplies the motivating question and inverse relationship.

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

Parameters3/5

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

Schema coverage is 100%, so the three inputs are already documented in the schema. The description maps them conceptually to circuit size and acceptable error rate, but adds little format or constraint detail beyond what the schema provides.

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?

The description states a specific inverse computation: given circuit size and acceptable effective error rate, return the required per-gate logical error rate and per-EC physical error rates. It explicitly distinguishes itself as the inverse of compute_expectation, making its role clear relative to siblings.

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

Usage Guidelines4/5

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

It clearly frames the use case as answering 'what hardware do I need to run this algorithm?' and names compute_expectation as the forward counterpart. It does not explicitly state when not to use it, but the inverse relationship gives strong routing guidance.

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