Skip to content

N-site Simple Update#339

Draft
Yue-Zhengyuan wants to merge 16 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:trotter-struct
Draft

N-site Simple Update#339
Yue-Zhengyuan wants to merge 16 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:trotter-struct

Conversation

@Yue-Zhengyuan
Copy link
Member

@Yue-Zhengyuan Yue-Zhengyuan commented Mar 4, 2026

This PR rewrites the 3-site simple update so that it can actually accept gate MPOs acting on an arbitrary open path along the nearest neighbor bonds. Closed paths (such as one acting on the four sites on an elementary plaquette) are not supported yet, since that requires PBC-MPS treatments.

I also introduced a wrapper struct TrotterGates, which stores the Trotter 1-site gates, 2-site gates, and MPOs as a vector of pairs sites => gate, where sites records the path on which gate.

I also make some improvements on how the gates and NNN 3-site MPOs are constructed from the Hamiltonian, so Hamiltonians with 1-site terms can also be used for simple update (previously I restricted them to only contain 2-site terms).

Another minor improvement is on the SU gauging by applying trivial gates. Now the trivial gate is never explicitly constructed and applied.

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 90.51095% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/algorithms/time_evolution/apply_gate.jl 55.00% 9 Missing ⚠️
src/algorithms/time_evolution/simpleupdate.jl 86.27% 7 Missing ⚠️
src/algorithms/time_evolution/trotter_gate.jl 93.20% 7 Missing ⚠️
src/algorithms/time_evolution/simpleupdate3site.jl 96.62% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/PEPSKit.jl 100.00% <ø> (ø)
src/algorithms/time_evolution/apply_mpo.jl 100.00% <ø> (ø)
src/algorithms/time_evolution/gaugefix_su.jl 88.00% <100.00%> (-2.33%) ⬇️
src/algorithms/time_evolution/time_evolve.jl 92.50% <100.00%> (+0.39%) ⬆️
src/algorithms/time_evolution/simpleupdate3site.jl 97.45% <96.62%> (-2.55%) ⬇️
src/algorithms/time_evolution/simpleupdate.jl 92.41% <86.27%> (-5.30%) ⬇️
src/algorithms/time_evolution/trotter_gate.jl 93.63% <93.20%> (-2.80%) ⬇️
src/algorithms/time_evolution/apply_gate.jl 82.45% <55.00%> (-17.55%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as draft March 4, 2026 08:12
@Yue-Zhengyuan Yue-Zhengyuan changed the title Introduce wrapper structs for Trotter NN gates and MPOs N-site Simple Update Mar 5, 2026
@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as ready for review March 5, 2026 09:41
@Yue-Zhengyuan Yue-Zhengyuan requested a review from lkdvos March 5, 2026 10:05
@Yue-Zhengyuan
Copy link
Member Author

I can think of at least one thing that can be improved.

For Hamiltonians including NNN terms, in the current construction of gate MPOs, it is assumed that there are NNN terms on all NNN bonds in the unit cell. But they don't need to be; examples are the Shastry-Sutherland lattice and the mapping from the Kagome lattice (#299). For these cases, the current design is effectively introducing some trivial NNN gates that need to be handled with the MPO approach.

A more universal way to Trotterize the Hamiltonian may be as follows. Iterate through all terms in the Hamiltonian LocalOperator:

  • When a 1-site term is encountered, apply the gate without truncation.
  • When an NN term is encountered, just apply the NN gate without decomposing it to MPO.
  • When a long-range term is encountered, convert it to gate MPO along all shortest Manhattan paths connecting the two sites.

This will correspond to a strict first-order Trotter decomposition.

On the other hand, if we organize terms into several groups and exponentiate the sum of each group, this can reduce the number of truncations in one cycle of update (though theoretically, the Trotter error may not reduce in this way). The problem is how to group terms can be very model-specific. The current way to group terms (in the function trotterize_nnn) is only optimized for models with nonzero terms on every NNN bond.

Similarly, even for NN Hamiltonians, I'm also grouping the one-site terms together with NN gates. For models I'm currently interested in, they either contain only NN terms, or have NNN terms for all NNN bonds. So I lacked the incentive to implement a more universal Trotterization algorithm.

@lkdvos Do you think it is better to aim for the general case? With all the changes that have been made, it is not difficult to do the generalization.

@Yue-Zhengyuan
Copy link
Member Author

Another somewhat related question is whether we want to restrict terms in LocalOperator so that terms acting on the same site should be merged into one.

@Yue-Zhengyuan Yue-Zhengyuan removed the request for review from lkdvos March 6, 2026 01:43
@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as draft March 6, 2026 01:43
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