Skip to content

Modular parameter for transfer matrices#187

Draft
Yue-Zhengyuan wants to merge 15 commits into
QuantumKitHub:masterfrom
Yue-Zhengyuan:cft-modular-param
Draft

Modular parameter for transfer matrices#187
Yue-Zhengyuan wants to merge 15 commits into
QuantumKitHub:masterfrom
Yue-Zhengyuan:cft-modular-param

Conversation

@Yue-Zhengyuan

@Yue-Zhengyuan Yue-Zhengyuan commented Jun 10, 2026

Copy link
Copy Markdown
Member

This PR adds ability to extract the modular parameter of the transfer matrices.

  • The most basic question is calculating the "elementary" modular parameter for a square (L x L) patch of the network, which is now included as an additional field of CFTData. This is done by the new function elementary_modular_parameter. If needed, I can write some explanation on how it works.
  • The correct modular parameter for the various transfer matrices ([1, 4, 1], [1, 8, 1], etc.) are calculated from the elementary τ0.

In particular, this resolves issues of extracting CFT data for anisotropic models whose elementary modular parameter is not equal to i (example: anisotropic Ising model). Thanks to @Chenqitrg for helpful discussions!

Remark

When τ0 ≠ i, the quartet [h, L, x, τ0] alone is actually not enough to fully determine the modular parameter of the transfer matrix. One also need to know its orientation.

There are four orientations which, in the isotropic case, are related by 90-degree rotations and therefore equivalent. But after we tilt the spacetime with non-isotropic τ0, the four orientations become different. For now we just accept that the orientation is implicitly determined by how we construct it in the code.

TODO

  • Currently "LoopTNR - 2D XY model" fails when O(2) symmetry is imposed. It appears to be due to an edge case not handled well by elementary_modular_parameter, producing an incorrect modular parameter.
  • Current tests only covers the free energy, central charge and scaling dimension. It would be better to include tests on conformal spins to ensure that both the imaginary and the real parts of the modular parameter are used correctly.
  • For anisotropic Ising, the theoretical value of τ0 for the fixed point tensor at $T_c$ (when the network is rotated by multiples of 180 degrees) is known to be $\tanh(2 J_x / T_c) / \tanh(2 J_y / T_c)$. I have confirmed this, but haven't included it in the tests.
  • For TRG/loop-TNR, one RG step rotates the network in counter-clockwise direction by 45/135 degrees (this difference annoys me - we may consider unify them in a follow up PR). One then knows that τ0 will be mapped to (τ₀ - 1) / (τ₀ + 1) (TRG) or (1 + τ₀) / (1 - τ₀) (loop-TNR). Again, this can be reproduced, but help is appreciated in adding it to the test.

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.84615% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/utility/cft.jl 78.84% 22 Missing ⚠️
Files with missing lines Coverage Δ
src/schemes/looptnr.jl 89.79% <ø> (-8.18%) ⬇️
src/schemes/trg.jl 91.66% <ø> (ø)
src/utility/cft.jl 61.13% <78.84%> (-27.48%) ⬇️

... and 26 files with indirect coverage changes

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

Comment thread src/utility/cft.jl
if shape == [1, 1, 0] # trivial implementation
τ0 = elementary_modular_parameter(T, T)
Δs = _scaling_dimensions(T, τ0)
return CFTData(missing, τ0, StructuredVector(Δs, Dict([Trivial => collect(eachindex(Δs))])))

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.

@VictorVanthilt eig_vals in _scaling_dimensions already returns a SectorVector with eigenvalues separated into sectors. Why are you mixing them up here?

@VictorVanthilt VictorVanthilt Jun 10, 2026

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.

Taking log, sorting and filtering is not supported by default for SectorVectors. In TNRKit v0.6.0 I added this functionality myself (thereby technically commiting type piracy). One issue with SectorVector is that it only allows for structures which are unitranges. The data for the different sectors cannot be stored interleaved into the data vector. This lead to some weird behaviour:
When calling sort on the scaling dimensions, the scaling dimensions would only be sorted within the different blocks corresponding to the different sectors. When you would then print these scaling dimensions for the ising model, the first non-zero element you would see is 1 and not 0.125 as the latter is in de Z2Irrep(1) block of the data.
To combat this, in TNRKit v0.7.0, I introduced StructuredVectors which have the same functionality as SectorVectors (they can be indexed with scalars and sectors) BUT they allow for the interleaving of the scaling dimensions in the data vector. The structures are allowed to be vectors of integers.

@VictorVanthilt

Copy link
Copy Markdown
Member

I find it quite hard to follow what's going on here, can you provide me with a (couple of) good reference(s) on this topic?

@Yue-Zhengyuan

Copy link
Copy Markdown
Member Author

I wrote a note here. It is inspired by a PhD thesis (not available online) of one of our former group member, but even there the details are not fleshed out clearly. If you think it's good we can add it to the package documentation.

I have also figured out the cause of test error with XY model:

  • In the KT phase, the second eigenvalue in the Trivial sector becomes small, causing numerical inaccuracies. I need to use the leading eigenvalue from another sector.
  • In the symmetric phase (c = 0), all eigenvalues of the four 2x2 transfer matrices are zero except the leading one. So the formula for τ doesn't work. In this case I we can only immediately return τ = i if we detected c = 0 (which can be recognized when the leading eigenvalues from the four 2x2 transfer matrices are almost equal - see the note for the reason).

@Yue-Zhengyuan

Copy link
Copy Markdown
Member Author

The XY case should now be fixed by using a better way to solve for τ, which now only need the leading eigenvalue from the transfer matrices. Actually, it can already extract the central charge as well. It is explained in my updated note.

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