-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add functionality of MPO with block diagonal form #154
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #154 +/- ##
==========================================
+ Coverage 84.76% 84.81% +0.05%
==========================================
Files 105 105
Lines 10140 10183 +43
==========================================
+ Hits 8595 8637 +42
- Misses 1545 1546 +1
☔ View full report in Codecov by Sentry. |
Excellent PR and many thanks to Jiace. |
Test already added. |
The new function looks good to me. Many thanks for your work! Meanwhile, personally speaking I prefer well-documented code, so maybe you could add new comments and make changes to the original ones accordingly. For example, the following line should contain the new class: Renormalizer/renormalizer/mps/gs.py Line 55 in 9706a29
|
Comments & types added |
Currently if one add two MPOs by
mpo = mpo1 + mpo2
it creates zeros at off-diagonal blocks. In case the final MPO is composed of many small MPOs the computational efficiency is slow. I'll probably add another PR later for diagonal potential MPO, in which case the final MPO is composed of a dense kinetic block and a diagonal potential MPO block.This pull request adds a
StackedMpo
class to improve the efficiency by calculating the Hamiltonians corresponding to each MPO part separately and then adding the Hamiltonians. It works for both the direct and iterative approach.Example: