Skip to content

Add TambaraYamagami for ZN - #110

Merged
lkdvos merged 14 commits into
QuantumKitHub:mainfrom
BramVancraeynest:main
Oct 1, 2026
Merged

lkdvos merged 14 commits into
QuantumKitHub:mainfrom
BramVancraeynest:main

Conversation

@BramVancraeynest

@BramVancraeynest BramVancraeynest commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

I added a new sector representing the Tambara-Yamagami fusion category with underlying abelian group $$\mathbb Z_N$$. The implemented fusion rules and F-symbols are known analytically in the literature.

I have made the following choices

  • The sector is called simply TambaraYamagami, and the underlying group $$\mathbb Z_N$$ is thus left implicit in the name. I did so to not overload the naming, and because I do not plan to implement other Tambara-Yamagami categories in the (near) future.
  • The case TambaraYamagami{2,1}, should correspond to IsingAnyon. I did not check this explicitly, but it passes all the tests. However, TambaraYamagami{2,1} in its current implementation is not endowed with a braiding, since this is the only $$\mathbb Z_N$$ Tambara-Yamagami category that admits one.

@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/TensorKitSectors.jl 16.66% <ø> (ø)
src/ty.jl 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Looks great!

Left some small suggestions in the code, but I think everything looks more or less perfect.

Additional questions:

  • Does it make sense to define modulus like we do for ZN to return the value of N, to avoid having to access the type parameters?
  • Do you have time to also include a documentation section for this, even if it is somewhat terse?
  • Are there certain versions that you imagine using somewhat often, for which it makes sense to add them to the precompilation list here:
    for I in (
    Trivial, Z2Irrep, Z3Irrep, Z4Irrep, ZNIrrep, U1Irrep, SU2Irrep, CU1Irrep,
    FermionParity, FermionNumber, FermionSpin, PlanarTrivial, FibonacciAnyon,
    IsingAnyon, TimeReversed{IsingAnyon}, TimeReversed{FibonacciAnyon},
    )

Comment thread src/TensorKitSectors.jl Outdated
Comment thread src/ty.jl Outdated
Comment thread src/ty.jl Outdated
Comment thread src/ty.jl Outdated
BramVancraeynest and others added 3 commits September 16, 2026 15:05
The show method used an invalid `<:TambaraYamagami` expression and always
printed the placeholder "(:m)" regardless of whether the sector was the
non-invertible object. It now mirrors the printing convention used by other
sector types (skips the type name inside an already-typed context) and
distinguishes `m` from group elements via `_ism`, producing output that
round-trips through `Meta.parse`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ince this fusion category is neither an anyon theory (as it is not even braided) or a (representation category of a) group.
@BramVancraeynest

Copy link
Copy Markdown
Contributor Author

Implemented almost all the suggested changes for now, except the modulus. Added some documentation, which I put in a new folder docs/other, since these categories are generically not braided, nor grouplike.
I don't have specific small-N use-cases in mind for which precompilation would make sense.

Comment thread src/ty.jl Outdated
Comment thread src/ty.jl
Comment thread src/ty.jl Outdated
Comment thread src/ty.jl Outdated
Comment thread src/ty.jl Outdated
Comment thread src/ty.jl Outdated
BramVancraeynest and others added 2 commits September 18, 2026 15:16
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
…d to correctly deal with the case of the identity object.
Comment thread src/ty.jl Outdated
Comment thread src/ty.jl Outdated
Co-authored-by: Lukas Devos <ldevos98@gmail.com>

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

To me this looks ready. There is only one comment left by @Jutho, for which I don't really have any strong opinions so I would be happy to merge as-is.

lkdvos and others added 5 commits October 1, 2026 10:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… label cutoff

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lkdvos
lkdvos enabled auto-merge (squash) October 1, 2026 14:54
@lkdvos
lkdvos disabled auto-merge October 1, 2026 16:59
@lkdvos
lkdvos merged commit 7bdb083 into QuantumKitHub:main Oct 1, 2026
12 checks passed
@lkdvos lkdvos mentioned this pull request Oct 1, 2026
lkdvos referenced this pull request Oct 1, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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