Skip to content

Reduce C4v breaking in time evolution (again)#388

Merged
Yue-Zhengyuan merged 9 commits into
QuantumKitHub:mainfrom
Yue-Zhengyuan:reduce-c4-breaking
May 27, 2026
Merged

Reduce C4v breaking in time evolution (again)#388
Yue-Zhengyuan merged 9 commits into
QuantumKitHub:mainfrom
Yue-Zhengyuan:reduce-c4-breaking

Conversation

@Yue-Zhengyuan
Copy link
Copy Markdown
Member

@Yue-Zhengyuan Yue-Zhengyuan commented May 25, 2026

This PR improves how NNN terms in the Hamiltonian are trotterized to reduce artificial C4v symmetry breaking in time evolution. Depends on #387.

  • The sites in an NNN 3-site gate MPO are now always put in counter clockwise order. This is equivalent to the old approach (Fix 3-site SU dt and reduce artificial C4v breaking #219) of rotating the PEPS/PEPO so that the gate can always act on the (say) southeast 3-site corner.
  • The order of the NNN 3-site gate MPO is changed: first act on the same corner of all plaquettes in the unitcell, and then change to gates on other corners.
  • In gate_to_mpo, the resulting MPO is put in Vidal gauge, and the norm of the gate is evenly distributed among the MPO tensors.

@GlebFedorovich You can try this out on J1-J2 (together with symmetrize_gates = true).

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/algorithms/time_evolution/trotter_gate.jl 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

)
vs = [CartesianIndex(0, 1), CartesianIndex(1, 0)]
for x in CartesianIndices(size(H)), v in vs
for v in vs, x in CartesianIndices(size(H))
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.

Do you think it would make sense or help to alter the ordering a bit more to use a more trotter-error-friendly approach, where we select an ordering based on what terms commute?
On a square lattice this is just even/odd + horizontal/vertical, giving us 4 classes of commuting terms.
It's not entirely obvious to me which order to use between the different classes, but in keeping with your current change it would be something like:

for v in vs # horizontal/vertical
    for x in CartesianIndices(size(H))
        iseven(x[horizontal ? 1 : 2]) || continue
        ....
    end
    for x in CartesianIndices(size(H))
        isodd(x[horizontal ? 1 : 2]) || continue
        ....
    end
end

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

select an ordering based on what terms commute

I feel this can be an even better approach. By "even/odd" I think you are referring to the A (x + y = even) and B (x + y = odd) sublattices?

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.

More or less, that boils down to the same thing indeed. I said even/odd to mean horizontal terms that start on even x or odd x, but you can stagger this for different rows too, that shouldn't matter

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added some additional logic to handle odd unit cell sizes, for which the bonds are divided into 3 groups in that direction.

Os = map(MPSKit.decompose_localmpo(MPSKit.add_util_leg(gate), trunc)) do O
return permute(O, ((1, 2, 3), (4,)))
end
# evenly distribute the (Inf) norm
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.

I would have expected that it makes more sense to normalize after going to the Vidal gauge?
Especially if you are using the Inf norm this seems more principled, since I don't think that one is invariant under unitary gauge transformations (which is also why I would simply use the 2-norm)

Copy link
Copy Markdown
Member Author

@Yue-Zhengyuan Yue-Zhengyuan May 26, 2026

Choose a reason for hiding this comment

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

Since the tensors in the middle of the gate MPO has larger size than the two at the beginning/end, I choose Inf norm to make the elements in all tensors have more or less the same magnitude. I'll normalize after going Vidal.

@Yue-Zhengyuan Yue-Zhengyuan requested a review from lkdvos May 26, 2026 07:25
@lkdvos
Copy link
Copy Markdown
Member

lkdvos commented May 26, 2026

Could you try and rebase/merge the main so it's slightly easier to compare? Otherwise looks good to me!

Comment thread src/algorithms/time_evolution/trotter_gate.jl Outdated
Copy link
Copy Markdown
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

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

Left a small final comment, otherwise good to go for me!

Co-authored-by: Lukas Devos <ldevos98@gmail.com>
@Yue-Zhengyuan
Copy link
Copy Markdown
Member Author

Well, hold on from merging... I want to further test order on NNN gate to improve C4v symmetry in NTU (there the two NNN gate acting on the same plaquette along two different diagonal directions still commute, so I have a larger freedom to change the order)

@Yue-Zhengyuan
Copy link
Copy Markdown
Member Author

Anyway, merge first and improve later.

@Yue-Zhengyuan Yue-Zhengyuan merged commit e910789 into QuantumKitHub:main May 27, 2026
65 checks passed
@Yue-Zhengyuan Yue-Zhengyuan deleted the reduce-c4-breaking branch May 27, 2026 02:20
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