quantum-practices 使用指南
为 DSH Agent 提供只读量子算法最佳实践检索,覆盖 60 个 SKILL,覆盖基础量子算法、线性系统、密码学、哈密顿模拟、量子机器学习等十大类。
本文为派生内容(基于 wiki / faq / compatibility_json 自动组装),非 AI 即时创作。
本文由本站基于该插件已收录的字段自动派生(wiki / faq / compatibility_json / readme),非 AI 即时创作。每节末尾标源字段。
快速上手
quantum-practices
— 源: plugin_wiki.wiki_content
安装与验证
dsh plugin --profile web add github:unitarylab/quantum-practices
复制以上命令在 DSH Web Profile 内运行。安装完成后在「插件列表」启用即可。
— 源: plugins.install
关键要点
- Progressive Disclosure — Root
SKILL.mdis lightweight; algorithm and simulator guides load only when needed. - DeepSeek Harness Tool Bundle —
quantum_practicesexposeslist,search, andgetwithout executing code. - Read-Only Runtime — No network, subprocess, filesystem writes, Python execution, credentials, or native code.
- Multi-Simulator Support — UnitaryLab (recommended), Qiskit, and PennyLane, with clear selection rules.
- GitHub-Sourced Corpus — Practice guides are synchronized from the public GitHub upstream only.
— 源: plugin_wiki.readme_zh (fallback readme_raw)
常见问题
安装后需要重启 DSH 才能用吗?
需要。package.json 的 dshWorkshop.lifecycle.activation 声明为 restart-profile,安装后必须重启对应 profile(Web/headless)才会注册 quantum_practices 工具。
这个插件会执行 Python 代码吗?
不会。dshWorkshop.permissions 明确声明 python:none、subprocess:none、shell:none 和 filesystem:none,algorithms/**/scripts/*.py 只是给阅读参考,运行时不会调用。
用 get 时为什么默认只返回简短内容?
默认 detail 为 brief,工具只会从 SKILL.md 中挑出"目的/前置/常见误解/选型"等小节以省 token;只有当你确实需要完整实现代码或示例时,模型才应该请求 detail="full"。
我可以自己加新的算法文档吗?
可以但要重新构建。运行 npm run build 会扫描仓库里所有 SKILL.md 并重新生成 src/generated/skill-catalog.ts;直接编辑该文件无效,会被覆盖。
安装后如何验证它真的注册了?
运行 dsh --profile headless --dump-config | rg "tool-quantum-practices|dsh-unitarylab-quantum-practices",输出中应出现一行 id: tool-quantum-practices。
这个插件和 unitarylab 的 Python 包是什么关系?
这是基于 unitarylab/quantum-skills 语料改编的 DSH 工具包,本身不发布 Python 包也不内置运行时。Python 环境属于另起的运行环境,与本插件安装路径无关。
工具超时了怎么办?
工具设置了 1000ms 超时(src/index.ts:51)。若返回超时,多半是查询特别长或者 60 条索引还没加载完;可缩短 query 或把 limit 调小再试。
调用 get 时 id 参数从哪来?
id 形如 algorithms/linear-systems/hhl。可先用 action="search" 或 "list" 拿到,再用 id 精确读取;按工具 description 的指示,模型不应让用户手动提供 id。
— 源: plugin_wiki.faq_json
兼容性
- DSH: 0.1.0-rc.6+
- Node: >=22.19.0
— 源: plugin_wiki.compatibility_json
踩坑提醒
安装前请审阅上游仓库;本指南基于已收录字段自动派生,可能滞后于最新版本。如发现与官方文档冲突,请以上游为准。
— 来源:通用规则