Skip to content

Replace Nsymbol calls or add guards in fusion tree iteration - #515

Open
borisdevos wants to merge 1 commit into
mainfrom
bd/fusiontree-iterate
Open

Replace Nsymbol calls or add guards in fusion tree iteration#515
borisdevos wants to merge 1 commit into
mainfrom
bd/fusiontree-iterate

Conversation

@borisdevos

Copy link
Copy Markdown
Member

Deals with #514, at least partially.
Now we have

julia> Wis
(Vect[IsingBimodule]((1, 1, 0) => 1)  Vect[IsingBimodule]((1, 1, 0) => 1))  Vect[IsingBimodule]((2, 2, 0) => 1)

julia> blocksectors(Wis)
0-element Dictionaries.Indices{IsingBimodule}

which behaves the same way as

julia> Wu1
Rep[U₁](1 => 1)  (Rep[U₁](0 => 1)  Rep[U₁](0 => 1))

julia> blocksectors(Wu1)
0-element Dictionaries.Indices{U1Irrep}

@lkdvos lkdvos 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.

I do think this is probably quite a big performance hit right in the hot path of the fusiontree constructors though, I don't think there is typically a fast implementation of this. Additionally, I was kind of expecting to convert more things to Nsymbol, to actually make them error if the fusion is disallowed?

@borisdevos

Copy link
Copy Markdown
Member Author

I'm misunderstanding then what kind of behavior we want. So we want Nsymbol checks there, such that forbidden fusion trees shouldn't ever be able to be looked at? And then at the tensor construction level, when colors mismatch this should throw an error, thus preventing constructing forbidden tensors?

@lkdvos

lkdvos commented Aug 26, 2026

Copy link
Copy Markdown
Member

I think that was what I was expecting, especially since we decided Nsymbol errors instead of returning 0

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/fusiontrees/iterator.jl 98.83% <100.00%> (+0.59%) ⬆️

... and 42 files with indirect coverage changes

🚀 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.

2 participants