Ran
|
Jobs
1
|
Files
165
|
Run time
11s
|
Badge
README BADGES
|
push
github
Fix the `AngularMomentum` (again) (#1292) (#1297) * 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 55e677672) Co-authored-by: Max Rossmannek <oss@zurich.ibm.com>
19 of 19 new or added lines in 1 file covered. (100.0%)
2 existing lines in 1 file now uncovered.8783 of 10122 relevant lines covered (86.77%)
0.87 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
2 |
83.47 |
-1.65% | qiskit_nature/second_q/drivers/psi4d/psi4driver.py |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 7084131258.1 | 165 |
86.77 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|