erasure-recovery

erasure-recovery is a skill for Claude Code, Codex from xi-zhao/OpenQuantum. It costs 55 tokens per session (987 once invoked), scanned A, original, MIT.

A compiler for recovering a single logical quantum bit after known physical-bit erasures. It uses a stabilizer code and a weighted hardware connection graph to produce a conditional correction circuit.

In plain words
What is it for?
Use it to compile recovery circuits for erased qubits and restore the logical state at a chosen physical location.
Why use it?
It helps map logical-state recovery onto available hardware while checking the cost of the required controlled-NOT operations.

Skill for Claude CodeCodex

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

Good fit Use it to compile recovery circuits for erased qubits and restore the logical state at a chosen physical location.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xi-zhao/openquantum/erasure-recovery
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 erasure-recovery
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 erasure-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/xi-zhao/openquantum/erasure-recovery/github.svg)](https://agentmods.dev/skills/xi-zhao/openquantum/erasure-recovery)
Your own site
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/erasure-recovery"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/erasure-recovery/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 erasure-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/erasure-recovery"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/erasure-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 987 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.00055 $0.00987
Opus 5.5 $0.00022 $0.00395
Sonnet 5.5 $0.00011 $0.00197
Haiku 4.5 $0.00006 $0.00099

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

Security

Grade A, and why

erasure-recovery 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 7d 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/erasure-recovery/SKILL.md · 31 lines

What it actually says

已知擦除后的逻辑态恢复

原生 SDK 路径

本能力使用 Quantum Erasure Recovery Compiler 的原生公开 API。用户需要 根据单逻辑比特的稳定子编码、已知擦除与带权耦合图,把逻辑态恢复到指定站点 时,由 Agent 在固定依赖环境中编写和运行任务代码。

使用 node scripts/sdk-access.mjs inspect erasure-recovery 定位环境,按完整 SDK 工作流执行。模块导航:verification.compiler;导航不是 API 白名单。

v1.1.0 的 Python 参考编译器只用标准库。费用只计擦除后的 CNOT,单比特操作、复位、测量及经典前馈免费。枚举成本随规模增长。

原生程序导入库前,按环境定位器的 bootstrap 执行启动兼容处理:校验固定的参考编译器源码并加入 Python 搜索路径。这不限制公开 API,也不替换数值算法。

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

用此入口把可能与外部参考纠缠的逻辑态提取到指定物理站点。若要从 detector 采样预测逻辑翻转,使用 QEC memory experiment 或 MWPF。

  1. 显式准备 node scripts/setup-sdk.mjs erasure-recovery。用 node scripts/sdk-access.mjs inspect erasure-recovery 查出解释器,在新任务目录用它执行 -B 和可编辑示例的绝对路径。Codex 安装版使用 SDK 工作台的定位器,取返回的 project/references/native-example.py,并把 run.environment 传给宿主。把示例另存时,设置 OPENQUANTUM_ROOT 指向包含 src/lib/sdk_bootstrap.py 的已准备运行目录。
  2. 调用 verification.compiler.compile_recovery(generators, erased, hardware, output, relay_erased=...)。对 n 个物理比特提供 n+1 个独立、对易的带符号 Choi 生成元。首字母作用在不可操作的参考上,其余字母按物理站点从 0 排列。每条无向边只列一次,权重使用非负整数或 fractions.Fraction。默认移走擦除位。仅当设备能重新制备新鲜比特时,把相应擦除位置列入 relay_erased。
  3. 保存 logical_x、logical_z、join_edges、cost 和有序的 operations。CNOT 的两个站点依次为控制和目标。测量本征值 +1 记作 0,−1 记作 1。将 parity 中各站点的测量位与 offset 异或,结果为 1 时执行条件校正。例程在当前任务目录新建 result.json。
  4. 对于 NoRecovery,区分幸存子系统丢失逻辑信息和硬件图无法到达输出位。其余输入错误保留原始 ValueError。按给定图逐门核账,若需证明费用最小,再给出独立下界。上游方法枚举幸存逻辑代表与匹配,小例下界只适用于已核对的编码、擦除、边权与操作模型。

上游接口与资源模型

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. 7d ago First seen · 31 lines · 55 tokens per session scan A 0c88b3a305c4

Subscribe to this mod's changes

erasure-recovery is a skill published in the GitHub repository xi-zhao/OpenQuantum (75 stars, last pushed 5d ago), licensed MIT. It adds 55 tokens to every session and 987 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-27.

Related

erasure-recovery compared with skills from other repositories

erasure-recovery next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
erasure-recoveryxi-zhao/OpenQuantumSkill755d agoMITA55Claude 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