README.md

June 29, 2026 · View on GitHub

⚛ Quantum Skill

A practical skill for learning quantum computing algorithms and programming.
一个用于学习量子算法与编程的实用技能。

Python 3.11 UnitaryLab 0.1.0 VS Code Copilot Skill Claude Code Skill 30+ Quantum Algorithms

English · 中文


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.md is 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

CategoryAlgorithms
PrimitivesGrover, QPE, Hadamard Test, Hadamard Transform, Amplitude Amplification, Amplitude Estimation
Linear SystemsHHL, LCU, QSVT-QLSA, Quantum Signal Processing (QSP)
CryptographyShor's Algorithm, Discrete Logarithm, Simon's Algorithm
Hamiltonian SimulationTrotter, QDrift, Taylor Series, QSP
SchrodingerizationAdvection, Heat (1D/2D)
EigensolversNumPyEigensolver, VQD
GradientsParameter-shift, Finite-difference, Linear-combination, SPSA, Reverse-mode, QFI
Quantum Error CorrectionqLDPC, CSS Codes, Hypergraph Product Codes

💻 Supported Simulators

SimulatorWhen to UsePlatform
UnitaryLab (default)Learning, algorithm demos, PDE workflowsWin / macOS / Linux
QiskitNoise models, IBM hardware workflowsWin / macOS / Linux
PennyLaneDifferentiable hybrid optimizationWin / 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:

PromptWhat happens
Implement Grover's algorithm using UnitaryLabLoads primitives/grover guide
Explain the HHL algorithm with a 2×2 exampleLoads linear-systems/hhl guide with matrix demo
Simulate 1D heat equation with SchrodingerizationLoads schrodingerization/heat-1d guide
Compare Trotter and QDrift for Hamiltonian simulationLoads hamiltonian-simulation guide
Run Shor's algorithm on n=15Loads 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 文件,或发布包中随附的许可证说明。