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 error-correction (EC) option (no-EC, surface-code per distance, every qLDPC code), the required physical error rate plus the subset of current state-of-the-art hardware that already qualifies. An option whose inverse lands above the code threshold is capped at min(0.1, 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?".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "numQubits": "<numQubits>",
      "compDepth": "<compDepth>",
      "acceptableErrorRatePercent": "<acceptableErrorRatePercent>"
    },
    "name": "compute_required_error_rate"
  }
}

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. Required; the website itself uses 33 (an effective error of at most 33 % counts as 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
    • changedInput schema / properties / acceptableErrorRatePercent / description
      Previous value: -"Upper bound on the effective error rate, as a percent. Default website convention is 33 (i.e. ≤33% effective error is \"acceptable\")."New value: +"Upper bound on the effective error rate, as a percent. Required; the website itself uses 33 (an effective error of at most 33 % counts as acceptable)."
  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"
      +    },
      +    "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"
      +}
  3. 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"
  4. 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 important behavior: it returns required logical and physical error rates across all EC options, qualifies current hardware, and specifies capping and unreachableReason semantics. These details materially help an agent interpret edge cases and outputs.

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 purpose and inverse relationship are front-loaded, and the description stays focused on what the tool returns. It is somewhat dense with nested parentheticals and edge-case wording, but those details are useful rather than wasteful.

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?

For a complex inverse computation with multiple EC options and output fields, the description covers inputs, key outputs, hardware qualification, capping behavior, and unreachable semantics. An output schema exists, so it need not enumerate every return field, and what it supplies is sufficient for correct invocation.

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 description coverage is 100%, and the schema already documents all three parameters with constraints and examples, including the 33% example. The description adds conceptual context but no parameter syntax or meaning beyond what the schema provides, so the baseline 3 is appropriate.

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 explicitly identifies this as the inverse of compute_expectation and states the exact computation: given circuit size/depth and acceptable effective error, return the required per-gate logical error rate. It also names the practical question it answers, making the tool's role distinct from the sibling computation tool.

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?

The description gives clear usage context by naming the inverse relationship to compute_expectation and framing the tool around the question 'what hardware do I need to run this algorithm?' It does not explicitly state when-not-to-use or compare against other sibling tools, so it falls short of full when/when-not/alternatives 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