Skip to content

docs: content wave 2 (headline how-tos, tutorials, algorithm landscape)#451

Closed
lkdvos wants to merge 8 commits into
docs/content-wave1from
docs/content-wave2
Closed

docs: content wave 2 (headline how-tos, tutorials, algorithm landscape)#451
lkdvos wants to merge 8 commits into
docs/content-wave1from
docs/content-wave2

Conversation

@lkdvos

@lkdvos lkdvos commented Jul 5, 2026

Copy link
Copy Markdown
Member

Stacked on #449 (docs/content-wave1). Second wave of the docs restructure per docs/RESTRUCTURE_PLAN.md / docs/IMPROVEMENT_PLAN.md W2: the headline-workflow task recipes and the back half of the tutorial track, plus the algorithm-landscape decision guide.

Pages added (one commit each)

How-to (task recipes)

  • howto/groundstate_algorithms.md — find_groundstate heuristic, DMRG/DMRG2/VUMPS/IDMRG/IDMRG2/GradientGrassmann config, &-chaining, tolerances/verbosity
  • howto/time_evolution.md — timestep/time_evolve with TDVP/TDVP2, imaginary time, time-evolution MPOs (WII/TaylorCluster/WI) via approximate
  • howto/excitations.md — QuasiparticleAnsatz (gap, dispersion, charged Z2 sector), FiniteExcited, ChepigaAnsatz/2, variance checks; domain-wall usage prose-only (no in-repo test coverage to copy)
  • howto/index.md — browsable recipe index (new How-to landing page) with per-recipe listing and a missing-recipe issue invitation

Tutorials

  • tutorials/time_evolution.md — hand-held TFIM quench with an explicit TDVP loop and a plotted observable
  • tutorials/excitations.md — dispersion of the infinite TFIM; computed points match the exact Jordan–Wigner dispersion (k=0 gap agrees with 2(g−1) to 1e-11)
  • tutorials/using_symmetries.md — flagship redone with explicit Z2 symmetry; graded spaces, sector-resolved entanglement, charged-sector excitation payoff
  • Wired the two TODO(link) stubs in tutorials/thermodynamic_limit.md to the new tutorials

Concepts

  • concepts/algorithm_landscape.md — decision table (task × finite/infinite) + per-task comparison prose salvaged from man/algorithms.md. 26 <!-- REVIEW: --> flags — every physics/convergence claim is gated on maintainer review per CLAUDE.md.

Needs maintainer attention

  1. REVIEW flags: heaviest on concepts/algorithm_landscape.md (26); each tutorial/how-to carries 3–6 for its physics framing.
  2. Plan deviation — Z2, not U(1): MPSKitModels.transverse_field_ising only accepts Trivial/Z2Irrep/FermionParity (throws otherwise), so the symmetries tutorial uses Z2 and points at states-how-to §9 / XXZ / Haldane examples for U(1)/SU(2). Noted in-file.
  3. Tutorial physics changed after verification: at L=12, D=16 DMRG converges to the symmetric TFIM ground state (⟨σᶻ⟩ ≈ 1e-11), so the quench tutorial tracks ⟨σˣ⟩ (visible 0.26 → 0.61 → 0.49 relaxation) instead of a σᶻ-decay story.
  4. Upstream bug found during verification: find_groundstate on InfiniteMPS at g=10 (also g=5), χ=12 deterministically throws ArgumentError: invalid argument #4 to LAPACK call in MatrixAlgebraKit's divide-and-conquer SVD, from the auto-chained GradientGrassmann step — over-parametrized bond dimension on a near-product state; reproduces across seeds, single-threaded. g ≤ 2 is fine. Probably worth an issue on TensorKitManifolds/MatrixAlgebraKit.
  5. approximate's docstring says it returns a 2-tuple; every method returns (ψ, envs, ϵ) — docstring fix candidate for the W4 wave.
  6. examples/index.md and lib/public.md's spectral-functions section have no @id anchors, so pages can't deep-link them.

Verification

Every @example block on every new page was executed against real MPSKit before its commit (extracted per-page into a single Julia session, julia --project=docs), with semantic spot-checks (energy agreement trivial-vs-Z2 to 1e-14 across two RNG seeds; charged sector below trivial sector; dispersion vs exact formula). Final gate: full docs/make.jl Documenter run over the whole tree (doctest = true, all cross-references) — green, no new warnings.

🤖 Generated with Claude Code

lkdvos and others added 8 commits July 5, 2026 08:04
Task recipes for find_groundstate: keyword-form heuristic, explicit
DMRG/DMRG2/VUMPS/IDMRG/IDMRG2/GradientGrassmann configuration, &-chaining,
verbosity/tolerance control. All 12 @example blocks verified against real
MPSKit; physics claims salvaged from man/algorithms.md carry REVIEW flags.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Recipes for timestep/time_evolve with TDVP/TDVP2, bond growth during
evolution, infinite-state evolution, imaginary time, and time-evolution
MPOs (WII/TaylorCluster/WI) applied via approximate. All 11 @example
blocks verified against real MPSKit; physics claims carry REVIEW flags.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Recipes for QuasiparticleAnsatz (infinite gap, dispersion scan, charged
Z2 sector), finite-chain excitations (finite QP, FiniteExcited,
ChepigaAnsatz/2), and variance quality checks; domain-wall usage is
prose-only pending in-repo test coverage. All 11 @example blocks
verified against real MPSKit.

Note: verification exposed a numerical bug — find_groundstate on
InfiniteMPS at g=10, chi=12 hits a LAPACK SVD ArgumentError inside the
auto-chained GradientGrassmann step (over-parametrized bond dimension
on a near-product state); reproducible across seeds and single-threaded.
The recipe uses g=2.0 to avoid it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Router page listing every how-to page and its numbered recipes, grouped
by theme, with a missing-recipe issue invitation. All @ref anchors
verified; no code blocks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New Concepts section with the finite/infinite x task decision table and
per-task prose salvaged from man/algorithms.md. Zero code blocks. Every
physics/convergence claim carries a REVIEW flag (26 total) for
maintainer vetting per CLAUDE.md; dropped-claim inventory in a trailing
comment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Hand-held TDVP quench: TFIM ground state at g=0.5, quench to g=2.0,
explicit 40-step timestep loop tracking mid-chain transverse
magnetization, plotted with Plots. Verified end-to-end twice: the
initial sigma-z story was rewritten to track sigma-x after verification
showed DMRG at D=16 converges to the symmetric ground state (flat
sigma-z trace); the sigma-x trace shows order-1 relaxation dynamics
(0.26 -> peak 0.61 -> plateau 0.49).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Hand-held dispersion walk-through on the infinite TFIM at g=2: single
momentum gap, 16-momentum sweep, plot against the exact Jordan-Wigner
dispersion. Verified end-to-end; the k=0 gap matches 2(g-1) to 1e-11.
Physics claims (phase, ansatz framing, exact formula) carry REVIEW
flags.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Flagship TFIM redone with explicit Z2 symmetry: graded spaces, energy
agreement with the trivial run (1e-14), sector-resolved virtual space
and entanglement spectrum, and the charged-sector excitation payoff.
Plan deviation noted in-file: MPSKitModels' transverse_field_ising only
supports Trivial/Z2Irrep/FermionParity, so the plan's U(1) framing is
replaced by Z2; U(1)/SU(2) are pointed to via states how-to and
examples. All 13 @example blocks verified twice (unseeded RNG).

Also replaces the two TODO(link) stubs in thermodynamic_limit.md with
real links to the new excitations and using-symmetries tutorials.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lkdvos lkdvos added the documentation Improvements or additions to documentation label Jul 5, 2026
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

After the build completes, the updated documentation will be available here

@lkdvos lkdvos marked this pull request as ready for review July 6, 2026 17:31
@lkdvos

lkdvos commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

Folded into #449 by rebasing onto docs/content-wave1 and fast-forwarding; branch removed.

@lkdvos lkdvos closed this Jul 6, 2026
@lkdvos lkdvos deleted the docs/content-wave2 branch July 6, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant