Skip to content

docs: content wave 1 (reference + how-to pages) - #449

Draft
lkdvos wants to merge 82 commits into
mainfrom
docs/content-wave1
Draft

docs: content wave 1 (reference + how-to pages)#449
lkdvos wants to merge 82 commits into
mainfrom
docs/content-wave1

Conversation

@lkdvos

@lkdvos lkdvos commented Jul 3, 2026

Copy link
Copy Markdown
Member

Wave 1 of the documentation restructure (per docs/RESTRUCTURE_PLAN.md).

Opening as a draft so the Documenter/Vitepress PR preview build runs and the new pages can be reviewed online. Once CI finishes, the preview is deployed to:

https://quantumkithub.github.io/MPSKit.jl/previews/PR449/

What's included

  • Reference (lib) pages — observables, bond_dimension, time_evolution, excitations (plus states/operators/groundstate/public via @autodocs)
  • How-to guides — building Hamiltonians, entanglement, observables, bond dimension, states
  • References — recent publications using MPSKit
  • Quasiparticle docstrings, markdown formatting pass (one sentence per line + Runic), and PR Controlled Bond Expansion: randomized SVD approach #438 review follow-ups on bond-expansion docstrings

Notes

  • All code blocks are @example/jldoctest and were verified against real MPSKit.
  • Physics claims that need maintainer sign-off are flagged with <!-- REVIEW: ... -->.

🤖 Generated with Claude Code

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

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/algorithms/correlators.jl 0.00% 1 Missing ⚠️
...c/algorithms/excitation/quasiparticleexcitation.jl 0.00% 1 Missing ⚠️
src/operators/windowhamiltonian.jl 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/algorithms/ED.jl 0.00% <ø> (-100.00%) ⬇️
src/algorithms/approximate/approximate.jl 0.00% <ø> (-56.00%) ⬇️
src/algorithms/changebonds/changebonds.jl 0.00% <ø> (-91.31%) ⬇️
src/algorithms/changebonds/optimalexpand.jl 0.00% <ø> (-98.86%) ⬇️
src/algorithms/changebonds/randexpand.jl 0.00% <ø> (-63.64%) ⬇️
src/algorithms/changebonds/sketchedexpand.jl 0.00% <ø> (-98.44%) ⬇️
src/algorithms/changebonds/svdcut.jl 58.10% <ø> (-31.09%) ⬇️
src/algorithms/changebonds/vumpssvd.jl 0.00% <ø> (-100.00%) ⬇️
src/algorithms/derivatives/mpo_derivatives.jl 0.00% <ø> (-72.54%) ⬇️
src/algorithms/excitation/chepigaansatz.jl 0.00% <ø> (-91.49%) ⬇️
... and 43 more

... and 30 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 and others added 24 commits July 27, 2026 15:37
Add the curated public-API contract page (grouped @ref links to the
canonical docstrings) and expand the Library nav section in make.jl to
hold the new per-category reference pages alongside the existing full
index (lib/lib.md, now anchored as @id lib_index). Content-neutral:
lib/lib.md stays the canonical @autodocs catch-all.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Category reference for the MPS state types via @docs; canonical=false
(canonical home remains lib/lib.md), mirroring the man/algorithms.md
convention. Quasiparticle types omitted pending docstrings (REVIEW flag).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Category reference for MPO and Hamiltonian types via @docs; canonical=false.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Category reference for the ground-state interface and algorithms via
@docs; canonical=false.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a how-to guide with runnable recipes for constructing FiniteMPS,
InfiniteMPS, WindowMPS, and MultilineMPS (random/initializer/element-type,
product states, from tensors, multi-site unit cells, and U(1)-symmetric
states), and introduce the How-to nav section in make.jl. All examples are
@example blocks verified by the full build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a how-to guide for inspecting, growing (RandExpand/OptimalExpand),
and reducing (SvdCut) bond dimension, truncation schemes, dynamic growth
via DMRG2/IDMRG2 and find_groundstate(...; trscheme), and algorithm
chaining with &. All examples verified by the full build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a how-to guide for local and multi-site expectation values
(expectation_value), two-point correlators (correlator, incl. range form),
full-MPO energies, and the energy variance convergence diagnostic. Wire the
page into the How-to nav. All examples verified by the full build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reflow prose to one sentence per line (semantic line breaks) and run the
Runic formatter over the Julia code blocks across the Wave 1 reference and
how-to pages. Whitespace/style only; no content or API changes, full build
still green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add 20 entries to the "Publications using MPSKit" list: 17 from the
append-candidates review plus 3 found via web search (staelens2026,
yang2026, zemlevskiy2026). Introduce a 2026 section and extend 2025.

- Verified every arXiv ID / DOI resolves to a real paper.
- Upgraded published preprints: vancraeynestdecuiper2026 to @Article
  (SciPost Phys. Lect. Notes 128); added arXiv eprints to the already
  published zong2026pseudogap, vandamme2025pseudogenerators, sommer2025.
- Flagged with % NOTE the entries whose MPSKit citation could not be
  independently confirmed (lu2026 cites it only in its bibliography).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…volution, excitations)

Category reference pages grouping the exported observables/analysis, bond-dimension,
time-evolution, and excitation docstrings via `@docs; canonical=false`, mirroring the
existing lib/ page structure. Every listed symbol verified exported with an attached
docstring against src/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two task-oriented how-to pages following the observables.md template:
- howto/hamiltonians.md: finite/infinite MPO Hamiltonians from local terms,
  boundary-condition conversion, and window Hamiltonians.
- howto/entanglement.md: entanglement entropy and spectrum from gauge tensors.
All @example blocks verified to execute against real MPSKit; physics claims flagged
with REVIEW for maintainer sign-off.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds howto/{hamiltonians,entanglement}.md to the How-to section and
lib/{bond_dimension,time_evolution,excitations,observables}.md to the Library section,
ordered to mirror the public API surface in lib/public.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Incorporate post-merge review feedback (docstring/wording only):
- changebond docstring: drop inaccurate "in place", "enriched" -> "expanded"
- OptimalExpand: reword "does not alter the state" -> "state-preserving"
  to avoid implying out-of-place operation
- TDVP: "enriches" -> "expands" the bond

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Apply the new docstring style guide (docs/DOCSTRING_STYLE.md) across all of
src/. Single-hash section headers, canonical section order and names
(`Keyword Arguments`, not `Keywords`), dash bullets with types only where
they earn their place, spaces around `=` in defaults and after commas in
type-parameter lists.

Templates applied:
- A1 (`@kwdef` algorithm/config structs): $(TYPEDEF) + # Fields via
  $(TYPEDFIELDS) + # See also naming the consuming driver(s) + # References.
- A2 (container/data types): $(TYPEDEF) + # Constructors + flat
  # Arguments/# Keyword Arguments + # Properties + # Notes.
- B (user-facing verbs): stacked signatures with -> returns, # Arguments,
  # Keyword Arguments, # Returns.

Also documents three previously-undocumented exports (find_groundstate!,
leftenv, rightenv) and adds <!-- REVIEW --> flags for pre-existing doc
inaccuracies surfaced during the sweep (non-existent Defaults.solver /
Defaults.trscheme references, MPOHamiltonian constructor signatures with no
matching methods) for maintainer follow-up.

Verified: MPSKit precompiles and the full doctest suite passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address the batch of accurate/verifiable REVIEW comments left throughout
the docs and package docstrings:

- MPOHamiltonian: retarget the docstring constructor signatures and example
  to the concrete FiniteMPOHamiltonian / InfiniteMPOHamiltonian entry points
  (the MPOHamiltonian(lattice, ...) methods do not exist).
- excitations umbrella docstring: drop the nonexistent `solver = Defaults.solver`
  default and the oversimplified FiniteExcited `init` default; describe the real
  forwarding/default behaviour.
- ChepigaAnsatz2: document the real field defaults
  (Arnoldi(; krylovdim=30, tol=1e-10, eager=true) and notrunc()).
- time_evolve / timestep: `alg` is a required positional argument, not
  defaulted to TDVP; correct both docstrings accordingly.
- Fix a used-before-assignment bug in the InfiniteMPO QuasiparticleAnsatz
  excitations method (EffectiveExcitationHamiltonian(H_eff, ...) -> H).
- observables reference page: surface the known source-status concerns for
  expectation_value(::MultilineMPS, ::MultilineMPO) and
  variance(::InfiniteQP, ::InfiniteMPOHamiltonian) as !!! warning admonitions.

Doctests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Maintainer-confirmed resolutions for the remaining REVIEW comments:

- hamiltonians.md: add a short TFIM description (X⊗X coupling, transverse
  field g along Z, quantum phase transition at g=1).
- observables.md / entanglement.md: drop the connected-correlator,
  area-law, and sector-spectrum REVIEWs, leaving the text neutral (no
  phase-dependent physical interpretation asserted).
- entanglement.md: replace the random-ψ∞ REVIEW with a !!! note clarifying
  it is not a converged ground state and pointing to find_groundstate.
- entanglement.md: drop the WindowMPS REVIEW after verifying
  entropy(::WindowMPS, site) runs.
- finite_envs.jl: drop the left/right environment REVIEWs; the wording
  matches the code (GRs[ind+1] contracts sites ind+1..end, gauge-compatible
  with the tensor at site ind, and mirror for leftenv).

No REVIEW comments remain in src/ or docs/src/. Doctests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…es, citation

- CHANGELOG.md now canonical at repo root (visible on GitHub); make.jl
  copies it into docs/src at build time, generated copy gitignored
- add CONTRIBUTING.md, issue templates (bug/question), PR template
- CITATION.cff bumped to v0.13.13 (tag date 2026-06-09)
- README gains a Citing section with BibTeX

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the bare auto-generated title list with a curated gallery:
difficulty ordering within each grouping, 1-2 sentence teasers stating
the physics question and MPSKit features showcased, and thumbnail
figures from the existing example outputs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The trailing CLOSING NOTES maintainer-comment blocks claimed the pages'
outputs were unverified and listed make.jl changes that have since
landed. All @example blocks in the three pages were re-verified to
execute end-to-end against the current package (32/32 pass, no code
changes needed).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lkdvos and others added 13 commits July 27, 2026 15:39
…tural)

Maintainer-confirmed and cleared the final physics-judgment flags:
- symmetry tutorial: g=2 symmetric GS, even/odd↔σˣ eigenstates, 8⊕8 block-sparsity
  speedup, paramagnetic single-spin-flip excitation, SU(2) multiplet gains
- quench tutorial: tracking ⟨σˣ⟩ (⟨σᶻ⟩=0 by unbroken symmetry), relaxation with
  oscillations, post-quench entanglement growth capping the time window
- structural: finite lazy vs infinite full gauge recompute; A=c·𝟙 → geometric/
  power-law couplings; Vₗ⊗P←P⊗Vᵣ planarity/fermion rationale; "no algorithm wins
  everywhere" framing

Only two non-physics notes remain (benchmark placeholder in index.md; a
future-worked-example TODO in howto/excitations). Also restored a blank line
before the gauge-freedom paragraph in matrix_product_states.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The home-page feature icons (finite-infinite, symmetry, algorithms,
fast) 404'd: they were referenced by absolute URL /assets/icons/*.svg,
but VitePress only serves absolute URLs from the public/ directory, and
DocumenterVitepress auto-copies only top-level logo*/favicon* files from
assets/ into public/ — so the icons/ subfolder was never published.

Introduce the idiomatic VitePress public/ dir (Documenter mirrors the
source tree, so docs/src/public/ lands at build/.documenter/public/,
served at root). Move logo.svg, favicon.ico, and icons/*.svg there
(creating src/public makes DocumenterVitepress skip its logo/favicon
auto-copy, so those move too) and point the frontmatter icons at
/icons/*.svg. logo_readme.svg stays in assets/ for the repo README.

Verified with a full make.jl build: all six assets resolve at the site
root and every index.html reference points to a real file.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…first

- concepts/symmetries.md: flagship symmetry concept page (abelian / non-abelian /
  fermionic / anyonic, sectors, "when does SU(2) pay off"); every @example verified
  against real MPSKit; 4 REVIEW flags left for maintainer physics review. Anyonic
  section points at the hard-hexagon Fibonacci example.
- examples gallery regrouped by computational task (groundstates / excitations /
  dynamics / statmech), replacing the quantum1d/classic2d split. Both make.jl files
  now auto-discover groups; Cache.toml re-keyed to new paths so the 10 existing
  examples are not rebuilt; embedded source paths + landing-page links updated.
- new excitations/1.su3-heisenberg example reproducing the SU(3) [3 0 0] Heisenberg
  chain (devos2022) via SUNRepresentations.jl (added to the shared examples env).
  Hamiltonian built by hand (Casimir identity); computed [210] dispersion minimum is
  at k=2π/3 but ~-0.04, not the paper's +0.0263 — flagged, not hardcoded, pending
  maintainer physics review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Completes the RESTRUCTURE_PLAN page tree. Each page was drafted against the real
API (grepped/confirmed in src/), every @example executed against MPSKit, and the
whole site verified with a full Documenter build (no broken @ref / checkdocs /
duplicate-canonical / @example errors). Uncertain physics is marked with REVIEW
comments for maintainer review.

Concepts:
- finite_vs_infinite.md — unit cells; per-site normalization (transfer-spectrum=1)
- numerics.md — truncation (truncrank/trunctol/truncerror), convergence criteria,
  precision, pitfalls; defaults sourced from src/utility/defaults.jl

How-to:
- convergence_troubleshooting.md — symptom→diagnostic→fix recipes (variance check,
  changebonds, algorithm mixing, unit-cell/sector diagnostics)
- statmech.md — transfer matrices, leading_boundary, MultilineMPS/MPO
- quasi_1d_geometries.md — cylinders/ladders via MPSKitModels; ordering choices
- saving_loading.md — stdlib Serialization + JLD2 round-trips (no bespoke MPSKit API)

Library:
- lib/environments.md, lib/internals.md — @docs canonical=false matching lib.md;
  internals marked non-public/unstable

Meta:
- migration.md, contributing.md, citing.md — grounded in CHANGELOG / CITATION.cff /
  Zenodo DOI / repo config (no invented facts)

All new pages wired into docs/make.jl nav.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- accept textbook-fact claims (D³ cost, area law, finite-entanglement scaling,
  SU(2) multiplet-reduction payoff) and clear their flags; clear the remaining
  source-verified wording flags across numerics, convergence, finite_vs_infinite,
  symmetries, statmech, saving_loading
- migration.md kept as a scaffold (changelog pointer); citing.md flags cleared
- SU(3) example reframed off the gap: retitled "The SU(3) Heisenberg chain" and
  explains the dispersion is not a variational bound because the ground state is
  not converged tightly enough; regenerated via examples/make.jl
- quasi_1d: document backandforth_pattern/frontandback_pattern as broken at
  MPSKitModels v0.4.7 (closure indexes a lazy iterator) plus the infinite-cylinder
  periodic-wrap caveat
- keep the two forward-looking TODO comments (index benchmark, excitations example)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After rebasing onto main (#452, sector-centered transfer spectrum):
- transfer_spectrum keyword `num_vals` was renamed to `howmany`
- correlation_length now returns a per-sector `SectorDict`; take the largest
  entry (`maximum(values(...))`) to recover the scalar correlation length the
  prose describes

Fixes the two @example blocks (convergence_troubleshooting, statmech) that used
the pre-#452 API. Full Documenter build is green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Track the planning documents that guided the docs overhaul:
RESTRUCTURE_PLAN.md (page tree + Diátaxis types, source of truth),
IMPROVEMENT_PLAN.md (accessibility/adoption workstreams W0–W6), and
REVIEW_SUMMARY.md (maintainer sign-off items from round 1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Distilled review (2026-07) of quimb, TeNPy, and ITensor docs, with
actionable items cross-referenced to RESTRUCTURE_PLAN.md. Companion to
IMPROVEMENT_PLAN.md; salvaged from the docs-inspiration worktree before
pruning it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add verbosity = 0 to the solver calls whose stderr logs leaked into four
rendered example pages: the per-momentum "Found excitations" notices
(hubbard, su3-heisenberg, haldane), the GradientGrassmann CG log (hubbard),
and the DMRG2 groundstate sweep log (xy-finiteT).

verbosity only controls logging, so computed results, plots and the
intentional "┌ Info: Groundstate energy" summaries are unchanged. The
obsolete log lines are stripped from the committed index.md artifacts (an
emptied excitations output block in hubbard is removed) and the same edits
are mirrored into the code-only main.ipynb notebooks, so the tree matches a
fresh build. bose-hubbard keeps its 2-line VUMPS convergence summary
(verbosity = 2) as an intentional healthy-convergence demonstration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…oss-refs

Add one-line descriptions to each lib/public.md category so it reads as a
curated surface instead of a bare symbol list, add a short "How MPSKit
compares" section to the README, and remove dead maintainer comments left
over from the restructure (a resolved TODO(link) cross-reference, now wired
via a real @id/@ref anchor on the examples gallery).
The example grew a bond of `FiniteMPS(ones(Float64, (ℂ^2)^4))` under
`H = ΣXX` and asserted the bond dimension goes 1 -> 2. That state is
|++++>, an exact eigenstate of every X⊗X term, so the two-site update
projected onto the orthogonal complement is structurally zero
(norm(g2) ~ 1e-16..1e-31). The old 1 -> 2 growth came from
`normalize!` rescaling that noise to unit norm before the truncated
SVD — precisely the pathology #464 fixed by skipping zero-content
bonds, which turned this doctest red.

Switch to `H = ΣZZ`, where |++++> has genuine expansion content
(norm(g2) = 4.0 on every bond) and the bond really does grow 1 -> 2.
Add a note documenting that bonds with no expansion content are left
untouched, using the ΣXX case as the illustration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The rebase onto main brought in docstrings written before the package-wide
standardization, which deviated from docs/DOCSTRING_STYLE.md:

- `AdaptiveKrylov`, `exact_diagonalization`, `MPSTensor`: `##`/`###` section
  headers and non-canonical spellings (`# Keyword arguments`) -> single-hash
  canonical names.
- `DMRG3S` was the only driver-consumed `Algorithm` struct not on template A1:
  convert its hand-written signature to `$(TYPEDEF)` + `# Constructors`, add
  `# Fields`/`$(TYPEDFIELDS)` with per-field doc strings, and a `# See also`
  naming `DMRG`.
- `LeftCanonical`/`RightCanonical`/`MixedCanonical`: add the missing
  `# See also` pointing at their driver `gaugefix!`.
- Trailing `See also [...]` prose -> a `# See also` section.
- `OperatorStyle`/`GeometryStyle`: `*` bullets -> `-`.
- Spaces around `=` for defaults and after commas in type parameter lists,
  in bullet entries and in signature blocks alike (25 sites).

Also adopt a blank line after every section header, package-wide (77
insertions across 30 files). The guide was silent on this and both styles
were in use; document the rule in the quick rules and the section-header
section, and fix templates A2 and B, whose snippets showed the other style.

Finally, replace SketchedExpand's inline "(Gleis et al. Phys. Rev. Lett. 130,
246402 (2023))" with a `# References` section citing a new `gleis2023`
bibliography entry, per the guide's rule that literature uses `@cite`.
Entry verified against Crossref and arXiv:2207.14712.

Full docs build green: doctests pass, no cross-reference or checkdocs errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every other key in mpskit.bib is lowercase author+year; `Hubig2015` was the
lone capitalized one. Rename it to `hubig2015` and update its single `@cite`
in the DMRG3S docstring. Docs build green; the reference renders with the
new anchor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lkdvos
lkdvos force-pushed the docs/content-wave1 branch from 62503ab to 2e45538 Compare July 27, 2026 23:08
Both regressions come from how DocumenterVitepress emits docstrings, and
neither is reachable from `make.jl`, so `src/.vitepress/config.mts` is now
vendored from the DVP template with two marked additions. `make.jl` hashes
the upstream template and warns when the copy needs re-syncing.

#477: Documenter rewrites every heading inside a docstring into a bold-only
paragraph (`recursive_heading_to_bold!`), so `# Constructors` arrives as
`<p><strong>Constructors</strong></p>` with no `<h*>` to style. A markdown-it
rule now tags exactly those paragraphs — scoped to docstring `<details>`
blocks and requiring the paragraph to be nothing but one `<strong>`, so a
paragraph merely starting with bold text is left alone — and `custom.css`
gives them heading treatment that does not rely on font weight alone.

The reason this only showed on Linux is a second bug: the DVP template heads
`--vp-font-family-base` with "Barlow"/"Inter var" but never loads either as a
webfont. macOS and Windows fall through to faces with real semibolds; Linux
resolves a fontconfig substitute where weight 600 reads as regular. The stack
is now upstream's minus the three families that are never available.

#478: VitePress splits a page into search documents at headings only, and a
docstring's anchor is an `<a id=...>` inside `<summary>`, so all 177
docstrings on `lib/lib` were indexed as a single document — no per-binding
entry, poor ranking against short manual sections, and hits that could only
link to the top of the page. A `search.options._render` hook rewrites each
summary into a heading for indexing only. The injected markup has to put the
title before the anchor: VitePress reads the section title from the text
preceding it, and an empty title makes it drop the section silently.

Verified on a full build: 298 headings tagged with no false positives and
none outside docstrings; search `documentCount` 389 -> 647, exactly the 258
docstrings, with `lib/lib` split into 178 deep-linkable sections.

Both fixes belong upstream in DocumenterVitepress; `UPSTREAM_DVP_NOTES.md`
records what the upstream patches should look like so the vendored config can
be dropped later.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lkdvos

lkdvos commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

@leburgel, any chance you can confirm this would resolve the two issues you brought up?

@leburgel

leburgel commented Jul 30, 2026

Copy link
Copy Markdown
Member

@leburgel, any chance you can confirm this would resolve the two issues you brought up?

The search issue seems to be resolved, which was definitely the most important one.

The docstring header issue improved a bit, but it's not quite solved. The custom jldocstring-heading specification is used correctly and shows the corresponding thin bottom border line. But the font weight is still not right for a <strong>...</strong> block, and the text still renders as plain instead of bold. When I inspect, I see the font weight of the strong block is 700, which should really be bold. So I have no idea what's going wrong, but I'm not sure if it's worth figuring out. The bottom border is enough to indicate the header, so I guess it's good enough.

@leburgel

Copy link
Copy Markdown
Member

Unrelated: it seems the warning and note blocks have lost quite a bit of their style compared to the way they look in standard documenter. This is quite unfortunate, the blocks here look quite a bit worse than they used to.

lkdvos and others added 2 commits July 30, 2026 12:18
Follow-up to the #477/#478 fixes, addressing review feedback on #449.

Bold still did not render bold. The remaining cause is VitePress' reset,
which sets `font-synthesis: style` on <body>: listing only `style` permits
synthetic oblique and *disables* synthetic bold, so wherever the resolved face
has no real bold, `font-weight: 700` computes correctly yet still paints at
regular weight. That is why the inspected weight looked right while the text
did not. Allowing weight synthesis fixes it for docstring headings and for
everything else subject to it — admonition titles, links inside callouts,
docstring binding names and inline <strong>.

Admonitions had lost their Documenter look for three compounding reasons:
VitePress custom blocks carry no icon, no title colour and a transparent
border; their title weight was subject to the same synthesis problem; and
DocumenterVitepress maps every `!!! note` onto the `tip` container, whose
dark-mode background its template overrides to a flat grey with dimmed text.
Restyled towards Documenter: accent-coloured bold title with the same
circle-exclamation icon, a 4px accent left rule, body text back at full
contrast, and tip backgrounds restated so notes keep their colour in the dark
theme. Everything is guarded by `:not(.jldocstring)`, since docstrings also
carry the `custom-block` class.

The note/tip distinction is deliberately not recovered. Both arrive as
`::: tip` and the only signal left is the title, which Documenter defaults to
"Note" — but 13 of this repo's 44 notes carry a custom title and are then
indistinguishable from a real `!!! tip`. Colouring only the recognisable ones
would be visibly inconsistent, so this waits on the upstream fix: VitePress
1.x has native `note`/`info` containers, making the remap obsolete.

UPSTREAM_DVP_NOTES.md records both findings alongside the existing two.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two corrections to UPSTREAM_DVP_NOTES.md after checking the upstream tracker.

The claim that VitePress 1.x ships native `note`/`important`/`caution` containers
is wrong. Its `containerPlugin` registers only `tip`, `info`, `warning`, `danger`
and `details`; the `.custom-block.note` and friends in its stylesheet belong to
GitHub-style `> [!NOTE]` alerts. Verified against `createMarkdownRenderer`:
`::: note Hello` comes out as a literal paragraph. So "stop remapping note to
tip" is not a workable upstream fix, and it is also why LuxDL#289 — which passes
every Documenter category straight through — cannot work as written. A fix has to
keep mapping onto a registered container while preserving the original category
for CSS, which is what LuxDL#288 and LuxDL#95 actually ask for.

Also records the existing upstream issues and PRs per area, so the search work in
LuxDL#385/#386 (MiniSearch tuning, orthogonal to our section splitting) and
LuxDL#384 (a much larger opt-in replacement) are not duplicated. The docstring
heading and font-synthesis findings appear to be unreported.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lkdvos added a commit that referenced this pull request Jul 30, 2026
`first(js) > i || @error "..."` only logged the problem and then let the function
continue into a contraction that is not the requested correlator, so an unordered
(or equal) site pair returned a meaningless number instead of failing. Make it an
`ArgumentError`, and document the ordering requirement in the docstring.

All three `correlator` signatures funnel their arguments through the range method,
so the test covers each of them.

Carved out of #449 to keep that PR documentation-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lkdvos added a commit that referenced this pull request Jul 30, 2026
`excitations(H::InfiniteMPO, ::QuasiparticleAnsatz, ϕ₀::InfiniteQP, lenvs, renvs)`
constructed its effective Hamiltonian as
`EffectiveExcitationHamiltonian(H_eff, lenvs, renvs, E)`. `H_eff` is the local being
assigned on that very line, so the read hit an uninitialized slot and every call through
this method threw `UndefVarError: H_eff not defined in local scope` — the path was dead
rather than silently wrong. The momentum entry point is unaffected, since for an
`MPO` it converts to a `MultilineMPO` and dispatches to the `MultilineQP` method.

The regression test uses the classical Ising transfer matrix rather than the six-vertex
model of the neighbouring testset: with the latter the quasiparticle eigenproblem is only
loosely converged (the eigenpair residual is ~1e-2 on both entry points), while for the
former the two entry points agree to ~1e-11.

Carved out of #449 to keep that PR documentation-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lkdvos added a commit that referenced this pull request Jul 30, 2026
`Base.isfinite(O::AbstractMPO) = isfinite(typeof(O))` requires every concrete operator
type to define the trait, and `WindowMPOHamiltonian` did not, so both `isfinite(H)` and
`isfinite(typeof(H))` threw a `MethodError`. A window Hamiltonian acts on a finite
number of sites, so the trait is `true`, matching how it otherwise behaves as a finite
Hamiltonian; it is spelled and placed like the `FiniteMPO(Hamiltonian)` definitions.

Carved out of #449 to keep that PR documentation-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lkdvos added a commit that referenced this pull request Jul 31, 2026
`first(js) > i || @error "..."` only logged the problem and then let the function
continue into a contraction that is not the requested correlator, so an unordered
(or equal) site pair returned a meaningless number instead of failing. Make it an
`ArgumentError`, and document the ordering requirement in the docstring.

All three `correlator` signatures funnel their arguments through the range method,
so the test covers each of them.

Carved out of #449 to keep that PR documentation-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lkdvos added a commit that referenced this pull request Jul 31, 2026
`excitations(H::InfiniteMPO, ::QuasiparticleAnsatz, ϕ₀::InfiniteQP, lenvs, renvs)`
constructed its effective Hamiltonian as
`EffectiveExcitationHamiltonian(H_eff, lenvs, renvs, E)`. `H_eff` is the local being
assigned on that very line, so the read hit an uninitialized slot and every call through
this method threw `UndefVarError: H_eff not defined in local scope` — the path was dead
rather than silently wrong. The momentum entry point is unaffected, since for an
`MPO` it converts to a `MultilineMPO` and dispatches to the `MultilineQP` method.

The regression test uses the classical Ising transfer matrix rather than the six-vertex
model of the neighbouring testset: with the latter the quasiparticle eigenproblem is only
loosely converged (the eigenpair residual is ~1e-2 on both entry points), while for the
former the two entry points agree to ~1e-11.

Carved out of #449 to keep that PR documentation-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lkdvos added a commit that referenced this pull request Jul 31, 2026
`Base.isfinite(O::AbstractMPO) = isfinite(typeof(O))` requires every concrete operator
type to define the trait, and `WindowMPOHamiltonian` did not, so both `isfinite(H)` and
`isfinite(typeof(H))` threw a `MethodError`. A window Hamiltonian acts on a finite
number of sites, so the trait is `true`, matching how it otherwise behaves as a finite
Hamiltonian; it is spelled and placed like the `FiniteMPO(Hamiltonian)` definitions.

Carved out of #449 to keep that PR documentation-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lkdvos added a commit that referenced this pull request Jul 31, 2026
* fix: `correlator` throws on unordered sites

`first(js) > i || @error "..."` only logged the problem and then let the function
continue into a contraction that is not the requested correlator, so an unordered
(or equal) site pair returned a meaningless number instead of failing. Make it an
`ArgumentError`, and document the ordering requirement in the docstring.

All three `correlator` signatures funnel their arguments through the range method,
so the test covers each of them.

Carved out of #449 to keep that PR documentation-only.

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

* fix: `excitations` on an `InfiniteMPO` with a quasiparticle input

`excitations(H::InfiniteMPO, ::QuasiparticleAnsatz, ϕ₀::InfiniteQP, lenvs, renvs)`
constructed its effective Hamiltonian as
`EffectiveExcitationHamiltonian(H_eff, lenvs, renvs, E)`. `H_eff` is the local being
assigned on that very line, so the read hit an uninitialized slot and every call through
this method threw `UndefVarError: H_eff not defined in local scope` — the path was dead
rather than silently wrong. The momentum entry point is unaffected, since for an
`MPO` it converts to a `MultilineMPO` and dispatches to the `MultilineQP` method.

The regression test uses the classical Ising transfer matrix rather than the six-vertex
model of the neighbouring testset: with the latter the quasiparticle eigenproblem is only
loosely converged (the eigenpair residual is ~1e-2 on both entry points), while for the
former the two entry points agree to ~1e-11.

Carved out of #449 to keep that PR documentation-only.

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

* fix: `isfinite` for `WindowMPOHamiltonian`

`Base.isfinite(O::AbstractMPO) = isfinite(typeof(O))` requires every concrete operator
type to define the trait, and `WindowMPOHamiltonian` did not, so both `isfinite(H)` and
`isfinite(typeof(H))` threw a `MethodError`. A window Hamiltonian acts on a finite
number of sites, so the trait is `true`, matching how it otherwise behaves as a finite
Hamiltonian; it is spelled and placed like the `FiniteMPO(Hamiltonian)` definitions.

Carved out of #449 to keep that PR documentation-only.

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

* shrink changelog

---------

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.

2 participants