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

Support for tensors with general index symmetries #153

Open
Krzmbrzl opened this issue Nov 8, 2023 · 0 comments
Open

Support for tensors with general index symmetries #153

Krzmbrzl opened this issue Nov 8, 2023 · 0 comments

Comments

@Krzmbrzl
Copy link
Collaborator

Krzmbrzl commented Nov 8, 2023

Currently, SeQuant's Tensors can only have a defined set of index symmetries:

  • permutational symmetry within an index group (bra/ket) - symm, antisymm or nonsymm
  • bra-ket symmetry (symmetry under time reversal / taking the adjoint of the corresponding operator) - symm, conjugate and nonsymm
  • particle symmetry (exchange of two index "columns" in tensorial notation) - symm or nonsymm

These symmetries seem sufficient for describing (most) base tensors (two-electron integrals, amplitudes, etc.), but can end up restricting what kind of intermediate tensors can be represented. Consider for instance

I{a_1,i_4;i_1,i_2} = t{a_1;i_3}  g{i_3,i_4;i_1,i_2}

which has only antisymmetric w.r.t. i_1<->i_2, but not w.r.t. a_1<->i_4. Therefore, labelling the tensor as having antisymmetric indices would be wrong, but so would declaring them as non-symmetric.
However, this fine-grained symmetry information is necessary in order to be able to e.g. properly spintrace this tensor and also to correctly canonicalize it.

Therefore, it would seem that having a set of pre-defined symmetries limits the more general applicability of Tensor objects.


Possible workarounds to represent such an intermediate currently:

  • Using the expression tree to encode precedence (representing the intermediate as a nested Product object). This avoids having to introduce an explicit tensor representing the intermediate, but is also at risk of being flattened somewhere during further processing (at which point the precedence information is gone)

A possible solution of this issue would be to explicitly represent the index symmetries of a tensor by an actual permutation group. For this, we could make use of this library that I have written already: https://github.com/Krzmbrzl/libPerm
Such an approach would makes the current labels redundant and instead one could create query-methods like isParticleSymmetric() etc. However, with this we would be able to represent all possible index symmetries (as long as they form a finite group) for tensors.

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

No branches or pull requests

1 participant