Skip to content

More rigorous testing of braided categories#59

Open
borisdevos wants to merge 15 commits intomainfrom
bd/braiding
Open

More rigorous testing of braided categories#59
borisdevos wants to merge 15 commits intomainfrom
bd/braiding

Conversation

@borisdevos
Copy link
Member

Here I address #58, as well as check the two ways one can perform an Artin braid.

ZNElement{p} for p != 0 has (temporarily) been set to not be braided, since these sectors definitely fail the additional tests. Surprisingly, it passes the hexagons, but fails already starting at the ribbon condition. I'm not too sure how to proceed with this, as it's apparently not easy to find a solution to the R-symbols which fulfills all the conditions.

I tested SUNRepresentations up to N = 5 and CategoryData for these tests locally. Surprisingly, there are some braided categories in the latter which don't satisfy the Artin braid equality. The rest is fine.

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks amazing, thanks for getting this going!

I was wondering if there would be any way to document the checks we are performing, even if it is just with a math rendition of the actual equations that have to be fulfilled?
For example these could be attached to the @testsuite calls, simply to help future us understand what is going on.

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/sectors.jl 89.28% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/groupelements.jl 81.66% <100.00%> (-1.15%) ⬇️
src/sectors.jl 90.41% <89.28%> (+1.01%) ⬆️

... and 1 file with indirect coverage changes

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

end
end

# https://ncatlab.org/nlab/files/DelaneyModularTensorCategories.pdf#page=9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That table seems extremely useful indeed.

src/sectors.jl Outdated
F2, F3 = Fsymbol(c, a, b, d, e, g), Fsymbol(a, b, c, d, g, f)
p2_o += F2 * R3 * F3
if !symmetricbraiding
p2_u += F2 * conj(R3) * F3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the R for the underbraiding be conj(Rsymbol(g, c, d)) instead of simply conjugating R3=Rsymbol(c, g, d) ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's indeed what you'd expect for general unitary braided fusion categories. I just checked and it turns out that all the braided categories in TKS are invariant under the order of a and b in Rsymbol(a, b, c). Interestingly, the ones that fail from CategoryData are the ones which fail the Artin braid test. This might hint at the Artin braids being done incorrectly.

end

# https://quantumkithub.github.io/TensorKit.jl/stable/man/sectors/#Manipulations-on-a-fusion-tree
@testsuite "Artin braid equality" I -> begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly confused by this additional check. It looks incredibly similar to the hexagon equation(s), up to some relabeling, and I assume it should just follow from the hexagon equations automatically?
Is this independent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how related much it actually is the hexagon equations, but indeed the braided coherence theorem says it should just follow from the hexagons. So it's not independent and maybe not worth checking? It does allow us to catch which sectors' braidings will be incompatible within TensorKit itself more quickly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you double check? I am writing this down and it seems like the two really do match up quite closely, but there are some conj differences, which makes me think that one of the options might actually contain a mistake for complex entries.

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.

3 participants