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

First draft of FusionTensor #5

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open

First draft of FusionTensor #5

wants to merge 59 commits into from

Conversation

ogauthe
Copy link
Collaborator

@ogauthe ogauthe commented Dec 19, 2024

This PR provides a first draft for FusionTensors. It defines a generic interface to implement non-abelian symmetries. It currently supports O(2), SU(2), any abelian group defined in SymmetrySectors. It allows to construct, permute and contract tensors.

Work to be done in future PR:

  • remove FusedAxes, currently only used in FusionTensor initialization
  • handle dual in a more explicit way when fusing codomain and domain fusion trees
  • store unitary as a sparse matrix
  • improve caching of structural data
  • maybe improve detection of a charge block size
  • maybe moving Clebsch-Gordan tensor definition to SymmetrySectors

Work depending on other packages

@ogauthe
Copy link
Collaborator Author

ogauthe commented Dec 19, 2024

I have issues with building test both on local and on GitHub actions. Locally, I get an error

  LoadError: ArgumentError: Package LinearAlgebra not found in current path.

although the package is included in the Project.toml. I guess there was an issue with SafeTestsets configuration when I merged the new skeleton. @lkdvos do you have a clue?

@ogauthe
Copy link
Collaborator Author

ogauthe commented Jan 7, 2025

From reading the comments above, I see two problems with the current design:

  • length(::AbstractGradedUnitRange) does not match the size of the fusion tensor
  • data_matrix does not make explicitly the pairing between a sector and a matrix block

Independently, there is a question whether axes(::FusionTensor) should return a flat tuple or a tuple of 2 tuples.

I think length(::AbstractGradedUnitRange) should return the quantum dimension and not the number of multiplets. This means rewriting some parts of GradedUnitRanges, hopefully the change can be easily implemented now that AbstractGradedUnitRange is no more an alias for BlockedUnitRange. Then we would automatically have length.(axes(ft)) == size(ft). This could also play well with ITensor/SymmetrySectors.jl#4, where we already discussed changing blocklengths(::AbstractGradedUnitRange) behavior.

Concerning data_matrix, to me the cleanest would be to have a custom type to take into account the label. Something like

struct SymmetricDataMatrix <: AbstractBlockSparseMatrix
    matrix_blocks::Vector{Pair{AbstractSector,AbstractMatrix}}
    row_axis::AbstractGradedUnitRange
    column_axis::AbstractGradedUnitRange
end

which would act very similarly to the current data_matrix, but the quantum dimension of each block would be easier to access.

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