Skip to content

A numerical library for working with Lie Groups and Algebras.

License

Notifications You must be signed in to change notification settings

RustyBamboo/lie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.