Fix RDM basis set rotation#1325
Conversation
RDM basis set rotations now use the conjugate of the rotation matrices. Added new tests that will fail if the old convention is used.
There was a problem hiding this comment.
Code Review
This pull request implements the rotate_basis method for the InteractionRDM class, which rotates its orbital basis using the conjugate of the provided rotation matrix. Additionally, it introduces unit tests to verify the basis rotation functionality and to confirm the invariance of expectation values under basis rotations. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
mhucka
left a comment
There was a problem hiding this comment.
Nice! Thank you for this.
This fixes #603, where RDM basis set rotations incorrectly used the same rotation matrices as operators instead of the conjugate.
The
rotate_basis()method is now overridden ininteraction_rdm.py.Added new tests that check the
rotate_basis()method and will fail if old convention is used.