feat: Group isomorphisms, Haar sampling, ergonomics#8
Open
gestelllabs wants to merge 12 commits intomainfrom
Open
feat: Group isomorphisms, Haar sampling, ergonomics#8gestelllabs wants to merge 12 commits intomainfrom
gestelllabs wants to merge 12 commits intomainfrom
Conversation
Structure-preserving conversions between equivalent representations: - SU2 ↔ SUN<2>: direct matrix copy (same basis ordering) - Su2Algebra ↔ SunAlgebra<2>: direct coefficient copy - SU3 ↔ SUN<3>: direct matrix copy - Su3Algebra ↔ SunAlgebra<3>: with Gell-Mann↔grouped permutation - UnitQuaternion ↔ SU2: anti-homomorphism (standard physics convention) 16 tests verify roundtrip identity, composition homomorphism, exp commutativity, inverse preservation, and bracket commutativity.
- Mul<G> for G (owned * owned) on SU2, SU3, SO3, SUN, U1, RPlus - Product impl enables path.iter().product::<G>() for composing sequences of group elements (parallel transport, holonomy)
- SO(3): quaternion sampling via SU(2)→SO(3) double cover - SU(N): Mezzadri (2007) algorithm — random Gaussian matrix, QR, fix det - SU(3): delegates to SUN<3>::random_haar via From conversion Enables Monte Carlo sampling for all compact gauge groups.
- basics.rs: group ops, exp/log, holonomy via iter::product, BCH - random_sampling.rs: Haar sampling for SU(2)/SO(3)/SU(3)/SU(4), statistical verification of <tr(U)> → 0 - bch_vs_exp.rs: BCH convergence at each order vs exact exp·exp
- Generate Cargo.lock before audit (library crate, lockfile gitignored) - Remove deprecated deny.toml fields (unmaintained/yanked/notice) - Fix broken intra-doc link in SU3::random_haar - Gate examples on required-features = ["rand"]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Toward v0.3.0 feature parity:
Fromimpls: SU2↔SUN<2>, SU3↔SUN<3>, UnitQuaternion↔SU2random_haar()for SO(3), SU(3), SU(N) (Mezzadri 2007)iter::Productand ownedMulfor all groupspreludemodule, richerDisplay, three worked examples