pyqcu-lattice
当任务涉及 pyqcu.lattice、gamma/Gell-Mann、SU(3) 检查、规范场生成或 Ward 索引时使用。
Skill by ZhangXin8069
Chalk Labs
Need help deploying pyqcu-lattice?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zhangxin8069-pyqcu-lattice
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pyqcu-lattice
What's inside
- Skill name
pyqcu-lattice- Description
- 当任务涉及 pyqcu.lattice、gamma/Gell-Mann、SU(3) 检查、规范场生成或 Ward 索引时使用。
- License
- MIT
- Instructions
- 72 lines in SKILL.md · view on GitHub
Files (2)
- AGENTS.md
- SKILL.md
SKILL.md (first lines)
# pyqcu.lattice
Lattice QCD fundamentals: gamma matrices, Gell-Mann matrices, SU(3) group utilities, and gauge field generation.
## Module-level Data (computed at import time, on CPU, complex64)
- **`gamma`** — 4×4×4 gamma matrices γ₀, γ₁, γ₂, γ₃ in the Dirac-Pauli representation (γ₀ anti-hermitian, γ_i hermitian). Shape `[4, 4, 4]`.
- **`gamma_5`** — γ₅ = γ₀γ₁γ₂γ₃. Shape `[4, 4]`.
- **`gamma_gamma`** — six γ_μ γ_ν products: [γ_x,γ_y], [γ_x,γ_z], [γ_x,γ_t], [γ_y,γ_z], [γ_y,γ_t], [γ_z,γ_t]. Shape `[6, 4, 4]`. Used as σ_{μν} matrices in the clover term.
- **`I`** — 4×4 identity matrix (complex64)
- **`minus_I`** — −I (precomputed)
- **`gell_mann`** — eight Gell-Mann matrices λ₁…λ₈ (SU(3) generators, traceless hermitian). Shape `[8, 3, 3]`. λ₁,λ₄,λ₆ are real; λ₂,λ₅,λ₇ are i×real.
## Ward Index Convention
Ward indices use **negative indexing** because spacetime dimensions are always the last four axes (`...xyzt` layout):
```python
wards['x'] = -4 # last 4th axis
wards['y'] = -3 # last 3rd axis
wards['z'] = -2 # last 2nd axis
wards['t'] = -1 # last axis
wards['t_p'] = -1 # parity-split temporal (same index as t)
```
This makes indexing robust regardless of prefix dimensions (spin, color, parity, etc.).
### Ward key lists
- **`ward_keys`** = `['x', 'y', 'z', 't']` — standard 4D directions
- **`ward_p_keys`** = `['x', 'y', 'z', 't_p']` — parity-aware (t_p for temporal with even/odd mask)
- **`ward_ward_keys`** = `['xy', 'xz', 'xt', 'yz', 'yt', 'zt']` — 6 plane directions for clover
### Ward mapping for gamma_gamma indexing
```python
ward_wards['xy'] = {'mu': -4, 'nu': -3, 'ward': -6} # gamma_gamma index 0
ward_wards['xz'] = {'mu': -4, 'nu': -2, 'ward': -5} # gamma_gamma index 1
# ... etc.
```
## Exported Functions
### `check_su3(U, tol=1e-3, verbose=True) → bool`
Verifies SU(3) properties of a gauge field:
1. **Unitarity:** U^H U ≈ I (uses `_torch.allclose` with `atol=tol`)
2. **Determinant:** det(U) ≈ 1 (uses raw `torch.linalg.det` — no NPU equivalent needed)
3. **Minor identities:** Each column is the cross product of the other two (with conjugation)
Returns `True` only if all three checks pass.
### `generate_gauge_field(U, sigma=0.1, seed=None, verbose=False) → torch.Tensor`
Generates random SU(3) gauge links via exponential map:
1. Sample 8 random Gaussian coefficients per site per direction
2. Form Hermitian matrix H = Σ_a c_a λ_a
3. Compute U = exp(i · σ · H) via `torch.matrix_exp`
4. Rearrange to `[3, 3, 4, Lx, Ly, Lz, Lt]` layout
Writes result in-place into `U`. Returns `U`.
### `give_support_multi() → bool`
Returns `True` if `MPI.COMM_WORLD.size > 1` (multi-process run).
## Data Layout
Gauge field `U`: shape `[3, 3, 4, Lx, Ly, Lz, Lt]` = `[color, color, direction, x, y, z, t]`
## Other Module-Level Data
In addition to the matrix data above, the module imports `mpi4py.MPI`, `pyqcu.cann as _torch`, and raw `torch` (for `torch.linalg.det` and `torch.matrix_exp` which have no NPU wrappers).From ZhangXin8069/PyQCU, MIT.
More from ZhangXin8069/PyQCU
- 0.611score
pyqcu-docs
ZhangXin8069
当需要定位 PyQCU 的权威项目文档、把 docs/ 内容提取或同步到 skills/、查询安装/ 环境/维度/测试入口、判断正式文档与阶段报告的生命周期,或追踪 CUDA、MultiGrid、 KUPL、benchmark 与 profiler 知识来源时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.608score
pyqcu-report
ZhangXin8069
当用户要求制作或修改 PyQCU 中文横版 Beamer、竖版完整讲稿或同源 PPTX, 或说“做汇报 PPT”“生成讲稿”“横版改 LaTeX”“补充公式/算法页”时使用。 纯性能基准、算法分析或代码修复任务不使用本技能。
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-kupl
ZhangXin8069
当维护或验证 cpp/kupl/qcu、pyqcu.kupl、pyqcu/testing/kupl,处理鲲鹏/NUMA CPU 版 QCU,MPI+OpenMP Wilson/Clover dslash、Clover BiStabCG、csw、 Wilson BiStabCG/CG、3D…
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-md-tex-sync
ZhangXin8069
{除非用户明确要求,否则不启用}。仅当当前用户明确点名 `pyqcu-md-tex-sync` / `~pyqcu-md-tex-sync`(或全局 `md-tex-sync`),或明确要求 Markdown 与 LaTeX/PDF 同源维护、双格式同步交付、全文全集与全附件归档时使用;普通…
SkillAFreshness: A★ 4Claude Code +9 - 0.605score
pyqcu-benchmark
ZhangXin8069
当需要运行或解释 PyQCU/QCU/QUDA 性能基准、公平计时、显存或容量证据时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cpp-qcu-python
ZhangXin8069
当任务涉及 cpp/cuda/qcu/python、C API、qcu_api.pxd、qcu.pyx 或 qcu.pyi 同步时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-api
ZhangXin8069
当任务涉及 pyqcu.api、后端无关配置/结果/能力/资产 manifest、公共 Protocol 或 Multigrid.solve_result 兼容层时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cuda
ZhangXin8069
当任务涉及 pyqcu.cuda、libqcu.so Cython 桥、params/argv/set_ptrs ABI 或 CUDA 显存生命周期时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-form
ZhangXin8069
当用户要求审计或整改 PyQCU 的命名、目录结构、代码框架、文档、日志、数据、 测试布局、仓库清洁度与 Git 交付格式时使用;入口为 `~form` 或 `form`。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cann
ZhangXin8069
当任务涉及 pyqcu.cann、Ascend/NPU 复数兼容层、force_use_npu 或复数 einsum 分解时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-dslash
ZhangXin8069
当任务涉及 pyqcu.torch.dslash、Wilson/Clover dslash、hopping/sitting/operator 或奇偶预处理时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cpp-qcu
ZhangXin8069
当任务涉及 cpp/cuda/qcu 的 CUDA 内核、MPI halo、MultiGrid 或 C++ 参数与显存生命周期时使用。
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 22, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ZhangXin8069/PyQCU
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ZhangXin8069
- 0.611score
pyqcu-docs
ZhangXin8069
当需要定位 PyQCU 的权威项目文档、把 docs/ 内容提取或同步到 skills/、查询安装/ 环境/维度/测试入口、判断正式文档与阶段报告的生命周期,或追踪 CUDA、MultiGrid、 KUPL、benchmark 与 profiler 知识来源时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.608score
pyqcu-report
ZhangXin8069
当用户要求制作或修改 PyQCU 中文横版 Beamer、竖版完整讲稿或同源 PPTX, 或说“做汇报 PPT”“生成讲稿”“横版改 LaTeX”“补充公式/算法页”时使用。 纯性能基准、算法分析或代码修复任务不使用本技能。
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-kupl
ZhangXin8069
当维护或验证 cpp/kupl/qcu、pyqcu.kupl、pyqcu/testing/kupl,处理鲲鹏/NUMA CPU 版 QCU,MPI+OpenMP Wilson/Clover dslash、Clover BiStabCG、csw、 Wilson BiStabCG/CG、3D…
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-md-tex-sync
ZhangXin8069
{除非用户明确要求,否则不启用}。仅当当前用户明确点名 `pyqcu-md-tex-sync` / `~pyqcu-md-tex-sync`(或全局 `md-tex-sync`),或明确要求 Markdown 与 LaTeX/PDF 同源维护、双格式同步交付、全文全集与全附件归档时使用;普通…
SkillAFreshness: A★ 4Claude Code +9 - 0.605score
pyqcu-benchmark
ZhangXin8069
当需要运行或解释 PyQCU/QCU/QUDA 性能基准、公平计时、显存或容量证据时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cpp-qcu
ZhangXin8069
当任务涉及 cpp/cuda/qcu 的 CUDA 内核、MPI halo、MultiGrid 或 C++ 参数与显存生命周期时使用。
SkillAFreshness: A★ 4Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get pyqcu-lattice running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
pyqcu-lattice skill. Agent Mart. https://agentmart.dev/skills/zhangxin8069-pyqcu-lattice (last updated 2026-10-24)