Skip to content

CFT spectrum for fermions#192

Open
Yue-Zhengyuan wants to merge 6 commits into
QuantumKitHub:masterfrom
Yue-Zhengyuan:fermion-cft-dev
Open

CFT spectrum for fermions#192
Yue-Zhengyuan wants to merge 6 commits into
QuantumKitHub:masterfrom
Yue-Zhengyuan:fermion-cft-dev

Conversation

@Yue-Zhengyuan

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

Copy link
Copy Markdown
Member

This PR adds the ability to calculate CFT spectrum for fermionic tensor networks. Closes #188.

  • Besides the symmetry charges, the spectrum is also divided by the boundary condition (or "spin structure" in the fancy language): PBC (Ramond) sector needs a twist when taking trace across the system, which is automatically added by @tensor; APBC (Neveu-Schwarz) sector does not need it, and is cancelled by an addition twist in transfer matrices. The identity field should be in the NS sector without additional symmetry charges.
  • The keys in the spectrum for fermions are (:NS, charge) and (:R, charge).
  • The 1+1D Kitaev chain of spinless fermions is added to test the implementation.

Secondary changes

  • run! interface for LoopTNR is now more flexible.
  • Base.vcat is implemented for StructuredVector to join CFT data from different spin structures.
  • Since structure in a StructuredVector is always of type Dict{K, Vector{Int}}, I removed one type parameter from both StructuredVector and CFTData.

TODO

  • [1, 1, 0] transfer matrix can now also handle fermions.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.43089% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/utility/transfer_matrix.jl 88.88% 8 Missing ⚠️
src/utility/structuredvector.jl 80.95% 4 Missing ⚠️
src/models/quantum_1D.jl 93.75% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/schemes/looptnr.jl 97.94% <100.00%> (-0.03%) ⬇️
src/utility/cft.jl 92.30% <100.00%> (+3.68%) ⬆️
src/models/quantum_1D.jl 93.47% <93.75%> (ø)
src/utility/structuredvector.jl 80.24% <80.95%> (+16.91%) ⬆️
src/utility/transfer_matrix.jl 88.23% <88.88%> (ø)

... and 2 files with indirect coverage changes

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

@VictorVanthilt VictorVanthilt marked this pull request as ready for review June 16, 2026 09:42
@VictorVanthilt VictorVanthilt marked this pull request as draft June 16, 2026 09:42

@VictorVanthilt VictorVanthilt left a comment

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.

Looks good already, I like the tuples for labeling the different spin structures. We need docs

@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as ready for review June 18, 2026 12:50
@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as draft June 19, 2026 05:36
Yue-Zhengyuan and others added 2 commits June 19, 2026 13:37
- Add Base.vcat(v1, v2) for StructuredVector: concatenates underlying data
  and merges sector-index dictionaries, shifting v2's indices by length(v1)
- Add Base.reduce(::typeof(vcat), ...) override: Julia Base's specialised
  reduce(::vcat, A) bypasses pairwise vcat and loses the container, so we
  delegate to foldl(vcat, A) instead
- Remove unused V type parameter from StructuredVector (always Vector{Int})
  and propagate the simplification to CFTData
- Extract _row_transfer_matrix helper in transfer_matrix.jl, used by the
  refactored _scaling_dimensions in cft.jl

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as ready for review June 19, 2026 06:40
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.

Sector labels in CFTData for fermions

2 participants