Repository navigation
docs(examples): regroup the gallery by computational task - #500
Conversation
|
After the build completes, the updated documentation will be available here |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
ba92131 to
ff58ac4
Compare
`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>
c4a3ede to
767b372
Compare
|
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 😉 |
|
|
||
| ### [Spin 1 Heisenberg model](groundstates/haldane-spt/index.md) | ||
|
|
||
|  |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
borisdevos
left a comment
There was a problem hiding this comment.
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!
…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>
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?