Skip to content

docs(examples): regroup the gallery by computational task - #500

Draft
lkdvos wants to merge 2 commits into
mainfrom
docs/examples-regroup
Draft

docs(examples): regroup the gallery by computational task#500
lkdvos wants to merge 2 commits into
mainfrom
docs/examples-regroup

Conversation

@lkdvos

@lkdvos lkdvos commented Aug 3, 2026

Copy link
Copy Markdown
Member

Split out of #449 so it can be reviewed on its own. #449 depends on this one (its landing page and symmetry tutorial link to the regrouped example paths and to the new examples_index anchor), so this should merge first.

quantum1d and classic2d grouped examples by the physics of the model, which is not how a reader arrives: they come with a task ("I need a ground state", "I need finite temperature") and have to open every example to find out which one does it. Regrouped into groundstates, excitations, dynamics and statmech, with a one-paragraph summary per example in the gallery index so it can be scanned.

examples/make.jl now discovers groups by listing its own subdirectories instead of naming them, so adding a group needs no pipeline change.

Example folders also lost their N. prefix: quantum1d/4.xxz-heisenberg is now groundstates/xxz-heisenberg. The folder name is the published URL, so a numeric prefix means inserting one example renames — and breaks the URL of — every example after it, to express an ordering these examples do not really have. Reading order now lives in the gallery index summaries, which are still arranged from introductory to advanced; the sidebar is alphabetical within each group. examples/README.md documents this for contributors.

Review notes

  • Most of the 90 files are pure renames. The real review surface is examples/make.jl, the gallery index.md, and the regenerated page diffs.
  • All eight examples were re-executed against current main; the committed pages are that output. Numbers moved in the last digits and groundstates/xxz-heisenberg converged to a slightly different VUMPS fixed point (41 → 60 iterations). No prose quotes an affected value.
  • Re-running also revealed that the previously committed rendered pages were stale relative to their own sources — they were missing typo fixes and a correlation_length(...; sector = leftunit(ψ)) update already present in the main.jl files.
  • examples/make.jl now normalizes source locations in captured log output. Rendered pages previously embedded the absolute checkout path and depot slug of whoever ran the pipeline (main currently ships a docs-improvement-plan worktree path), so the output differed per machine. Now └ @ MPSKit src/algorithms/groundstate/vumps.jl:87.
  • The two examples that docs: Diátaxis restructure — tutorials, how-to guides, concepts, library reference #449 adds (groundstates/tfim-groundstate and excitations/su3-heisenberg) are deliberately not here — they are new content, not a regrouping — so this PR's gallery index describes eight examples where docs: Diátaxis restructure — tutorials, how-to guides, concepts, library reference #449's describes ten.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 4 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 force-pushed the docs/examples-regroup branch from 85ed22b to ba92131 Compare August 5, 2026 13:52
`quantum1d` and `classic2d` grouped by the physics of the model, which is not how a reader
arrives: they come with a task ("I need a ground state", "I need finite temperature") and
have to open every example to find out which one does it. Regroup into `groundstates`,
`excitations`, `dynamics` and `statmech`, and give the gallery index a one-paragraph summary
per example so it can be scanned.

Drop the `N.` prefix from the example folders as well. The folder name is the published URL,
so a numeric prefix means inserting one example renames — and breaks the URL of — every
example after it, in order to express an ordering these examples do not really have. The
reading order now lives in the gallery index summaries, which run from introductory to
advanced; the sidebar is alphabetical within each group. `examples/README.md` documents this
for contributors.

`examples/make.jl` now discovers groups by listing its own subdirectories instead of naming
them, so adding a group needs no pipeline change. The gallery sidebar in `docs/make.jl`
mirrors the same grouping.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lkdvos
lkdvos force-pushed the docs/examples-regroup branch from ba92131 to ff58ac4 Compare August 5, 2026 14:17
Hide precompilation output. A `using` block reports precompilation progress whenever the
pipeline runs against a cold depot, which says nothing about the example and whose timings
differ per machine. `examples/make.jl` now drops any captured-output block that contains
nothing else, and the twelve blocks that had been committed across four pages are gone.

Use unicode in the markdown, not just in the code. Symbol macros become characters
(`\beta` -> β, `\langle`/`\rangle` -> ⟨⟩, `\dagger` -> †, `\ket{ψ}` -> |ψ⟩, `\hat{a}` -> â),
while structural LaTeX stays: `\frac`, `\sum` with limits, `\sqrt`, `\vec`, environments, and
`\hat{n}`, which has no precomposed character. `\left`/`\right` keep their macro delimiters,
since they need a LaTeX delimiter to size.

Format the example markdown one sentence per line, leaving lists, tables, display math,
admonitions and fenced blocks alone.

Rework the gallery index. "Level"/difficulty becomes the more neutral "Complexity"; the
ground states now open with the introductory Ising CFT example instead of the XXZ one; the
XXZ summary describes choosing a unit cell and symmetry to suit the state, with the transfer
and entanglement spectra as diagnostics, rather than a search that goes wrong; and the
summaries no longer name functions or symmetry types, which belong on the pages themselves.

The prose edits were applied to both `main.jl` and its rendered page so that a prose-only
change stays a prose-only diff instead of re-running every example for new digits. Rendering
all nine sources through Literate with `execute = false` reproduces the committed pages'
prose exactly, the notebooks were regenerated, and `Cache.toml` is back in sync.

Along the way: `xy-finiteT` had two overlapping sentences where one had lost its terminating
period, the Hubbard prose said `\mu = 0` where its equations already used μ, and four
misspellings sat in lines this pass rewrites anyway.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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