Skip to content

feat: Group isomorphisms, Haar sampling, ergonomics#8

Open
gestelllabs wants to merge 12 commits intomainfrom
feat/group-isomorphisms
Open

feat: Group isomorphisms, Haar sampling, ergonomics#8
gestelllabs wants to merge 12 commits intomainfrom
feat/group-isomorphisms

Conversation

@gestelllabs
Copy link
Copy Markdown
Owner

Toward v0.3.0 feature parity:

  • From impls: SU2↔SUN<2>, SU3↔SUN<3>, UnitQuaternion↔SU2
  • random_haar() for SO(3), SU(3), SU(N) (Mezzadri 2007)
  • iter::Product and owned Mul for all groups
  • prelude module, richer Display, three worked examples
  • Cargo.toml version bump to 0.3.0-dev

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"]
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.

1 participant