README.md
June 29, 2026 · View on GitHub
⚛ Quantum Skill
A practical skill for learning quantum computing algorithms and programming.
一个用于学习量子算法与编程的实用技能。
English
What is this?
Quantum Skill is a VS Code Copilot agent skill for quantum computing. It provides structured, progressive guidance to help Copilot explain concepts, write code, and run quantum algorithm demos using UnitaryLab, Qiskit, or PennyLane.
✨ Key Features
- Progressive Disclosure — Root
SKILL.mdis lightweight; algorithm and simulator guides load only when needed. - Full Algorithm Coverage — Primitives, linear systems, cryptography, Hamiltonian simulation, PDE solvers, eigensolvers, gradients, and quantum error correction.
- Multi-Simulator Support — UnitaryLab (recommended), Qiskit, and PennyLane, with clear selection rules.
- Run-Ready Setup — Pre-built wheels for Windows, macOS, and Linux;
uv-based one-command install. - Education-Friendly — Suitable for concept explanation, circuit design, code review, and hands-on demos.
🌟 Algorithms Covered
| Category | Algorithms |
|---|---|
| Primitives | Grover, QPE, Hadamard Test, Hadamard Transform, Amplitude Amplification, Amplitude Estimation |
| Linear Systems | HHL, LCU, QSVT-QLSA, Quantum Signal Processing (QSP) |
| Cryptography | Shor's Algorithm, Discrete Logarithm, Simon's Algorithm |
| Hamiltonian Simulation | Trotter, QDrift, Taylor Series, QSP |
| Schrodingerization | Advection, Heat (1D/2D) |
| Eigensolvers | NumPyEigensolver, VQD |
| Gradients | Parameter-shift, Finite-difference, Linear-combination, SPSA, Reverse-mode, QFI |
| Quantum Error Correction | qLDPC, CSS Codes, Hypergraph Product Codes |
💻 Supported Simulators
| Simulator | When to Use | Platform |
|---|---|---|
| UnitaryLab (default) | Learning, algorithm demos, PDE workflows | Win / macOS / Linux |
| Qiskit | Noise models, IBM hardware workflows | Win / macOS / Linux |
| PennyLane | Differentiable hybrid optimization | Win / macOS / Linux |
📁 Repository Structure
quantum-skills/
|
+-- SKILL.md # Root index — entry point for the agent
+-- README.md
|
+-- algorithms/ # Quantum algorithm skills
| +-- primitives/ # Grover, QPE, Hadamard test/transform, AA, AE
| +-- linear-systems/ # HHL, LCU, QSVT-QLSA, QSP
| +-- cryptography/ # Shor, discrete logarithm, Simon
| +-- hamiltonian-simulation/ # Trotter, QDrift, Taylor, QSP
| +-- schrodingerization/ # PDE solvers
| +-- eigensolvers/ # NumPyEigensolver, VQD
| +-- gradients/ # Parameter-shift, finite-diff, SPSA, reverse, QFI
| +-- quantum-error-correction/ # qLDPC, CSS codes
|
+-- simulators/ # Simulator selection & installation guides
+-- unitarylab/ # Recommended
+-- qiskit/
+-- pennylane/
🚀 Installation
Install into your project using bunx (recommended) or npx:
# Using Bun (recommended)
bunx skills add https://github.com/unitarylab/quantum-skills
# Using npm / npx
npx skills add https://github.com/unitarylab/quantum-skills
This places the skill under .agents/skills/quantum-skills/ in your workspace — Copilot will discover it automatically.
Or clone manually:
# macOS / Linux
git clone https://github.com/unitarylab/quantum-skills \
.agents/skills/quantum-skills
# Windows (PowerShell)
git clone https://github.com/unitarylab/quantum-skills `
.agents/skills/quantum-skills
The skill itself requires no Python installation. The UnitaryLab simulator is only needed when you intend to run code — setup instructions are inside
simulators/unitarylab/SKILL.md.
💡 Usage
When you ask Copilot a question about quantum computing in VS Code, the agent reads the corresponding SKILL.md file level by level, finds the most matching leaf-level guide, and then generates the code.
Example prompts:
| Prompt | What happens |
|---|---|
Implement Grover's algorithm using UnitaryLab | Loads primitives/grover guide |
Explain the HHL algorithm with a 2×2 example | Loads linear-systems/hhl guide with matrix demo |
Simulate 1D heat equation with Schrodingerization | Loads schrodingerization/heat-1d guide |
Compare Trotter and QDrift for Hamiltonian simulation | Loads hamiltonian-simulation guide |
Run Shor's algorithm on n=15 | Loads cryptography/shor guide |
License
This project is licensed under the MIT license. For details, please refer to the LICENSE file in the repository root directory or the license description included in the distribution package.
中文
这是什么?
Quantum Skill 是一个面向量子计算的 VS Code Copilot Agent 技能包。它为 Copilot 提供结构化、按需加载的引导,帮助其解释量子概念、编写代码,并基于 UnitaryLab、Qiskit 或 PennyLane 运行量子算法示例。
✨ 核心特性
- 渐进式加载 — 根
SKILL.md轻量,算法与模拟器指南仅在需要时才加载。 - 算法全覆盖 — 基元、线性系统、密码学、哈密顿量模拟、PDE 求解器、本征求解器、梯度方法、量子纠错一应俱全。
- 多模拟器支持 — UnitaryLab(推荐)、Qiskit、PennyLane,附明确选型规则。
- 开箱即用 — 提供 Windows / macOS / Linux 预编译 wheel,一条命令完成安装。
- 教学友好 — 适用于概念解释、电路设计、代码审查和动手实验。
🌟 算法覆盖范围
| 分类 | 算法 |
|---|---|
| 基础量子算法 | Grover、QPE、Hadamard 测试、Hadamard 变换、振幅放大、振幅估计 |
| 线性系统 | HHL、LCU、QSVT-QLSA、量子信号处理(QSP) |
| 密码学 | Shor 算法、离散对数、Simon 算法 |
| 哈密顿量模拟 | Trotter、QDrift、Taylor 级数、QSP |
| Schrodingerization | 对流、热方程(一维/二维) |
| 本征求解器 | NumPyEigensolver、VQD |
| 梯度方法 | 参数位移、有限差分、线性组合、SPSA、反向模式、QFI |
| 量子纠错 | qLDPC、CSS 码、超图乘积码 |
💻 支持的模拟器
| 模拟器 | 适用场景 | 平台 |
|---|---|---|
| UnitaryLab (默认) | 学习、算法演示、PDE 工作流 | Win / macOS / Linux |
| Qiskit | 噪声模型、IBM 硬件工作流 | Win / macOS / Linux |
| PennyLane | 可微分混合优化 | Win / macOS / Linux |
📁 仓库结构
quantum-skills/
|
+-- SKILL.md # 根索引 — Agent 入口
+-- README.md
|
+-- algorithms/ # 量子算法技能
| +-- primitives/ # Grover、QPE、Hadamard 测试/变换、振幅放大与估计
| +-- linear-systems/ # HHL、LCU、QSVT-QLSA、QSP
| +-- cryptography/ # Shor、离散对数、Simon
| +-- hamiltonian-simulation/ # Trotter、QDrift、Taylor、QSP
| +-- schrodingerization/ # PDE 求解器
| +-- eigensolvers/ # NumPyEigensolver、VQD
| +-- gradients/ # 参数位移、有限差分、SPSA、反向模式、QFI
| +-- quantum-error-correction/ # qLDPC、CSS 码
|
+-- simulators/ # 模拟器选型与安装指南
+-- unitarylab/ # 推荐
+-- qiskit/
+-- pennylane/
🚀 安装
使用 bunx(推荐)或 npx 安装到项目中:
# 使用 Bun(推荐)
bunx skills add https://github.com/unitarylab/quantum-skills
# 使用 npm / npx
npx skills add https://github.com/unitarylab/quantum-skills
命令会将技能放置到工作区的 .agents/skills/quantum-skills/ 目录下,Copilot 将自动发现并加载它。
或手动克隆:
# macOS / Linux
git clone https://github.com/unitarylab/quantum-skills \
.agents/skills/quantum-skills
# Windows (PowerShell)
git clone https://github.com/unitarylab/quantum-skills `
.agents/skills/quantum-skills
技能本身无需 Python 环境。UnitaryLab 模拟器仅在需要执行代码时才需安装,安装步骤详见
simulators/unitarylab/SKILL.md。
💡 使用方法
在 VS Code 中向 Copilot 提问量子计算相关问题时,Agent 会逐级读取对应的 SKILL.md 文件,找到最匹配的叶级指南后再生成代码。
prompt 示例:
| Prompt | 触发行为 |
|---|---|
用 UnitaryLab 实现 Grover 算法 | 加载基元/grover 指南 |
解释 HHL 算法,并给出 2×2 的示例 | 加载线性系统/hhl 指南,含矩阵示例 |
用 Schrodingerization 模拟一维热方程 | 加载 schrodingerization/heat-1d 指南 |
比较 Trotter 和 QDrift 在哈密顿量模拟中的异同 | 加载哈密顿量模拟指南 |
对 n=15 运行 Shor 算法 | 加载密码学/shor 指南 |
License
本项目采用 MIT 许可证。详情请参阅仓库根目录中的 LICENSE 文件,或发布包中随附的许可证说明。