一键导入
using-pepskit
Use when choosing or running PEPSKit.jl or TensorKit.jl for PEPS, CTMRG, 2D classical/quantum tensor-network calculations, or PEPSKit setup failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when choosing or running PEPSKit.jl or TensorKit.jl for PEPS, CTMRG, 2D classical/quantum tensor-network calculations, or PEPSKit setup failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user wants a numerical result (ED / DMRG / QMC / VMC / any method) checked against an exact solution, or names a model from the solvable-models catalog in a verification context. Trigger phrases: "verify against the exact solution", "check my DMRG/ED/QMC result", "benchmark <method> on <model>", "is this energy right", "does this match the exact answer", "sanity-check this against Bethe ansatz / Onsager / free-fermion solution". Also fires when the user names any of the 63 catalog models below in a verification context — not only when they use the word "verify": - T1 quadratic/free-particle: tfim-chain (TFIM), xy-chain, kitaev-chain, ssh-chain, kitaev-honeycomb, hofstadter-harper, haldane-chern, anderson-1d, harmonic-chain - T2 2D classical/transfer matrix: ising-2d-onsager (Onsager / 2D Ising), ising-triangular, dimer-kasteleyn, six-vertex, eight-vertex, hard-hexagons - T3 Bethe ansatz/Yang–Baxter: xxz-chain, heisenberg-xxx, hubbard-1d-lieb-wu (Lieb–Wu / 1D Hubbard), lieb-liniger, yang
Use when an exact diagonalization track, ED reproduction, full spectrum, symmetry sector, scar, ETH, level statistics, quench dynamics, finite-temperature ED (FTLM/TPQ), spectral function, interior-spectrum / MBL eigenstates, or finite-cluster oracle needs method-level route and tool selection.
Use when the user names or describes a harness-tracked quantum lattice model. Match user prose to one of: - transverse-field-ising (TFIM): quantum-critical Ising chain / 2D Wilson-Fisher - heisenberg: SU(2) magnet, AFM or FM by sign of J - xxz-chain: spin-1/2 XXZ, Bethe-ansatz integrable, Δ tunes FM / Luttinger / Néel - j1-j2: frustrated Heisenberg, J2/J1≈0.5 spin-liquid candidate - shastry-sutherland: orthogonal-dimer AFM, exact dimer phase, magnetization plateaus - spin-1-xxz: Haldane phase, single-ion anisotropy - aklt: spin-1 bilinear-biquadratic, exact VBS ground state - kitaev-honeycomb: bond-dependent exchange, exactly solvable Z2 spin liquid, anyons - spin-ice-pyrochlore: 2-in-2-out ice rule, Coulomb phase, magnetic monopoles - mbl-disordered-heisenberg: random-field XXZ chain, ETH-to-MBL transition - rydberg-pxp: blockaded Rydberg chain, quantum many-body scars, |Z2⟩ revivals - dissipative-spin-lindblad: open spin lattice, Liouvillian spectrum, steady states - potts-clock: q-state, first-order / cont
Use when the user wants to reproduce a paper's figure or main result. Triggers include "reproduce paper X", "redo the figures of Y", "reproduce arXiv <id>", "put this paper through the harness as a calibration target", "walk me through reproducing this paper", "beginner reproduction", "I don't know what size to choose", "explain while reproducing", or right after `/download-ref` lands a new paper.
Use when choosing or running QuSpin as the Python fallback for exact diagonalization, constrained-basis ED, spin-chain ED examples, or QuSpin setup failures.
Use when choosing or running XDiag.jl for exact diagonalization, symmetry-resolved sectors, Lanczos/Krylov calculations, or XDiag setup failures.
| name | using-pepskit |
| description | Use when choosing or running PEPSKit.jl or TensorKit.jl for PEPS, CTMRG, 2D classical/quantum tensor-network calculations, or PEPSKit setup failures. |
Use PEPSKit with TensorKit for PEPS / CTMRG calculations where convergence knobs and tensor symmetries matter.
skills/using-pepskit/stack.tomlskills/method-peps/SKILL.mdmake install pepskitjulia --project=julia-env -e 'using TensorKit, PEPSKit, QuadGK'references/pepskit-api.mdUse this section as the source for PEPSKit-specific reproduction knobs unless the paper or official code fixes a value. The method card supplies the CTMRG/PEPS notation and onboarding defaults; this skill exposes the convergence controls.
chi_env, truncation scheme, tolerance, maximum iterations, update style, and initialization/bias for symmetry breaking.Concrete starting points for the convergence controls in Parameter setup.
| Knob | Effect | Starting point |
|---|---|---|
chi_env | Environment accuracy and cost. | 20 for smoke; sweep 20, 40, 80+ near criticality. |
tol | CTMRG fixed-point tolerance. | 1e-8 for onboarding; tighten for benchmark figures. |
maxiter | Upper bound on CTMRG iterations. | 500; increase near criticality if residual remains high. |
| Temperature grid | Resolution of the visual curve. | Dense near the critical region, sparse away from it. |
| Tensor normalization | Controls numerical scale. | Keep one explicit convention and report it. |
| Symmetry blocks | Speed and stability when applicable. | Use only when the model convention is already clear. |
For the classical Ising onboarding route, follow the PEPSKit example shape:
using LinearAlgebra
using TensorKit, PEPSKit
using QuadGK
# 1. Build the rank-4 local tensor O(beta), plus optional insertion tensors
# for magnetization M(beta) and energy E(beta).
O, M, E = classical_ising(; beta, J = 1.0)
# 2. Wrap the infinite square network.
Z = InfinitePartitionFunction(O)
# 3. Build and converge a CTMRG environment.
Venv = ComplexSpace(chi_env)
env0 = CTMRGEnv(Z, Venv)
env, = leading_boundary(env0, Z; tol = 1.0e-8, maxiter = 500)
# 4. Contract observables.
lambda = network_value(Z, env)
m = expectation_value(Z, (1, 1) => M, env)
e = expectation_value(Z, (1, 1) => E, env)
The local tensor construction and exact Onsager/Yang comparison live in the
reproduction script, not here. Write per-temperature results incrementally and
emit progress after each temperature or chi_env point.
Estimate from PEPS bond dimension, environment dimension, unit-cell size, CTMRG iterations, and whether optimization is included.
/setup-julia, then use the pepskit:cpu profile; CTMRG is CPU-first in the current stack, and fresh accounts may spend most of the first run in Julia precompilation.