Skip to content

Conversation

@Yue-Zhengyuan
Copy link
Member

@Yue-Zhengyuan Yue-Zhengyuan commented Jul 7, 2025

This PR fixes same-row/column correlator for fermionic PEPS (issue #231). A new test file test/utility/correlator.jl is also added.

The problem was caused by some extra twists required by VUMPS, which should not be present for the evaluation of expectation values. In VUMPS, a column transfer matrix is constructed as follows (see e.g. Eq. A31 in SciPost Phys. 18, 012 (2025))

Screenshot 2025-07-07 at 16 17 48

Extra twists are required on the physical legs of the "bra" MPS in the bottom. In correlator it is replaced by the south-edge CTM tensor. However, when evaluating expectation values, there should be no twists in the network.

When calculating the numerator Vo (which contains the operator to be measured), the following function is called (the extra virtual leg in the operator MPO contributed one more leg to GL):

# transfer with excited GL
function MPSKit.transfer_left(
GL::GenericMPSTensor{S,4},
O::PEPSSandwich,
A::GenericMPSTensor{S,3},
::GenericMPSTensor{S,3},
) where {S}
@autoopt @tensor GL′[χ_SE D_E_above d_string D_E_below; χ_NE] :=
GL[χ_SW D_W_above d_string D_W_below; χ_NW] *
conj(Ā[χ_SW D_S_above D_S_below; χ_SE]) *
ket(O)[d; D_N_above D_E_above D_S_above D_W_above] *
conj(bra(O)[d; D_N_below D_E_below D_S_below D_W_below]) *
A[χ_NW D_N_above D_N_below; χ_NE]
end

This is a new function specifically added in #210 for correlator calculation, so there are no twists. However, when Vn is calculated, the following function is called:
function MPSKit.transfer_left(
GL::GenericMPSTensor{S,N},
O::Union{PEPSSandwich,PEPOSandwich},
A::GenericMPSTensor{S,N},
::GenericMPSTensor{S,N},
) where {S,N}
= twistdual(Ā, 2:N)
return _transfer_left(GL, O, A, Ā)
end

It is originally intended for VUMPS, so there are the aforementioned twists (added in #174). Thus the fix is to cancel the twists when calculating Vn (see added lines in src/algorithms/correlators.jl. Though one thing I'm uncertain is whether inverse twists should be used.

@Yue-Zhengyuan Yue-Zhengyuan requested a review from lkdvos July 7, 2025 08:33
@codecov
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/algorithms/correlators.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.

Copy link
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.

Great catch, thanks for fixing this!

@Yue-Zhengyuan Yue-Zhengyuan merged commit fdc9fc5 into QuantumKitHub:master Jul 8, 2025
43 of 45 checks passed
@Yue-Zhengyuan Yue-Zhengyuan deleted the fix-correlator branch July 8, 2025 06:57
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.

Mismatch between correlator and expectation_value for fermionic PEPS

2 participants