Skip to content

Performance#64

Merged
JoeyT1994 merged 4 commits intomainfrom
Performance
Mar 31, 2026
Merged

Performance#64
JoeyT1994 merged 4 commits intomainfrom
Performance

Conversation

@JoeyT1994
Copy link
Copy Markdown
Owner

Cache contraction sequences to boost performance.

JoeyT1994 and others added 4 commits March 30, 2026 15:27
Memoize the optimal contraction sequence for each (vertex, edge) pair
during message updates, avoiding redundant calls to optimaltree which
accounted for ~50% of boundary MPS time. The cache is stored on the
BeliefPropagationCache and BoundaryMPSCache structs and is invalidated
via invalidate_contraction_sequences! when tensor dimensions change.

Also fixes a bug in sampling where stale cached sequences caused
incorrect density matrix contractions after state projection.

Version bump to 0.3.3.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@JoeyT1994 JoeyT1994 merged commit 900ea36 into main Mar 31, 2026
3 checks passed
@JoeyT1994 JoeyT1994 deleted the Performance branch March 31, 2026 15:02
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.

1 participant