pyzx-optimization SKILL.md skillA

pyzx-optimization from xi-zhao/openquantum is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add xi-zhao/openquantum/pyzx-optimization@git:20261012.5ce3b3e

Pins git:20261012.5ce3b3e in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
xi-zhao/openquantum
Path
.agents/skills/pyzx-optimization/SKILL.md
Versions recorded
5
Latest version
git:20261012.5ce3b3e, committed Oct 12, 2026
First version recorded
Sep 14, 2026
Size
2,914 bytes
Repository stars
71
License
MIT

用固定 PyZX 对 Clifford+T 电路做 ZX 重写和电路提取,比较门数,并可选独立核对完整酉矩阵等价性。.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# PyZX 电路优化

<!-- BEGIN NATIVE SDK ACCESS -->
## 原生 SDK 路径

本能力同时支持 **PyZX 的原生公开 API**。用户需要 Circuit、Graph、重写策略、提取、优化与等价性流程 时,由 Agent 在固定依赖环境中编写和运行任务代码,不限于下文便捷 Tool 的预设模型。

使用 `node scripts/sdk-access.mjs inspect pyzx-optimization` 定位环境,按[完整 SDK 工作流](../quantum-sdk-workbench/references/workflow.md)执行。模块导航:`pyzx`;导航不是 API 白名单。

下文关于模型、门集、输入与预算的限制描述便捷 Tool 的合同;原生 SDK 另受上游版本、可选依赖、宿主资源与用户授权约束。已禁用或被拒绝的动作不能借代码路径绕过。执行状态和科研验收分别报告。
<!-- END NATIVE SDK ACCESS -->

当用户需要减少 Clifford+T 电路的门开销、研究 ZX 重写或比较等价实现时,调用 Harness 注册的 `pyzx_local.optimize_pyzx_circuit`。

- 提交 `numQubits` 和结构化 `gates`:支持 H、S、T、X、Y、Z、CX、CZ,量子位数与门数由输入决定。CX 的 targets 为控制位、目标位;不接受动态电路、测量或任意 QASM 输入。
- 先明确比较目标是 T-count、双量子位门数还是总门数;三项可能此消彼长。报告 before/after 的实际值,不承诺每项都会改善。
- Tool 返回输入和优化后的 OpenQASM 2,可按 referenceMode 独立构造完整酉矩阵,忽略整体相位比较。提取保留量子位排列;实际执行参考且发现不等价时,调用失败。
- Y 在输入 QASM 中展开为 X 后接 Z,整体相位不影响此处合同;before 统计的是展开后的 PyZX 电路。QASM 可继续交给已有 QCEC 工具检查;本能力不做硬件映射。
- 当前 L1,`scientificValidation=not_evaluated`;依赖须显式准备;计算可能写本地缓存。

版本、准备命令、数值检查和限制见[接入说明](../../../docs/integrations/UNITARY_NEXT_TOOLS.md)。
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add xi-zhao/openquantum/pyzx-optimization@sha256:6f81afba63b284ec

The line at the top of this page pins the label git:20261012.5ce3b3e, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_nmhhcwr22rggie4h.svg)](https://markdownregistry.com/a/art_nmhhcwr22rggie4h)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 5 versions of this file, between Sep 14, 2026 and Oct 12, 2026, about one every 7 days.

versioncommittedcommitsizeaudit
git:20261012.5ce3b3e latest2026-10-12 5ce3b3e 2,914 BA view · diff
git:20260924.1dc67672026-09-24 1dc6767 2,090 BA view · diff
git:20260914.0f1d7a82026-09-14 0f1d7a8 1,845 BA view · diff
git:20260914.cc4fa9e2026-09-14 cc4fa9e 1,928 BA view · diff
git:20260914.a5a35712026-09-14 a5a3571 1,400 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (2914 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

xi-zhao/openquantum · 71 stars · license MIT · pushed 2026-11-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_nmhhcwr22rggie4h
GET https://markdownregistry.com/api/v1/resolve?ref=xi-zhao/openquantum/pyzx-optimization
GET https://markdownregistry.com/api/v1/blob/6f81afba63b284ec6e12af4f69e2663e885e9993b7df63fc66c31a46d62bcb0f

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from xi-zhao/openquantum

fixture-capability SKILL.md skill
xi-zhao/openquantum · .agents/skill-contracts/test/fixtures/capabilities/fixture-capability/SKILL.md · Contract fixture used only by the OpenQuantum Skill Contract tests.
git:20260814.132b3b6 · audit B · 71 stars
alicebob-cat-circuits SKILL.md skill
xi-zhao/openquantum · .agents/skills/alicebob-cat-circuits/SKILL.md · 用 Alice & Bob 的真实本地 Qiskit provider 构建物理或逻辑猫量子位噪声电路模型,返回调度转译后的采样和明确模型参数。
git:20261012.5ce3b3e · audit A · 71 stars
aqt-workbench SKILL.md skill
xi-zhao/openquantum · .agents/skills/aqt-workbench/SKILL.md · 官方离子阱后端本地编译与仿真,以及用户鉴权后的设备查询。
git:20261012.5ce3b3e · audit A · 71 stars
arc-rydberg SKILL.md skill
xi-zhao/openquantum · .agents/skills/arc-rydberg/SKILL.md · 使用 ARC Rydberg 的原生公开 API 完成原子、能级、跃迁矩阵元、寿命、Stark 图与相互作用,支持用户自定义模型、程序与结果文件。
git:20261013.efe0949 · audit A · 71 stars
bloqade-analog SKILL.md skill
xi-zhao/openquantum · .agents/skills/bloqade-analog/SKILL.md · 用 QuEra Bloqade Analog 在本地模拟二维 Rydberg 原子阵列的全局时变脉冲,返回逐原子占据、末态振幅、位串概率和明确单位。
git:20261012.5ce3b3e · audit A · 71 stars
braket-simulation SKILL.md skill
xi-zhao/openquantum · .agents/skills/braket-simulation/SKILL.md · 使用 Amazon Braket LocalSimulator 在本地计算结构化量子电路的精确数值振幅与概率。
git:20261012.5ce3b3e · audit A · 71 stars
catalyst-compilation SKILL.md skill
xi-zhao/openquantum · .agents/skills/catalyst-compilation/SKILL.md · 使用 PennyLane Catalyst 的原生公开 API 完成qjit、混合程序、QNode、控制流、编译配置与梯度,支持用户自定义模型、程序与结果文件。
git:20261013.efe0949 · audit A · 71 stars
chromobius-decoding SKILL.md skill
xi-zhao/openquantum · .agents/skills/chromobius-decoding/SKILL.md · 使用 Chromobius 的原生公开 API 对带颜色和基标注的 Stim detector error model 解码,比较预测与实际逻辑 observable 翻转;用于色码解码、样本分析和可复核小规模实验。
git:20261026.f44a0b2 · audit A · 71 stars
classiq-synthesis SKILL.md skill
xi-zhao/openquantum · .agents/skills/classiq-synthesis/SKILL.md · 使用 Classiq 官方 SDK 构建结构化 Qmod 模型,或通过用户自行配置的凭据调用远程综合;区分模型准备、云端综合和量子执行。
git:20261012.5ce3b3e · audit A · 71 stars
clifft-sampling SKILL.md skill
xi-zhao/openquantum · .agents/skills/clifft-sampling/SKILL.md · 用固定 Clifft 对 Clifford+T 电路做带噪采样或 Stim 格式的纠错记录采样,按活跃宽度控制成本,可选最终测量密度矩阵参考。
git:20261012.5ce3b3e · audit A · 71 stars
compact-optimization SKILL.md skill
xi-zhao/openquantum · .agents/skills/compact-optimization/SKILL.md · 用固定 Compact 执行线路优化与独立等价对照,解释输入语义、独立数值对照、成本与科学边界。
git:20261012.5ce3b3e · audit A · 71 stars
cqlib-kernel SKILL.md skill
xi-zhao/openquantum · .agents/skills/cqlib-kernel/SKILL.md · 用固定 cqlib-qml 执行角度编码核与 QSVM,解释输入语义、独立数值对照、成本与科学边界。
git:20261012.5ce3b3e · audit A · 71 stars

Every file in xi-zhao/openquantum

Browse by kind, by grade A, or by owner.