Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0177ff5
remove unused function
VictorVanthilt Mar 18, 2026
e8f9e73
add initial implementation of `CFTData` struct
VictorVanthilt Mar 18, 2026
263adc4
Add TensorKit.SectorVector methods
VictorVanthilt Mar 19, 2026
30055f7
small changes
VictorVanthilt Mar 20, 2026
ded5495
Merge branch 'master' into vv-CFTSTRUCT
VictorVanthilt Mar 20, 2026
be2746d
seperate out repeated code
VictorVanthilt Mar 23, 2026
247cb16
add extra `SectorVector` functionality
VictorVanthilt Mar 23, 2026
39f5c79
add the possibility of a missing central charge
VictorVanthilt Apr 6, 2026
e7db650
Big overhaul to unified CFTData interface
VictorVanthilt Apr 20, 2026
e36e94c
Merge branch 'master' into vv-CFTSTRUCT
VictorVanthilt Apr 20, 2026
8b48b11
add ground state degeneracy functions back
VictorVanthilt Apr 20, 2026
dbcb3d8
add `CFT_Finalizer`
VictorVanthilt Apr 20, 2026
770cff1
change test params
VictorVanthilt Apr 20, 2026
6bec590
changing some more
VictorVanthilt Apr 20, 2026
a5c40cb
Merge branch 'master' into vv-CFTSTRUCT
VictorVanthilt Apr 20, 2026
154be77
fix kwarg in CFTData test
VictorVanthilt Apr 20, 2026
b566f49
export gs degeneracy related methods again
VictorVanthilt Apr 20, 2026
c2209e2
fix typo
VictorVanthilt Apr 20, 2026
36c632e
add extra Base.broadcasted implementation
VictorVanthilt Apr 20, 2026
27d6708
remove return_cft
VictorVanthilt Apr 20, 2026
e7408ba
Update src/utility/cft.jl
VictorVanthilt Apr 20, 2026
2eae773
cleanup
VictorVanthilt Apr 21, 2026
5ae7782
add small docs part about CFT data
VictorVanthilt Apr 21, 2026
e64ddaf
change error in path to cft docpage
VictorVanthilt Apr 21, 2026
48e79b4
tweak formatting
VictorVanthilt Apr 21, 2026
6afeb78
tweak formatting
VictorVanthilt Apr 21, 2026
ca35119
tweak formatting
VictorVanthilt Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ makedocs(;
pages = [
"Home" => "index.md"
"Library" => "lib/lib.md"
"CFT Data" => "cft.md"
"Finalizers" => "finalizers.md"
"References" => "references.md"
],
Expand Down
32 changes: 32 additions & 0 deletions docs/src/cft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Conformal Field Theory Data
TNRKit provides extensive tools for calculating conformal field theory data. Details about the implementation can be found in the TNRKit paper ([arxiv/2604.06922](https://arxiv.org/abs/2604.06922)).

The core idea behind calculating the central charge, scaling dimensions, and conformal spins, is to calculate the spectrum of the fixed point tensor on a tube geometry. There are different ways to put fixed point tensors on a tube and the geometry of this tube is characterised by 3 parameters:
$$[h, L, x]$$
Where $h$ is the height of the tube, $L$ is the circumference, and $x$ is the horizontal shift. The higher the ratio $\frac{L}{h}$, the higher the resolution but also the more expensive the calculation.

To calculate cft data we provide the `CFTData` struct which can be used in the following ways:

```julia
CFTData(scheme; shape=[h, L, x])
CFTData(T::TensorMap; kwargs...) # 1 fixed point tensor
CFTData(TA::TensorMap, TB::TensorMap; kwargs...) # 2x2 checkerboard unitcell
```

The shapes we provide are: $[1, 1, 0]$, $[\sqrt{2}, 2\sqrt{2}, 0]$, $[1, 4, 1]$, $[1, 8, 1]$, $[\frac{4}{\sqrt{10}}, 2 \sqrt{10}, \frac{2}{\sqrt{10}}]$

The last two of which require intermediate truncation steps, the parameters of which can be tuned by:
```julia
CFTData(scheme; shape=[1, 8, 1], trunc = trunc1, truncentanglement=trunc2)
```

# CFTData struct
The `CFTData` struct has two fields:
- `central_charge`
- `scaling_dimensions`

The `central_charge` can be either `missing` (when using the $[1, 1, 0]$ shape), or a number.
The `scaling_dimensions` field is a `SectorVector` from TensorKit.jl.

The `scaling_dimensions` can be indexed like an `AbstractVector` (i.e. with scalars, slices, ...), or with sectors (e.g. `Z2Irrep(0)`), which will provide the scaling dimensions associated with that sector/charge.
To check which sectors you can index the `scaling_dimensions` with you can use `keys(scaling_dimensions)`.
4 changes: 2 additions & 2 deletions src/TNRKit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ include("utility/free_energy.jl")
export free_energy

include("utility/cft.jl")
export cft_data, central_charge
export CFTData, central_charge

include("utility/gs_degeneracy.jl")
export ground_state_degeneracy, gu_wen_ratio

include("utility/finalize.jl")
export Finalizer, two_by_two_Finalizer, finalize!, finalize_two_by_two!, finalize_cftdata!, finalize_central_charge!,
finalize_groundstatedegeneracy!, GSDegeneracy_Finalizer, guwenratio_Finalizer
finalize_groundstatedegeneracy!, CFT_Finalizer, GSDegeneracy_Finalizer, guwenratio_Finalizer

include("utility/cdl.jl")
export cdl_tensor
Expand Down
14 changes: 3 additions & 11 deletions src/schemes/ctm/ctm_hotrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Corner Transfer Matrix environment + Higher-Order Tensor Renormalization Group
$(FUNCTIONNAME)(T, χenv[, ctm_iter=maxiter(2.0e4), ctm_tol=trivial_convcrit(1.0e-9), ctm_obc=false, χenv_ini=2])

### Running the algorithm
run!(::ctm_HOTRG, trunc::TruncationStrategy, criterion::stopcrit[, sweep=30, return_cft=false, inv=false, conv_criterion=1.0e-12])
run!(::ctm_HOTRG, trunc::TruncationStrategy, criterion::stopcrit[, sweep=30, inv=false, conv_criterion=1.0e-12])

### Fields

Expand Down Expand Up @@ -129,29 +129,21 @@ end

function run!(
scheme::ctm_HOTRG, trunc::TruncationStrategy, criterion::stopcrit;
sweep = 30, return_cft = false, inv = false, conv_criterion = 1.0e-12
sweep = 30, inv = false, conv_criterion = 1.0e-12
)
area = 1
lnz = 0.0
cft = []

for i in 1:(criterion.n)
area *= 4.0
tr_norm = step!(scheme, trunc; sweep = sweep, inv = inv)
if return_cft
push!(cft, cft_data(scheme; unitcell = 2))
end
lnz += log(tr_norm) / area
if abs(log(abs(tr_norm)) / area) <= conv_criterion
@info "CTM-HOTRG converged after $i iterations!"
break
end
end
if return_cft
return lnz, cft
else
return lnz
end
return lnz
end

function Base.show(io::IO, scheme::ctm_HOTRG)
Expand Down
13 changes: 2 additions & 11 deletions src/schemes/ctm/ctm_trg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Corner Transfer Matrix environment + Tensor Renormalization Group
$(FUNCTIONNAME)(T, χenv[, ctm_iter=2.0e4, ctm_tol=1.0e-9])

### Running the algorithm
run!(::ctm_TRG, trunc::TruncationStrategy, criterion::maxiter[, sweep=30, enlarge=true, return_cft=false, inv=false, conv_criterion=1.0e-12, modified=true])
run!(::ctm_TRG, trunc::TruncationStrategy, criterion::maxiter[, sweep=30, enlarge=true, inv=false, conv_criterion=1.0e-12, modified=true])

### Fields

Expand Down Expand Up @@ -167,36 +167,27 @@ function run!(
criterion::maxiter;
sweep = 30,
enlarge = true,
return_cft = false,
inv = false,
conv_criterion = 1.0e-12,
modified = true,
)
area = 1
lnz = 0.0
cft = []

steps = 0
crit = true
while crit
area *= 4.0
tr_norm = step!(scheme, trunc; sweep = sweep, enlarge = enlarge, inv = inv, modified)
lnz += log(tr_norm) / area
if return_cft
push!(cft, cft_data(scheme; unitcell = 2))
end
if abs(log(abs(tr_norm)) / area) <= conv_criterion
@info "CTM-TRG converged after $steps iterations"
break
end
steps += 1
crit = criterion(steps, nothing)
end
if return_cft
return lnz, cft
else
return lnz
end
return lnz
end

function Base.show(io::IO, scheme::ctm_TRG)
Expand Down
Loading
Loading