Skip to content

Use allocators for multi-site gates in simple update - #483

Merged
Yue-Zhengyuan merged 3 commits into
QuantumKitHub:mainfrom
Yue-Zhengyuan:su-3site-allocator
Nov 3, 2026
Merged

Yue-Zhengyuan merged 3 commits into
QuantumKitHub:mainfrom
Yue-Zhengyuan:su-3site-allocator

Conversation

@Yue-Zhengyuan

@Yue-Zhengyuan Yue-Zhengyuan commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

This PR allows simple update with multi-site MPO gates to select an allocator, following what @lkdvos did in #459 for nearest-neighbor gates.

There is another improvement on how an (OBC) gate applies on its two endpoints, similar to how we factor out reduced bond tensors before applying a nearest neighbor gate.

@Yue-Zhengyuan
Yue-Zhengyuan requested a review from lkdvos November 2, 2026 12:11

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall looks good to me!

@Yue-Zhengyuan

Copy link
Copy Markdown
Member Author

J1–J2 iPEPO simple-update benchmark

J1=1, J2=0.5, spin-1/2, unpurified iPEPO, Float64, 2×2 unit cell, and Δβ=0.01.
One full su_iter dt sweep contains 8 nearest-neighbor gates and 16 three-site MPO gates, applied on both physical legs.
Timings below are the minimum of 5 samples per implementation, with one complete SU dt step per sample.
main is aa1392e2; branch is 11b27b85 (su-3site-allocator).

Case Time main Time branch Speedup Memory main → branch
J1–J2 iPEPO / Trivial / D7 217.2 ms 192.9 ms 1.13× 553.2 → 190.0 MiB
J1–J2 iPEPO / Trivial / D11 804.4 ms 641.3 ms 1.25× 3278.9 → 1064.7 MiB
J1–J2 iPEPO / U1Irrep / D7 69.9 ms 54.6 ms 1.28× 186.6 → 82.7 MiB
J1–J2 iPEPO / U1Irrep / D11 320.5 ms 275.8 ms 1.16× 932.5 → 341.3 MiB
J1–J2 iPEPO / SU2Irrep / D7 47.8 ms 40.1 ms 1.19× 42.9 → 30.6 MiB
J1–J2 iPEPO / SU2Irrep / D11 69.6 ms 57.5 ms 1.21× 174.1 → 88.0 MiB

The measured speedup is modest, around 1.13–1.28×, corresponding to roughly 11–22% less elapsed time.

The saving is mainly on total allocated bytes, which fall by about 29–68%, depending on the symmetry and D. Although allocation counts rise slightly (about 2–5%).

Symmetry charges on virtual spaces

Symmetry D Charges
U1Irrep 7 Rep[U₁](0 => 3, 1 => 2, -1 => 2)
U1Irrep 11 Rep[U₁](0 => 5, 1 => 3, -1 => 3)
SU2Irrep 7 Rep[SU₂](0 => 1, 1 => 2)
SU2Irrep 11 Rep[SU₂](0 => 2, 1 => 3)

@lkdvos Looks good?

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Definitely okay for me, do we need to check the buildkite failures or were they already there?

@Yue-Zhengyuan

Copy link
Copy Markdown
Member Author

Should be irrelevant to this PR. The failure also occurs in @kshyatt's several other PRs; maybe due to recent release of TensorKit 0.17.3?

@Yue-Zhengyuan
Yue-Zhengyuan merged commit 7390dcb into QuantumKitHub:main Nov 3, 2026
31 of 32 checks passed
@Yue-Zhengyuan
Yue-Zhengyuan deleted the su-3site-allocator branch November 3, 2026 02:59
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.

2 participants