Skip to content

Refactor derivatives and add JordanMPOTensor#270

Merged
lkdvos merged 48 commits intomasterfrom
derivatives
Apr 7, 2025
Merged

Refactor derivatives and add JordanMPOTensor#270
lkdvos merged 48 commits intomasterfrom
derivatives

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Mar 31, 2025

This is quite a large refactor of the derivatives objects.

In particular, I rewrote the hamiltonian derivatives to make use of the particular Jordan block structure, which leads to very large speedups, especially for nearest-neighbor Hamiltonians.

While on the topic, I also immediately specialized a blocktensor type for this Jordan block structure, mostly so this information is stored at the type level, and we don't have to assume that the MPOTensors have the correct properties.

Finally, I also noticed that the SVD implementation is a lot slower than the SDD one, so I made this accessible from the relevant algorithms, and restored the default to SDD everywhere but in the Grassmann implementation. This might lead to spurious LAPACK errors again, but at least this can now be resolved by changing the settings.

In principle this could do with some more documentation, but this might be left for a dedicated docs update session...

@codecov
Copy link

codecov bot commented Mar 31, 2025

Copy link
Member

@VictorVanthilt VictorVanthilt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition to the code! I like the new drawings of the derivative operators, they make it way easier to spot which of the operators you need and what you are exactly calculating without having to reverse-engineer the contraction using the @Plansor call.

Is there a definitive answer as to how much faster the new JordanMPO derivatives make things like DMRG?

Copy link
Member

@leburgel leburgel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Left some comments, but nothing major.

@leburgel leburgel mentioned this pull request Apr 7, 2025
5 tasks
@lkdvos lkdvos merged commit 83cf3e6 into master Apr 7, 2025
27 of 28 checks passed
@lkdvos lkdvos deleted the derivatives branch April 7, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants