Skip to content

[Breaking] Change the CFT data interface#171

Merged
VictorVanthilt merged 27 commits into
masterfrom
vv-CFTSTRUCT
Apr 21, 2026
Merged

[Breaking] Change the CFT data interface#171
VictorVanthilt merged 27 commits into
masterfrom
vv-CFTSTRUCT

Conversation

@VictorVanthilt
Copy link
Copy Markdown
Member

@VictorVanthilt VictorVanthilt commented Apr 20, 2026

This PR finally changes the CFT data interface to a unified interface.
It introduces a new struct: CFTData with two fields:

  • central_charge
  • scaling_dimensions

The scaling_dimensions field is a SectorVector, from TensorKit.jl, which has the nice feature that it can be indexed as if it were a vector (using scalar indexes, slices, ...), and also with sectors (e.g. Z2Irrep(0)).

The default shape of transfer matrix is now [sqrt(2), 2sqrt(2), 0], which is both cheap and good.
CFTData can be generated with:

CFTData(scheme) # defaults to [sqrt(2), 2sqrt(2), 0]
CFTData(scheme; shape=shape)
CFTData(scheme; shape=shape, trunc=trunc, truncentanglement=trunc)

where the last signature is used when the shape requires intermediate trunctation to manage comp. cost. (i.e. [1,8,1] and [4 / sqrt(10), 2 * sqrt(10), 2 / sqrt(10)])

The shapes implemented are:

  • [1, 1, 0] (trivial ED on a single traced partition function tensor, generates no central charge)
  • [sqrt(2), 2sqrt(2), 0]
  • [1, 4, 1]
  • [1, 8, 1] requires trunc and truncentanglement
  • [4 / sqrt(10), 2 * sqrt(10), 2 / sqrt(10)], requires trunc and truncentanglement

What is left to do is add some explanation about this to the documentation.

Comment thread src/utility/cft.jl Outdated
Comment thread src/utility/cft.jl
Co-authored-by: Boris De Vos <143942306+borisdevos@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 85.57692% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/utility/cft.jl 87.87% 12 Missing ⚠️
src/utility/finalize.jl 0.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/TNRKit.jl 100.00% <ø> (ø)
src/schemes/ctm/ctm_hotrg.jl 71.42% <100.00%> (+0.69%) ⬆️
src/schemes/ctm/ctm_trg.jl 82.95% <100.00%> (+1.23%) ⬆️
src/utility/finalize.jl 59.40% <0.00%> (+1.71%) ⬆️
src/utility/cft.jl 88.66% <87.87%> (+0.31%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@VictorVanthilt VictorVanthilt added the documentation Improvements or additions to documentation label Apr 21, 2026
@github-actions
Copy link
Copy Markdown

After the build completes, the updated documentation will be available here.

@VictorVanthilt VictorVanthilt merged commit 13c6d74 into master Apr 21, 2026
8 checks passed
@VictorVanthilt VictorVanthilt deleted the vv-CFTSTRUCT branch April 21, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants