Skip to content

[WIP] Add flux-canceling randn(sector, inds) constructors#230

Draft
mtfishman wants to merge 1 commit into
mainfrom
mf/flux-canceling-constructor
Draft

[WIP] Add flux-canceling randn(sector, inds) constructors#230
mtfishman wants to merge 1 commit into
mainfrom
mf/flux-canceling-constructor

Conversation

@mtfishman

Copy link
Copy Markdown
Member

Summary

Adds flux-canceling constructors randn/rand/zeros(c, codomain[, domain]) at the Index level, so an ITensor over graded (block-sparse) indices can be built carrying a nonzero total charge c. They mint a fresh auxiliary Index carrying c and forward to the map-shaped split constructor, appending the aux to the domain dangling last so the physical indices fuse to c. The sector may be a bare TensorKitSectors.Sector or a SectorRange. These live in a new ITensorBaseGradedArraysExt, since ITensorBase does not depend on the sector types.

Builds on ITensor/GradedArrays.jl#220 and ITensor/TensorAlgebra.jl#216.

TODO

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.19%. Comparing base (e4396ff) to head (d93ed75).

Files with missing lines Patch % Lines
ext/ITensorBaseGradedArraysExt.jl 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
- Coverage   77.88%   75.19%   -2.70%     
==========================================
  Files          29       29              
  Lines        1709     1701       -8     
==========================================
- Hits         1331     1279      -52     
- Misses        378      422      +44     
Flag Coverage Δ
docs 27.09% <0.00%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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.

1 participant