Skip to content

feat: add left-hand-side symmetry reduction - #95

Open
RHSong wants to merge 1 commit into
DrudgeCAS:masterfrom
RHSong:lhs-symmetry-codegen
Open

RHSong wants to merge 1 commit into
DrudgeCAS:masterfrom
RHSong:lhs-symmetry-codegen

Conversation

@RHSong

@RHSong RHSong commented Sep 18, 2026

Copy link
Copy Markdown

Summary

  • Expose permutation-group element enumeration and group order.
  • Add public symmetry lookup through Drudge.get_symm.
  • Add symmetry reduction and assembly for tensor definitions.
  • Add term-level external-index permutation and orbit-representative utilities.
  • Validate that declared LHS symmetries preserve external-index ranges and reconstruct the original definition.
  • Use disjoint occupied and virtual bounds in particle-hole drudges, allowing full orbital tensors to be sliced correctly during code generation.
  • Add tests for group enumeration, symmetry reduction, reconstruction, invalid symmetry declarations, and seed naming.

This PR provides the Drudge-side support needed for symmetry-aware contraction optimization and code generation. It is separate from PR #84 and contains no mixed fermion-boson or electron-phonon Drudge changes.

A companion Gristmill PR will use these interfaces to:

  • optimize only a symmetry-unique seed of the output tensor;
  • reconstruct the complete output using inexpensive permutation operations;
  • generate blockwise einsum code;
  • generate BLAS-based Fortran code.

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.

1 participant