perf: longer-range AC2_Hamiltonian improvements - #505
Merged
Conversation
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
lkdvos
marked this pull request as ready for review
August 6, 2026 01:17
borisdevos
approved these changes
Aug 6, 2026
This file contains hidden or 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
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.
This PR addresses some of the performance issues that got brought up recently for MPOs beyond nearest-neighbour.
D^2 V d^2before the finalD^2 d^4instead of the (better) intermediated^4 V.A concrete example of this last machinery is found by considering a longer-range term that ends on the right physicalspace. This has support in the first
Ablock, but then connects to the the secondBblock (and is already accounted for in the "AB" term). Nevertheless, this was still contributing a channel to the "AA" terms, needlessly increasing the MPO bond dimension on the most expensive contraction.I already had some machinery in place for detecting something similar, but was missing quite a few cases still, which mostly bites for hamiltonians that have a variety of terms that span ranges >2.