forked from quantumlib/OpenFermion-FQE
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests #17
Conversation
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
Collaborator
awhite862
commented
Jul 18, 2023
- Add tests for new Taylor evolution algorithm
- Update the reference wavefunction data in tests, so that the expansion is converged for dense operator evolution
- Additional tests (restore 100% line coverage)
- Properly treat the case of an empty FermionOperator/SparseHamiltonian (+test)
klgunst
approved these changes
Sep 12, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests pass.
Some warnings:
../../../../Codes/anaconda3/envs/fqe/lib/python3.9/site-packages/openfermion/hamiltonians/hartree_fock.py:11
/home/kgunst/Codes/anaconda3/envs/fqe/lib/python3.9/site-packages/openfermion/hamiltonians/hartree_fock.py:11: DeprecationWarning: Please use `OptimizeResult` from the `scipy.optimize` namespace, the `scipy.optimize.optimize` namespace is deprecated.
from scipy.optimize.optimize import OptimizeResult
tests/davidson_test.py: 119 warnings
/home/kgunst/qsimulate/software/devel/OpenFermion-FQE/src/fqe/algorithm/davidson.py:69: DeprecationWarning: `np.complex` is a deprecated alias for the builtin `complex`. To silence this warning, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if isinstance(val, (float, complex, np.complex128, np.complex)):
tests/low_rank_test.py::test_fqe_givens
tests/low_rank_test.py::test_charge_charge_evolution
tests/low_rank_test.py::test_double_factorization_trotter
/home/kgunst/Codes/anaconda3/envs/fqe/lib/python3.9/site-packages/scipy/sparse/_index.py:103: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
self._set_intXint(row, col, x.flat[0])
Code coverage shows a few branches never been taken: pytest --cov=fqe --cov-report=html:coverage --cov-branch
.
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.