Skip to content

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

Merged
lkdvos merged 5 commits into
mainfrom
docs/examples-regroup
Oct 13, 2026
Merged

lkdvos merged 5 commits into
mainfrom
docs/examples-regroup

Conversation

@lkdvos

@lkdvos lkdvos commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

This is a small reorganization of the examples, in particular sorting them by what they do, rather than what model/physics is considered, which seems more logical for documentation I'd say.
Have a look at the examples landing page and tell me what you think?

@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 2 times, most recently from ba92131 to ff58ac4 Compare August 5, 2026 14:17
lkdvos and others added 3 commits October 12, 2026 16:44
`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>
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>
Rebasing onto main brought in the shared `models.jl` helpers and the reworked example
sources, so the committed pages no longer matched their scripts. Rerun `examples/make.jl`
for every example and refresh `Cache.toml`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lkdvos
lkdvos force-pushed the docs/examples-regroup branch from c4a3ede to 767b372 Compare October 12, 2026 22:11
@lkdvos
lkdvos marked this pull request as ready for review October 12, 2026 22:11
@lkdvos

lkdvos commented Oct 13, 2026 •

Copy link
Copy Markdown
Member Author

I've canceled CI since this only involves docs re-arrangement, would be nice to get some opinions on this though. Will also not rebase for now to avoid running CI again 😉

@lkdvos
lkdvos requested review from borisdevos and a balanced review from Copilot and removed request for Copilot October 13, 2026 12:47
Comment thread docs/src/examples/index.md Outdated

### [Spin 1 Heisenberg model](groundstates/haldane-spt/index.md)

![](groundstates/haldane-spt/figure-3.png)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did something change about the way figures are generated? Some of the math mode rendering looks kind of off, tagging this image because it's noticeable with how Irrep[SU2] isn't displaying well. Maybe this shouldn't be tackled in this PR, but I guess the plot styles should be somewhat homogenised and made a bit more cleanly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, good catch. Turns out that the bose-hubbard example sets a plots theme that leaked into the next examples in the order I generated these, which was no problem before but with the reordering now affects further examples. I reset the themes for this PR so that should at least be fixed, but definitely agree to having a more uniform look here, which should hopefully be tied to #428 as well.

Comment thread docs/src/examples/index.md Outdated

@borisdevos borisdevos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check any of the actual examples in detail, because from I saw superficially it seems like just fixing some typos and pretty printing. Some minor comments on the examples landing page, but none blocking and otherwise looks good!

lkdvos and others added 2 commits October 13, 2026 11:35
…tyles

The sidebar sorted examples by folder name but displays page titles, so it looked unordered.
Take the order from the links on the gallery index instead, so the sidebar and the summaries
share one reading order.

All examples run in one process and Plots keeps `theme`/`default` as global state, so the
Bose-Hubbard styling leaked into every example built after it; its font lacks the subscript
glyphs, breaking labels such as `Irrep[SU₂]`. Reset the Plots defaults before each example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lkdvos
lkdvos merged commit c53c30d into main Oct 13, 2026
1 of 6 checks passed
@lkdvos
lkdvos deleted the docs/examples-regroup branch October 13, 2026 17:29
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.

2 participants