Conversation
When testing HinderedRotor.get_enthalpy() method using a Fourier series potential in the quantum limit it calls get_enthalpy which in the quantum limit calls solve_schrodinger_equation which calls scipy.linalg.eig_banded(H, lower=True, eigvals_only=True, overwrite_a_band=True) There's a lengthy discussion in #1682 trying to track down the possibility of a bug. In the end they increased the tolerance on a test. Since nothing has changed recently, except some C libraries etc. on conda-forge, I propose taking the same approach, and relaxing the tolerance
mjohnson541
approved these changes
Jun 7, 2023
Contributor
mjohnson541
left a comment
There was a problem hiding this comment.
Yeah, I think this is fine.
Codecov Report
@@ Coverage Diff @@
## main #2457 +/- ##
==========================================
- Coverage 48.14% 48.12% -0.03%
==========================================
Files 110 110
Lines 30629 30629
Branches 7989 7989
==========================================
- Hits 14747 14739 -8
- Misses 14353 14363 +10
+ Partials 1529 1527 -2 see 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Motivation or Problem
When testing
HinderedRotor.get_enthalpy()method using a Fourier series potential in the quantum limit it callsget_enthalpywhich, in the quantum limit, callssolve_schrodinger_equation, which callsscipy.linalg.eig_banded(H, lower=True, eigvals_only=True, overwrite_a_band=True), which apparently now gives a subtly different answer, and the unit test fails.There's a lengthy discussion in #1682 trying to track down the possibility of a bug due to some gnarly numerical issues. In the end they increased the tolerance on a unit test.
Since nothing has changed recently relating to this code, except some C++ libraries on conda-forge that are used on the test runners, I propose taking the same approach, and relaxing the tolerance on the test. Maybe we're more accurate now than we used to be 🤷
Description of Changes
The tolerance in
test_get_enthalpy_quantum_fourierwas 0.1%. It's now 0.2%.Testing and Reviewer Tips
There's a deep dive at #1682.
The unit tests now pass on this branch.