Added SVD-based projective Wannierization API#146
Open
Alphaharrius wants to merge 2 commits into
Open
Conversation
- rename the momentum-space projection API to svd_projection - document the sectorwise SVD construction with step-by-step math - clarify how infer_lattice rebuilds the unit cell and Bloch space from source offsets - export the new API from qten.ops and update band tests - make Bloch-state matching keys use fractional offset tuples
Implement projective Wannierization as a thin wrapper around the Fourier transform and SVD projection workflow, with validation, lattice-inference support, and detailed API documentation. Add coverage for equivalence with explicit Fourier+SVD projection and for lattice inference when seed columns carry Hilbert labels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a documented SVD-based projection API for momentum-sector gauge alignment and builds a higher-level
proj_wannierization()helper on top of it.Together, these changes make the projective Wannierization workflow easier to call, better documented, and better tested, while also tightening the lattice-inference path used to rebuild Wannier-style output bases from source offsets.
What changed
svd_projection()as the explicit API for sectorwise gauge alignmentsvd_projection()fromqten.opsinfer_lattice=Truepath that rebuilds an output lattice from source-side offset labelsproj_wannierization()as a thin helper that performs:svd_projection()proj_wannierization()proj_wannierization()matches explicit Fourier-plus-SVD constructionWhy
This branch turns a lower-level projection workflow into a clearer public API surface.
At the lower level,
svd_projection()gives the momentum-sector projection logic a stable name, explains the underlying math, and makes the lattice-inference behavior more predictable and reviewable.At the higher level,
proj_wannierization()removes repeated boilerplate for the common workflow of taking localized trial orbitals, transforming them into momentum space, and using them to fix the gauge of a target band manifold.The fractional-coordinate matching change also makes the inferred Wannier construction less sensitive to symbolic ambient-space identity and better aligned with the intended geometric equivalence.
Testing
svd_projection()ignores zero-padded filled bands without spurious warningsinfer_lattice=Trueproj_wannierization()matches explicitfourier_transform(...)plussvd_projection(...)proj_wannierization()can return lattice-aware output when the seed columns carry Hilbert labelsNotes for reviewers
proj_wannierization()is intentionally a thin orchestration layer; the core numerical alignment remains centralized insvd_projection()