-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: use the symmetric formula for S^2 Prior to this fix, the `AngularMomentum` operator was working on the assumption that the number of alpha-spin particles would always exceed the number of beta-spin particles (for non-singlet systems). However, this is not guaranteed to be the case. This commit fixes this problem by using a symmetric formula for S^2 which is the average of the two cases (alpha- vs. beta-spin particles exceeding the other). * feat: log a warning when the alpha-beta overlap is non-unitary When dealing with active spaces obtained from unrestricted-spin orbitals, the alpha-beta overlap matrix which is used to construct the S^2 operator can become non-unitary (for example, when the active set of alpha- and beta-spin orbitals do not span the same space). This can result in an <S^2> value measured on the active space that is largely different from (e.g.) the UHF <S^2> value. More importantly, when this is the case, the difference between these two <S^2> values is "hidden" in the inactive+inactive and inactive+active interactions. Especially when spin contamination is present, this can lead to vastly unexpected results and may indicate a poor choice of active space. * Add reno * test: add a regression test * fix: update warning tolerance * Linting and formatting * docs: fix verbatim in RST (cherry picked from commit 55e6776) Co-authored-by: Max Rossmannek <[email protected]>
- Loading branch information
1 parent
fb4bd65
commit 945f52d
Showing
3 changed files
with
79 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
10 changes: 10 additions & 0 deletions
10
releasenotes/notes/fix-angular-momentum-2-cebabde075b61a4e.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
features: | ||
- | | ||
The :meth:`.AngularMomentum.overlap` property will now warn the user, when | ||
this matrix is non-unitary. | ||
fixes: | ||
- | | ||
Fixes the :class:`.AngularMomentum` operator further to also support cases | ||
where the number of beta-spin particles exceeds the number of alpha-spin | ||
particles. |
This file contains 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