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

Define sector_type #2

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Define sector_type #2

merged 4 commits into from
Dec 2, 2024

Conversation

ogauthe
Copy link
Contributor

@ogauthe ogauthe commented Nov 28, 2024

This PR introduces a new function sector_type as a high level method to access the sector type without relying on implementation details such as the existence of LabelledNumbers.jl. The objective is to use GradedUnitRanges.sector_type as a generic method to access sector for various types:

GradedUnitRanges.sector_type(S::Type{<:AbstractSector}) = S
GradedUnitRanges.sector_type(F::Type{<:FusionTree}) = ...
GradedUnitRanges.sector_type(FT::Type{<:FusionTensor}) = ...

To be decided:

  • currently sector_type errors for non-labelled axes. It may instead return NoLabel(), or a custom struct.
  • sector_type could also be defined inside SymmetrSectors, but I think it makes more sense here.

@ogauthe
Copy link
Contributor Author

ogauthe commented Nov 28, 2024

The tests are failing now due to an issue in LabelledNumbers. They will pass with ITensor/LabelledNumbers.jl#7.

@mtfishman mtfishman changed the title define sector_type Define sector_type Nov 29, 2024
@mtfishman
Copy link
Member

Thanks!

@mtfishman mtfishman merged commit ddb527e into ITensor:main Dec 2, 2024
6 checks passed
@ogauthe ogauthe deleted the sector_type branch December 2, 2024 16:49
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.

2 participants