Skip to content

Despecialize the foreachblock machinery #494

Description

@lkdvos

Currently many of the kernels are already using foreachblock as a primitive to loop over all blocks. However, that primitive, as well as the blocks machinery still has to specialize on each symmetry type, as the sectors are used as keys to identify the blocks.
It could be interesting to play around with an alternative approach that bypasses this completely, and just refers to blocks as the 'nth' block, where n is defined as the TensorKitSectors.findindex. In that case, we can still compare, but since the Int is the same type for all symmetries, we could (hopefully) just (pre)compile a single method for all symmetry types.
(Used for all factorizations, projections, matrix functions, ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions