Skip to content

Refactor Fock basis construction - #278

Merged
mpmdean merged 2 commits into
EDRIXS:petsc_edrixsfrom
lajerm:basis_experimental
Aug 25, 2026
Merged

Refactor Fock basis construction#278
mpmdean merged 2 commits into
EDRIXS:petsc_edrixsfrom
lajerm:basis_experimental

Conversation

@lajerm

@lajerm lajerm commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

This refactors Fock-basis handling so that model setup returns compact
sector metadata rather than materializing the full basis.

Main changes:

  • move explicit and combinadic basis representations into fock_basis.py
  • defer basis realization to operator construction
  • support explicit/combinadic basis routes
  • support vanilla/Numba operator construction, with Numba opt-in
  • preserve historical EDRIXS basis ordering in the combinadic route
  • separate backend-independent operator kernels from backend-specific
    sparse-matrix assembly
  • let SciPy and PETSc independently control their matrix-construction
    and assembly policies
  • use bounded work ranges for PETSc construction instead of materializing
    the complete local sparse matrix before insertion
  • keep PETSc assembly policy isolated so that improved preallocation,
    MPI ownership, and GPU-specific construction can be added later
  • add numerical consistency tests across SciPy/PETSc,
    explicit/combinadic, and vanilla/Numba routes

Local test result:
389 passed, 3 skipped

@mpmdean

mpmdean commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

I'm happy for this to be merged.

@mpmdean
mpmdean requested a review from skarakuzu August 20, 2026 20:58
@mpmdean
mpmdean merged commit 0c38693 into EDRIXS:petsc_edrixs Aug 25, 2026
7 checks passed
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