Skip to content

Documentation overhaul#61

Open
lkdvos wants to merge 14 commits into
mainfrom
ld-docs
Open

Documentation overhaul#61
lkdvos wants to merge 14 commits into
mainfrom
ld-docs

Conversation

@lkdvos
Copy link
Copy Markdown
Member

@lkdvos lkdvos commented Jan 30, 2026

This is ongoing work to start properly documenting this package.
It is based on the work in TensorKit, credits go to @Jutho for that.

The docs now consist of two large parts: The first part defines the interface of Sector, while the second is a list of the concrete types provided by this package.

I think the first part fixes #56 and is somewhat ready for review.
I am pretty happy with the general lay-out, but comments are obviously more than welcome.
Many of the formulas will require checking for errors, I have been doing this on the side while waiting for other PRs, so many things will have slipped my full attention.

For the second part, (related to #57) I for now only filled out the SU2Irrep page in an attempt to show what I had in mind to document the different conventions. Before I continue with the rest (or others can chime in), I wanted to get a round of review in.

@lkdvos lkdvos added the documentation Improvements or additions to documentation label Jan 30, 2026
@lkdvos lkdvos linked an issue Jan 30, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/irreps/su2irrep.jl 100.00% <ø> (ø)
src/sectors.jl 94.03% <100.00%> (-0.36%) ⬇️

... and 2 files with indirect coverage changes

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

@Jutho
Copy link
Copy Markdown
Member

Jutho commented Jan 30, 2026

Starts to look great; this will be a very useful addition.

Comment thread src/sectors.jl Outdated
Comment thread src/sectors.jl Outdated
Comment thread docs/src/interface/overview.md Outdated
Comment thread docs/src/interface/overview.md Outdated
Comment thread docs/src/interface/required.md Outdated
Comment thread docs/src/interface/required.md Outdated
Comment thread docs/src/interface/required.md Outdated
```math
\sum_g R^{ab}_g F^{abx}_{cg} R^{ax}_c = \sum_{f,h} F^{bax}_{cf} R^{af}_h F^{axb}_{ch}
```
and the analogous equation with ``a`` and ``b`` swapped.
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.

There's more to it than just swapping a and b, but it's probably not worth going into it. Maybe meet halfway and say something about over- and underbraiding?

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.

yeah, although I guess I really just need to sit down and put some actual figures together 😢

Comment thread docs/src/interface/required.md Outdated
Comment thread docs/src/interface/optional.md
Comment thread docs/src/interface/optional.md
Comment thread docs/src/interface/optional.md Outdated
Comment thread docs/src/interface/guidelines.md Outdated
Comment thread docs/src/interface/guidelines.md
Comment thread docs/src/interface/guidelines.md Outdated
Comment thread docs/src/sectors.md
| [`FermionNumber`](@ref) | fU₁ | Unique | Fermionic | Yes | Fermion number conservation |
| [`FermionSpin`](@ref) | fSU₂ | Simple | Fermionic | Yes | Fermions with spin symmetry |
| [`ProductSector`](@ref) | Product categories | Varies | Varies | Varies | Multiple simultaneous symmetries |
| [`TimeReversed`](@ref) | Inverted braiding | Varies | Varies | Varies | ?? |
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.

Symmetries of the bra state or Drinfeld centers of modular tensor categories are what I can come up with on the spot

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 also wonder if the last column is really useful, but I guess it doesn't hurt to mention?

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.

I'm not even sure if this table is all that useful to begin with, but copilot generated it and I like how it looks...

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.

While this might look more scary, I would say the categories are Rep[SU₂] and so forth instead of simply SU₂. Or maybe something like SU₂ representations to make it more colloquial.

Comment thread docs/src/sectors/nonabelian/su2.md
@borisdevos
Copy link
Copy Markdown
Member

Overall amazing work! The pages are pretty short, so I'm wondering if it's beneficial to have this depth to the headers?

Also, do you think these docs should also mention the other packages supporting Sectors, like SUNRepresentations, CategoryData and QWignerSymbols?

Comment thread docs/src/interface/required.md Outdated
Comment thread src/sectors.jl Outdated
@borisdevos
Copy link
Copy Markdown
Member

If we're happy with the current style of the SU2Irrep page, maybe I can help fill in the other pages? It'd be nice to have this available asap, as I've already referred to this PR as documentation twice the past months :)

@lkdvos
Copy link
Copy Markdown
Member Author

lkdvos commented May 28, 2026

I've rebased and cleaned up the git history slightly to make it a bit easier to work with. I think I am quite happy with the style of the SU2Irrep page, so if you have time and motivation, definitely feel free to work on this PR/branch!

lkdvos and others added 7 commits May 28, 2026 11:48
Adds the documentation plan, top-level make.jl with the full page navigation
(home, sector interface subsection, sector types subsection, library), the
index page formatting tweak, the sector overview summary table, the sector
interface introduction page, and template pages for every concrete sector
type (abelian, anyon, composite, fermionic, non-abelian).
Adds the required-methods page (set-of-sectors enumeration, fusion structure,
identity/duality, associativity, braiding, utility methods) and rewrites the
corresponding docstrings on ⊗, Nsymbol, sqrtdim, and invsqrtdim with explicit
return-type guarantees and cross-references to FusionStyle.

Co-authored-by: Boris De Vos <143942306+borisdevos@users.noreply.github.com>
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
Adds the optional-methods page (quantum dimensions, Frobenius-Schur, scalar
type, derived topological data, optional fusion-tensor methods) and corrects
frobenius_schur_indicator to compare against dual(a) instead of conj(a).

Co-authored-by: Boris De Vos <143942306+borisdevos@users.noreply.github.com>
Adds the traits-and-styles page covering FusionStyle, BraidingStyle, and
UnitStyle, with jldoctest examples for the & combinator. Rewrites the
corresponding docstrings on FusionStyle (and UniqueFusion / MultipleFusion /
SimpleFusion / GenericFusion / MultiplicityFreeFusion), UnitStyle (and
SimpleUnit / GenericUnit), and BraidingStyle (and HasBraiding / NoBraiding /
SymmetricBraiding / Bosonic / Fermionic / Anyonic) so each subtype has its
own docstring.
Adds the guidelines page covering shape of topological data, multiplicity-
free vs generic fusion, the & combinator pattern, and how to use the
FusionStyle/BraidingStyle dispatch when implementing a new sector.

Co-authored-by: Boris De Vos <143942306+borisdevos@users.noreply.github.com>
Adds the SU2Irrep page with fusion rules, F-symbols, Clebsch-Gordan
coefficients, and worked examples (depending on TensorOperations). Tightens
the SU2Irrep docstring (typo and rewording).
Adds a GitHub Action that posts the Documenter preview URL as a comment on
pull requests.
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.

[Docs] Explain Sector interface in documentation

3 participants