-
Notifications
You must be signed in to change notification settings - Fork 125
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
[ITensors] Tests for general fermionic H #1200
Conversation
@emstoudenmire this seems like an unfortunate duplication of code, and also introduces code that involves MPS/MPO into Can we combine into one testset in |
Relatedly, it would be nice to move the other fermion tests that make use of MPS/MPO functionality to |
Makes sense. I moved all of the MPS, MPO, and OpSum related tests from base/test_fermions.jl into either ITensorLegacyMPS/base/test_autompo.jl or a new file ITensorLegacyMPS/base/test_fermions.jl . It might be better to even move the tests in that new test_fermions.jl file into other existing files, but keeping them all together does help with things like not having to call ITensors.enable_auto_fermions() in multiple places. I definitely agree overall with the point about not testing AutoFermion too much through higher-level things like MPS algorithms. So probably some of those tests should be deleted eventually. But for now there are a few cases where certain issues, like the MPS(sites,state) product MPS constructor not putting in links with arrows in a very certain way, worked anyhow for every other non-fermionic case and only failed for fermions. However, it wasn't exactly a failure of the AutoFermion system per se, it's more that the new code there is now doing the most mathematically correct thing that would also be needed for cases like SU(2), but you can get away without it in every other situation we have right now (e.g. Abelian symmetries or complex tensors). |
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1200 +/- ##
===========================================
- Coverage 85.41% 54.55% -30.86%
===========================================
Files 88 87 -1
Lines 8426 8373 -53
===========================================
- Hits 7197 4568 -2629
- Misses 1229 3805 +2576 ☔ View full report in Codecov by Sentry. |
Thanks! |
We have not previously had a test for a very general type of fermionic Hamiltonian. This PR adds tests of a rather general H (actually not even assuming it is Hermitian) for both the usual OpSum system and with the auto fermion system enabled.