lie

Crates.iolie
lib.rslie
version0.1.2
sourcesrc
created_at2021-05-25 15:29:20.216965
updated_at2022-02-08 21:25:30.716044
descriptionA numerical library for working with Lie Groups and Algebras
homepagehttps://github.com/RustyBamboo/lie
repository
max_upload_size
id401890
size35,501
Daniel (RustyBamboo)

documentation

README

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.

Commit count: 0

cargo fmt