Skip to content

Conversation

Copy link

Copilot AI commented Dec 17, 2025

Renamed project_eigenvectors in dyson/util/linalg.py to better reflect its purpose: constructing a biorthonormal basis spanning physical (Dyson orbitals) and auxiliary (null space) spaces, then rotating eigenvectors into that basis.

Changes

  • Function rename: project_eigenvectorsrotate_to_physical_auxiliary_basis

    • Follows naming pattern of similar functions (rotate_subspace, set_subspace)
    • Explicitly describes the transformation and target basis
  • Enhanced docstring:

    • Step-by-step procedure for Hermitian vs non-Hermitian cases
    • Shape specifications for all parameters and return values
    • Mathematical context: physical space (bra/ket Dyson orbitals) vs auxiliary space (null space of projector)
  • Updated call sites: spectral.py, exact.py, davidson.py, util/__init__.py

Example

# Hermitian system - constructs rotation from physical+auxiliary basis
eigvecs = util.rotate_to_physical_auxiliary_basis(
    eigvecs, bra, ket=None
)

# Non-Hermitian system - biorthonormalizes before rotating
eigvecs = util.rotate_to_physical_auxiliary_basis(
    eigvecs, bra, ket
)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…h improved docstring

Co-authored-by: obackhouse <34662120+obackhouse@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix function naming and documentation for Spectral Rename project_eigenvectors to rotate_to_physical_auxiliary_basis with improved documentation Dec 17, 2025
Copilot AI requested a review from obackhouse December 17, 2025 18:57
@obackhouse obackhouse closed this Jan 27, 2026
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