Skip to content

Quantum Groups in OSCAR (Julia implementation) #4953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

felix-roehrich
Copy link
Collaborator

@felix-roehrich felix-roehrich commented Jun 3, 2025

This is a first step to reimplement (and eventually extend) the GAP QuaGroup in Julia. The main reasons for this is to make the code more maintainable and vastly improve performance (for example for a computation I needed in B3 the new implementation is about 3600x faster (25s vs 0,007s)).

This PR:

  • only the negative part of the quantum group is constructed,
  • focus is on functionality for canonical basis,
  • implements PBWAlgebras (currently only lex order) in pure Julia (this gives about a 10x performance increase, when compared to the Singular interface for the canonical basis computations).

The PBW algebra code should be moved to AA eventually, however is part of this PR for more visibility. Weighted monomial orders may be necessary for quantum groups and the MPoly functionality is here to allow for easier experimentation, eventually to be merged with Generic.MPoly in AA.

Feel free to ask questions or give comments.

TODO:

  • Clean up
  • Documentation
  • Tests

@lgoettgens lgoettgens added the experimental Only changes experimental parts of the code label Jun 3, 2025
@HechtiDerLachs
Copy link
Collaborator

People might be curious about the PBW implementation: @wdecker , @JohnAAbbott , @jankoboehm .

Noted during triage: Ideals in this implementation are not yet supported, so it's not ready to replace the current implementation via singular. But if the speedup really holds, this should be interesting!

@felix-roehrich
Copy link
Collaborator Author

felix-roehrich commented Jun 4, 2025

Just to make it clear in case it was misunderstood: The performance increase refers specifically to the computation of canonical basis. The main reason for this is that coefficients from Singular need to be converted to Oscar and then back to Singular; I believe the missing mutating ops is secondary. This means the more complex the coefficient ring is the better the pure Julia implementation should be (provided the implementation of the coefficient ring is good in Julia) in such scenarios.

For simple computations like multiplying two elements the performance is comparable.

@wdecker
Copy link
Collaborator

wdecker commented Jun 4, 2025

People might be curious about the PBW implementation: @wdecker , @JohnAAbbott , @jankoboehm .

Noted during triage: Ideals in this implementation are not yet supported, so it's not ready to replace the current implementation via singular. But if the speedup really holds, this should be interesting!

I have discussed this with @felix-roehrich and we will stay in touch.

Copy link

codecov bot commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 91.22165% with 120 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.98%. Comparing base (d2ce675) to head (14d082a).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
experimental/QuantumGroups/src/MPolyRing.jl 91.42% 47 Missing ⚠️
experimental/QuantumGroups/src/QuantumGroup.jl 88.10% 27 Missing ⚠️
experimental/QuantumGroups/src/PBWAlgebra.jl 91.30% 24 Missing ⚠️
experimental/QuantumGroups/src/QuantumGroupHom.jl 87.09% 8 Missing ⚠️
experimental/QuantumGroups/src/QuantumField.jl 96.24% 5 Missing ⚠️
experimental/QuantumGroups/src/PBWAlgebraHom.jl 84.61% 4 Missing ⚠️
experimental/QuantumGroups/test/QuantumField.jl 86.95% 3 Missing ⚠️
experimental/QuantumGroups/src/Types.jl 93.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4953      +/-   ##
==========================================
+ Coverage   84.82%   84.98%   +0.15%     
==========================================
  Files         709      721      +12     
  Lines       95508    96884    +1376     
==========================================
+ Hits        81016    82333    +1317     
- Misses      14492    14551      +59     
Files with missing lines Coverage Δ
experimental/QuantumGroups/src/CanonicalBasis.jl 100.00% <100.00%> (ø)
experimental/QuantumGroups/src/QuantumGroups.jl 100.00% <100.00%> (ø)
experimental/QuantumGroups/test/PBWAlgebra.jl 100.00% <100.00%> (ø)
experimental/QuantumGroups/src/Types.jl 93.33% <93.33%> (ø)
experimental/QuantumGroups/test/QuantumField.jl 86.95% <86.95%> (ø)
experimental/QuantumGroups/src/PBWAlgebraHom.jl 84.61% <84.61%> (ø)
experimental/QuantumGroups/src/QuantumField.jl 96.24% <96.24%> (ø)
experimental/QuantumGroups/src/QuantumGroupHom.jl 87.09% <87.09%> (ø)
experimental/QuantumGroups/src/PBWAlgebra.jl 91.30% <91.30%> (ø)
experimental/QuantumGroups/src/QuantumGroup.jl 88.10% <88.10%> (ø)
... and 1 more

... and 28 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
experimental Only changes experimental parts of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants