tropidist-distance

tropidist-distance is a skill for Claude Code, Codex from xi-zhao/OpenQuantum. It costs 48 tokens per session (894 once invoked), scanned A, original, MIT.

A tool for finding lower and upper bounds on the minimum number of unit-weight faults in a binary error-correction model. It works from parity-check and logical matrices or from Stim circuits, and keeps the fault witness and replay information.

In plain words
What is it for?
Use it to study error-correction distance, inspect fault witnesses, and replay searches for matrix or Stim-circuit inputs. It is for distance bounds, not for choosing the best correction for one syndrome.
Why use it?
It shows both what has been demonstrated and what the search has ruled out, rather than presenting an unchecked distance estimate. Replaying the witness helps verify that the reported fault matches the requested model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to study error-correction distance, inspect fault witnesses, and replay searches for matrix or Stim-circuit inputs. It is for distance bounds, not for choosing the best correction for one syndrome.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xi-zhao/openquantum/tropidist-distance
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xi-zhao/OpenQuantum --skill tropidist-distance
Clone the repo
git clone --depth 1 https://github.com/xi-zhao/OpenQuantum

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tropidist-distance

README.md
[![agentmods](https://agentmods.dev/badge/skills/xi-zhao/openquantum/tropidist-distance/github.svg)](https://agentmods.dev/skills/xi-zhao/openquantum/tropidist-distance)
Your own site
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/tropidist-distance"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/tropidist-distance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tropidist-distance

Your own site · 80×15
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/tropidist-distance"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/tropidist-distance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 894 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00894
Opus 5.5 $0.00019 $0.00358
Sonnet 5.5 $0.00010 $0.00179
Haiku 4.5 $0.00005 $0.00089

Measured 12d ago against content hash d00c7f55c8c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tropidist-distance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (references/native-example.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/tropidist-distance/SKILL.md · 34 lines

What it actually says

纠错距离上下界与故障见证

原生 SDK 路径

本能力使用 tropidist 的原生公开 API。用户需要 从二进制校验矩阵或 Stim 纠错电路求单位权距离的上下界与故障见证 时,由 Agent 在固定依赖环境中编写和运行任务代码。

使用 node scripts/sdk-access.mjs inspect tropidist-distance 定位环境,按完整 SDK 工作流执行。模块导航:cdist、stim、numpy;导航不是 API 白名单。

显式准备固定源码及本机 C 内核。Linux 需要 OpenMP。完整结果需要匹配上下界、有效见证和适用的故障模型。

原生程序导入库前,按环境定位器的 bootstrap 执行启动兼容处理:只读复核来源和 C 内核后定位已构建的 cdist。这不限制公开 API,也不替换数值算法。

本入口复用宿主文件与代码工具,没有新增通用执行 Tool。原生 SDK 受上游版本、可选依赖、宿主资源与用户授权约束。已禁用或被拒绝的动作不能借代码路径绕过。执行状态和科研验收分别报告。

需要知道“还排除了哪些更轻的故障”时,保留搜索下界、实际见证和终止状态。求某个 syndrome 的最优译码时选相应译码器。对纯图状故障可先用 Stim 的 graphlike 距离作对照。

使用

  1. 在 Linux 或 macOS 上显式运行 node scripts/setup-sdk.mjs tropidist-distance。Linux 的 C 编译器需支持 OpenMP。准备程序只取固定提交的 CLI、内核与许可,并将编译产物写在独立目录中。
  2. 通过 SDK 工作台的 inspect 获取解释器、运行环境和 bootstrap。原生程序调用 prepare_sdk("tropidist-distance") 后使用其返回的目录作为 python -B -m cdist 的工作目录。每次创建新的结果目录,设置单线程、有限的内层搜索时间、宿主墙钟预算和可用内存。
  3. 可编辑示例默认检查三列奇偶约束。使用 --matrices H.mtx L.mtx 或 --circuit memory.stim 传入任务输入。先看 result.json 中的输入摘要和状态,再打开同次运行的原始记录、搜索 trace 和重放结果。
  4. 矩阵使用从 1 开始的 MatrixMarket coordinate pattern general 坐标,同一坐标按 XOR 合并。故障集合必须满足 (He=0,\ Le\ne0)。CSS 的 (H_X,L_X) 给出 Z 距离,X 距离需用另一组矩阵。电路路径以未分解 DEM 中的单位权机制为模型,保留检测器、observable、故障来源及等权提升的适用条件。
  5. bounds、timeout 或缺少见证只能报告已获得的界。首次运行从 kmin=1 开始。搜索深度、内核饱和与内存会限制规模。电路上重放成功验证了上界见证,下界仍依赖固定算法和约化假设。

版本、模型与穷举对照包含三位重复码和旋转表面码的实际输入。常规执行保留 scientificValidation=not_evaluated。

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 34 lines · 48 tokens per session scan A d00c7f55c8c2

Subscribe to this mod's changes

tropidist-distance is a skill published in the GitHub repository xi-zhao/OpenQuantum (75 stars, last pushed 5d ago), licensed MIT. It adds 48 tokens to every session and 894 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.

Related

tropidist-distance compared with skills from other repositories

tropidist-distance next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tropidist-distancexi-zhao/OpenQuantumSkill755d agoMITA48Claude Code, Codex
manim-animatorsandbaseai/sandbase-skillsSkill21212d agoApache-2.0A59Claude Code
academic-researchsandbaseai/sandbase-skillsSkill21212d agoApache-2.0A39Claude Code
academic-trend-researchsandbaseai/sandbase-skillsSkill21212d agoApache-2.0A43Claude Code
openalex-guidecyanheads/openalex-mcp-serverSkill1816d agoApache-2.0A96Claude Code
arxiv-guidecyanheads/arxiv-mcp-serverSkill7yesterdayApache-2.0A81Claude Code
alexandriaThe-40-Thieves/alexandria-mcpSkill317d agoMITA71Claude Code