Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs additions related to constructing a given symmetric TensorMap #105

Merged
merged 7 commits into from
Mar 20, 2024

Conversation

leburgel
Copy link
Contributor

@leburgel leburgel commented Mar 5, 2024

Some docs additions that should make it easier for users to find out how to construct symmetric TensorMaps corresponding to specific physical systems. In summary I:

  • Explicitly documented the fields of the FusionTree type, since these need to be accessed explicitly when assigning data slices labeled by splitting-fusion-tree pairs.
  • Documented the fusiontrees iterator generator, both in lib/sectors and lib/tensors.
  • Explicitly documented the fields of all exported Sector subtypes, since again these need to be accessed explicitly when assigning data slices.
  • Added docs for FermionNumber and FermionSpin.
  • Added docstrings for the TensorMap constructors to lib/tensors.
  • Documented the different flavors of getindex and setindex! for TensorMaps in lib/tensors.
  • Expanded the section on "tensor maps from existing data" in man/tensors to be a bit more explicit about the Heisenberg example.
  • Added a section in man/tensors on how to assign data slices after initializing a TensorMap, both by using block(::TensorMap, ::Sector) to assign the full matrix blocks, and using the setindex! syntax t[f₁::FusionTree, f₂::FusionTree] = v to assign slices of t labeled by splitting-fusion-tree pairs (f₁, f₂).

The changes to man/tensors might make it a bit physics-oriented, but since this example was already being used I didn't see much harm in making it more explicit like this. I anyway wouldn't know how to explain the splitting-fusion-tree slice assignment in any other way.

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.40%. Comparing base (ce96d55) to head (47ce41d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #105   +/-   ##
=======================================
  Coverage   81.40%   81.40%           
=======================================
  Files          42       42           
  Lines        5565     5565           
=======================================
  Hits         4530     4530           
  Misses       1035     1035           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docs/src/man/tensors.md Show resolved Hide resolved
docs/src/man/tensors.md Outdated Show resolved Hide resolved
src/sectors/fermions.jl Outdated Show resolved Hide resolved
src/tensors/abstracttensor.jl Outdated Show resolved Hide resolved
src/tensors/tensor.jl Outdated Show resolved Hide resolved
src/tensors/tensor.jl Outdated Show resolved Hide resolved
src/tensors/tensor.jl Outdated Show resolved Hide resolved
docs/src/man/tensors.md Outdated Show resolved Hide resolved
@Jutho
Copy link
Owner

Jutho commented Mar 17, 2024

Thanks; this looks great. I've added only a few minor comments.

@lkdvos
Copy link
Collaborator

lkdvos commented Mar 20, 2024

I think everything is addressed now, shall I merge?

@Jutho
Copy link
Owner

Jutho commented Mar 20, 2024

Yes, I had planned to do this yesterday but wanted to check with Lander whether this was ready and then somehow forgot.

@lkdvos lkdvos merged commit fa30dc7 into Jutho:master Mar 20, 2024
10 of 13 checks passed
@leburgel leburgel deleted the lb/docs_additions branch March 20, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants