### 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

and ladder matrices`su``(``2``)``sl``(``2``,`C`)` - Generalized Gell-Mann Matrices

(Hermitian)`su``(`n`)` - Sylverster "Clock" and "Shift" Matrices

(non-Hermitian)`su``(`n`)` -

matrices by "Spherical Harmonics Tensors su(2) addition" via Clebsh-Gordan coefficients`su``(`n`)` - Computation of Structure constants
- Computation of dot/cross product in

through structure constants`su``(`n`)`

### 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

depends on:`Lie`

, e.g. (for Ubuntu/Debian`openblas-devel`

) or equivalent`sudo``apt install libopenblas-devel`- 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

is free and opensource, released under MIT license.`Lie`

#### Dependencies

~**66MB**

~877K SLoC