quantum-algorithms
Use this skill when the user says 'quantum algorithms overview', 'which problems have quantum speedup', 'QFT', 'phase estimation', 'VQE', 'QAOA', 'HHL'…
от j4flmao★ 47 звёзд на GitHub
Установить quantum-algorithms в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Quantum Algorithms: Map and Reality Check
Purpose
Quantum speedups exist for specific structures: periodicity (Shor), unstructured search (Grover), simulating quantum systems, and some linear-algebra tasks under strong assumptions. Many popular claims ignore input loading, output readout, or error-correction overhead. This skill maps algorithm families to their speedups and caveats and gives a checklist for assessing whether a problem is a plausible quantum use case.
Agent Protocol
Trigger
"quantum algorithms", "quantum speedup", "QFT", "phase estimation", "VQE", "QAOA", "HHL", "quantum machine learning", "quantum advantage for my problem".
Input Context
- The problem and its classical best-known algorithm and scale.
- Data size and how it would be loaded into a quantum state.
- What output is needed (a few numbers, a sample, a full vector).
- Timeline: NISQ experiments or fault-tolerant planning.
Output Artifact
Algorithm family match, speedup type with assumptions, resource/feasibility notes, and a recommendation.
Response Format
Problem: {x} Classical best: {algorithm, complexity}
Quantum candidate: {family} Speedup: {exponential|superpolynomial|quadratic|heuristic/unknown}
Assumptions: {oracle|QRAM|sparsity/condition number|readout}
Era: {NISQ|fault-tolerant} Resource estimate: {logical qubits, T-count/depth if known}
Verdict: {pursue|research only|classical is better}
Completion Criteria
- Compared against the best classical algorithm, not a naive one.
- Input loading and output extraction costs included.
- Heuristic algorithms not described as proven speedups.
Algorithm Families
| Family | Examples | Speedup | Key caveats |
|---|---|---|---|
| Hidden subgroup / period finding | Shor (factoring, discrete log) | Superpolynomial over best known classical | Needs fault tolerance; thousands of logical qubits for RSA-2048 |
| Amplitude amplification | Grover, amplitude estimation | Quadratic (provably optimal for unstructured search) | Oracle cost; sequential; large constants |
| Quantum simulation | Trotterization, qubitization for chemistry/materials | Exponential vs exact classical simulation for many systems | Most credible long-term application; resource counts still large |
| Phase estimation (QPE) | Eigenvalue estimation; core of Shor and chemistry | Enables the above | Deep circuits |
| Linear systems | HHL and successors | Exponential in dimension under conditions | Sparse, well-conditioned A; efficient state preparation of b; output is a quantum state, not the vector |
| Variational (NISQ) | VQE, QAOA | Heuristic, no general proof | Barren plateaus, noise, optimizer cost; often matched by classical methods |
| Quantum ML | Kernels, QNNs | Mostly unproven | Dequantization results (Tang 2018 onward) removed several claimed speedups |
| Sampling problems | Random circuit sampling, boson sampling | Evidence of classical hardness | Demonstrations, not useful computations so far |
Building Blocks
- Quantum Fourier Transform (QFT): maps |x⟩ to (1/√N) Σ_k e^{2πi xk/N} |k⟩ with O(n²) gates on n qubits (vs O(N log N) for classical FFT on N = 2ⁿ amplitudes). It does not give fast classical Fourier transforms of data; it transforms amplitudes you cannot read out directly.
- Phase estimation: with a controlled-U and an eigenstate |u⟩, estimates the eigenphase φ to t bits using a t-qubit register and inverse QFT.
- Shor's period finding: superposition over x, compute aˣ mod N into a second register, inverse QFT on the first, measure, then continued fractions to recover the period r.
- Grover diffusion: D = 2|s⟩⟨s| − I, with matrix entries 2/N off-diagonal and 2/N − 1 on the diagonal.
import math
from qiskit import QuantumCircuit
def qft(n: int, swaps: bool = True) -> QuantumCircuit:
qc = QuantumCircuit(n, name="QFT")
for j in reversed(range(n)):
qc.h(j)
for k in reversed(range(j)):
qc.cp(math.pi / 2 ** (j - k), k, j)
if swaps:
for i in range(n // 2):
qc.swap(i, n - 1 - i)
return qc
# Library equivalent: qiskit.circuit.library.QFT (or QFTGate in newer releases).
Use-Case Assessment
- Is there structure a known quantum algorithm exploits (periodicity, quantum dynamics, amplitude estimation)?
- Input: can the data be prepared as a quantum state efficiently? Loading N classical numbers generally costs Ω(N) operations, erasing exponential claims unless the input is implicit (a formula, a Hamiltonian).
- Output: do you need only a few numbers or samples? Reading out a full state needs exponentially many measurements.
- Classical competition: tensor networks, Monte Carlo, and dequantized algorithms are strong; compare to state of the art.
- Resources: under fault tolerance, logical qubits, T-count, and runtime at realistic clock speeds; a quadratic speedup with large constants may never beat a classical cluster.
Anti-Patterns
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл quantum-algorithms?
Use this skill when the user says 'quantum algorithms overview', 'which problems have quantum speedup', 'QFT', 'phase estimation', 'VQE', 'QAOA', 'HHL', 'quantum advantage', 'is my problem suitable for quantum', 'dequantization'. Surveys the main quantum algorithm families, their proven or heuristic speedups, the assumptions that make speedups real (oracles, state preparation, readout, error correction), and how to assess a use case honestly. Do NOT use for: deep dives on Grover (quantum-computing/grovers-algorithm) or Shor (quantum-computing/shors-algorithm), SDK usage (quantum-computing/qiskit-framework), or QEC (quantum-computing/quantum-error-correction).
Как установить скилл quantum-algorithms?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл quantum-algorithms запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…