shuaigroup / Renormalizer

Quantum dynamics package based on tensor network states
https://shuaigroup.github.io/Renormalizer/
Apache License 2.0
52 stars 16 forks source link

a trick but greatly accelerate h_qc construction. #158

Closed jiangtong1000 closed 1 year ago

jiangtong1000 commented 1 year ago

When constructing the qc mpo, simply discard useless loops which are very time consuming by picking only non-zero integrals. Take the example of H-50 (100 spin orbitals), this trick speeds up thousands of times.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02% :tada:

Comparison is base (9583324) 84.79% compared to head (38c149d) 84.81%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #158 +/- ## ========================================== + Coverage 84.79% 84.81% +0.02% ========================================== Files 105 105 Lines 10183 10184 +1 ========================================== + Hits 8635 8638 +3 + Misses 1548 1546 -2 ``` | [Files Changed](https://app.codecov.io/gh/shuaigroup/Renormalizer/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shuaigroup) | Coverage Δ | | |---|---|---| | [renormalizer/model/h\_qc.py](https://app.codecov.io/gh/shuaigroup/Renormalizer/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shuaigroup#diff-cmVub3JtYWxpemVyL21vZGVsL2hfcWMucHk=) | `98.01% <100.00%> (+0.01%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/shuaigroup/Renormalizer/pull/158/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shuaigroup)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

liwt31 commented 1 year ago

Cool! Can we use a threshold such as 1e-12 rather than exactly 0? Since they are float numbers

jiangtong1000 commented 1 year ago

Cool! Can we use a threshold such as 1e-12 rather than exactly 0? Since they are float numbers

yea, but maybe it's better to let the screening of integrals happen outside the source code. (set by User)

liwt31 commented 1 year ago

Makes sense. LGTM, thanks!