#group #algebra #matrix #representation #numerical #su #tensor

lie

A numerical library for working with Lie Groups and Algebras

3 releases

0.1.2 Feb 8, 2022
0.1.1 Jan 26, 2022
0.1.0 May 25, 2021

#952 in Math

MIT license

21KB
420 lines

Lie

A numerical library for working with (representations) of Lie Groups and Algebras.

Features

  • Spin matrices su(2) and ladder matrices sl(2, C)
  • Generalized Gell-Mann Matrices su(n) (Hermitian)
  • Sylverster "Clock" and "Shift" Matrices su(n) (non-Hermitian)
  • su(n) matrices by "Spherical Harmonics Tensors su(2) addition" via Clebsh-Gordan coefficients
  • Computation of Structure constants
  • Computation of dot/cross product in su(n) through structure constants

Examples

Python bindings

import liepy as lp
su_algebra = lp.gen_gellmann(3)

Additional examples, and notebooks, can found here.

Rust

use lie::gellmann::*;
use lie::lie_algebra::*;
let su_algebra = get_gellmann(3);
let f = find_structure_constants(su_algebra); 

println!("{:?}", f);

Installation

Pre-built binary wheels are available.

pip install liepy

Compiling from source

Lie depends on:

  • openblas-devel, e.g. (for Ubuntu/Debian sudo apt install libopenblas-devel) or equivalent
  • Rust >= 1.58
  • Maturin
git clone https://github.com/RustyBamboo/lie
cd lie/liepy
maturin build --release --manylinux=off
pip3 install target/wheels/liepy-....whl --force-reinstall

Building for manylinux

For manylinux compiled wheel, a Docker container is used.

cd lie
docker build -t maturin liepy/
docker run --rm -v $(pwd):/io maturin build --release -m liepy/Cargo.toml

Tests

To ensure the library is working as intended, a test can be run:

cargo test

License

Lie is free and opensource, released under MIT license.

Dependencies

~66MB
~877K SLoC