formulate-quantum-problem
について
このスキルは、ヒルベルト空間、演算子、境界条件を含む数学的枠組みを定義することで、開発者が量子力学や化学の問題を定式化するのを支援します。物理的なシナリオをシュレーディンガー方程式のような形式に翻訳し、摂動理論やDFTなどの適切な解法を選択することを助けます。解析的または数値的な解法のために量子問題を設定する際にご利用ください。
クイックインストール
Claude Code
推奨npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/formulate-quantum-problemこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします
ドキュメント
Formulate Quantum Problem
Physical system → well-posed QM problem: ID DOFs → build H + Hilbert space → BCs → pick approx method → validate vs known limits.
Use When
- Set up QM problem for analytic/numerical solution
- QChem calc (MOs, electronic structure)
- Physical scenario → Dirac/Schrödinger
- Choose perturbation / variational / DFT / exact diag
- Theoretical model for spectroscopic/scattering comparison
In
- Required: system desc (atom, molecule, solid, field)
- Required: target observable (spectrum, rates, ground state)
- Optional: experimental constraints
- Optional: accuracy / compute budget
- Optional: formalism (wave mech, matrix mech, 2nd quant, path int)
Do
Step 1: ID system + DOFs
- Particles: list (electrons, nuclei, photons, phonons) + quantum nums (spin, charge, mass)
- Symmetries: spatial (sph/cyl/trans/crystal), internal (spin/gauge), discrete (P, T)
- Energy scales: which DOFs active vs frozen/adiabatic
- Reduction: Born-Oppenheimer if nuclear/electronic timescales separate; collective coords for many-body
## System Characterization
- **Particles**: [list with quantum numbers]
- **Active degrees of freedom**: [coordinates, spins, fields]
- **Frozen degrees of freedom**: [and justification for freezing]
- **Symmetry group**: [continuous and discrete]
- **Energy scale hierarchy**: [e.g., electronic >> vibrational >> rotational]
→ Complete inventory: particles, QNs, symmetries, active vs frozen justified.
If err: hierarchy unclear → keep all DOFs, flag for scale analysis. Premature truncation → wrong physics.
Step 2: Build H + Hilbert space
- Hilbert space: finite-dim → basis (|↑>, |↓>). Infinite → function space (L²(R³) for 3D single particle).
- Kinetic: each particle. Position rep: T = -ℏ²/(2m) nabla².
- Potential: all interactions (Coulomb, harmonic, spin-orbit, external). Explicit form + coupling.
- Composite H: H = T + V, group by type. Multi-particle: exchange/correlation or note via approx.
- Operator algebra: H Hermitian? Constants of motion ([H,O]=0) → block-diagonalize.
## Hamiltonian Structure
- **Hilbert space**: [definition and basis]
- **H = T + V decomposition**:
- T = [kinetic terms]
- V = [potential terms, grouped by type]
- **Constants of motion**: [operators commuting with H]
- **Symmetry-adapted basis**: [if block diagonalization is possible]
→ Complete Hermitian H w/ all terms, Hilbert space defined, constants of motion ID'd.
If err: not Hermitian → missing conjugate / gauge phase. Ambiguous Hilbert space (relativistic) → specify formalism.
Step 3: BCs + initial conditions
- BCs: bound → normalizability (psi→0 at ∞). Scattering → incoming wave. Periodic → Bloch / Born-von Karman.
- Domain: spatial. Box walls. H atom: radial + angular. Lattice + topology.
- Initial state (time-dep): t=0 expansion in eigenbasis or wave packet w/ center + width.
- Constraints: indistinguishable → sym (bosons) / antisym (fermions). Gauge → gauge-fixing.
## Boundary and Initial Conditions
- **Spatial domain**: [definition]
- **Boundary type**: [Dirichlet / Neumann / periodic / scattering]
- **Normalization**: [condition]
- **Particle statistics**: [bosonic / fermionic / distinguishable]
- **Initial state** (if time-dependent): [specification]
→ BCs physically motivated, consistent w/ H domain, unique solution (or scattering matrix).
If err: over/under-determined → check self-adjointness on domain. Non-self-adjoint → handle deficiency indices.
Step 4: Pick approx method
-
Exact solvable: matches known model (HO, H atom, Ising)? → exact + perturbation corrections.
-
Perturbation (weak coupling):
- H = H0 + lambda V, H0 solvable
- lambda V small vs H0 level spacing
- Degeneracy? → degenerate perturbation
- Fits: weak interaction, few-body, analytic needed
-
Variational (ground state):
- Trial wf w/ params
- Satisfies BCs + symmetry
- Fits: ground state energy primary, many-body
-
DFT (many-electron):
- XC functional (LDA, GGA, hybrid)
- Basis (plane waves, Gaussian, NAOs)
- Fits: many-electron, ground state density + energy
-
Numerical exact (small/benchmark):
- Exact diag for small Hilbert
- QMC for ground state sampling
- DMRG for 1D/quasi-1D
- Fits: high accuracy, small system
## Approximation Method Selection
- **Method chosen**: [name]
- **Justification**: [why this method fits the problem structure]
- **Expected accuracy**: [order of perturbation, variational bound quality, DFT functional accuracy]
- **Computational cost**: [scaling with system size]
- **Alternatives considered**: [and why they were rejected]
→ Justified method + expected accuracy + compute cost + alternatives.
If err: no single method fits → formulate for 2 + compare. Disagreement reveals difficulty.
Step 5: Validate vs limits
- Classical (ℏ→0 or large QNs): H reduces to classical mech.
- Non-interacting: couplings → 0 → product of single-particle states.
- Symmetry: respects all symmetries. H transforms correctly under group.
- Dimensional: every H term = energy. Length/energy/time scales reasonable.
- Known exact: special cases (H atom Z=1, HO quadratic) → reproduced.
## Validation Checks
| Check | Expected Result | Status |
|-------|----------------|--------|
| Classical limit (hbar -> 0) | [classical Hamiltonian] | [Pass/Fail] |
| Non-interacting limit | [product states] | [Pass/Fail] |
| Symmetry transformation | [correct representation] | [Pass/Fail] |
| Dimensional analysis | [all terms in energy units] | [Pass/Fail] |
| Known exact case | [reproduced result] | [Pass/Fail] |
→ All pass. Self-consistent, ready to solve.
If err: fail → err in H construction or BCs. Trace to specific term/condition, fix before solving.
Check
- Particles + QNs listed
- Hilbert space + basis
- H Hermitian + correct units
- Constants of motion used
- BCs physically + mathematically sufficient
- Statistics (bos/ferm) enforced
- Method justified + accuracy stated
- Classical, non-interacting, symmetry limits checked
- Known exact reproduced
- Reproducible
Traps
- Premature DOF drop: freeze w/o energy scale arg → wrong physics. Justify every reduction.
- Non-Hermitian H: missing conjugate in spin-orbit / complex V. Verify H=H† explicitly.
- Wrong scattering BCs: bound-state BCs for scattering → discards continuum. Match to question.
- Degeneracy in perturbation: non-deg perturbation on deg level → divergent. Check first.
- Single-method reliance: variational → upper bound but misses excited; perturbation diverges at strong coupling. Cross-validate.
- Unit inconsistency: mixing natural (ℏ=1) + SI. Pick consistent system, state explicitly.
→
derive-theoretical-result— analytic from formulated problemsurvey-theoretical-literature— prior work on similar QM systems
GitHub リポジトリ
関連スキル
llamaguard
その他LlamaGuardは、暴力やヘイトスピーチなど6つの安全性カテゴリーにおいて、LLMの入力と出力をモデレートするMetaの70-80億パラメータモデルです。94〜95%の精度を提供し、vLLM、Hugging Face、Amazon SageMakerを使用してデプロイ可能です。このスキルを使用して、AIアプリケーションにコンテンツフィルタリングと安全策を簡単に統合できます。
cost-optimization
その他このClaudeスキルは、リソースの適正サイジング、タグ付け戦略、支出分析を通じて、開発者がクラウドコストを最適化することを支援します。AWS、Azure、GCPにわたるクラウド支出の削減とコストガバナンスの実施のためのフレームワークを提供します。インフラコストの分析、リソースの適正サイジング、または予算制約への対応が必要な際にご利用ください。
quantizing-models-bitsandbytes
その他このスキルは、bitsandbytesを使用してLLMを8ビットまたは4ビット精度に量子化し、精度の低下を最小限に抑えつつ50〜75%のメモリ削減を実現します。限られたGPUメモリでより大規模なモデルを実行したり、推論を高速化するのに理想的で、INT8、NF4、FP4などのフォーマットをサポートしています。HuggingFace Transformersと統合され、QLoRAトレーニングや8ビットオプティマイザーを可能にします。
dispatching-parallel-agents
その他このClaudeスキルは、複数のエージェントを配備し、3つ以上の独立した問題を並行して調査・修正します。共有状態や依存関係がなく解決可能な、無関係な障害が発生するシナリオ向けに設計されています。中核となる機能は並列問題解決であり、効率を最大化するために独立した問題領域ごとに1つのエージェントを割り当てます。
