{"id":19863439,"url":"https://github.com/sandialabs/lielab","last_synced_at":"2026-02-28T23:04:10.448Z","repository":{"id":224398181,"uuid":"760521318","full_name":"sandialabs/Lielab","owner":"sandialabs","description":"Numerical Lie-theory in C++ and Python.","archived":false,"fork":false,"pushed_at":"2026-02-23T14:07:34.000Z","size":926,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-23T22:19:43.723Z","etag":null,"topics":["scr-2897","snl-science-libs"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandialabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-20T15:17:14.000Z","updated_at":"2025-10-18T01:22:49.000Z","dependencies_parsed_at":"2024-02-25T18:50:41.708Z","dependency_job_id":"b9f39766-3ea3-4f37-b91b-290481f6b401","html_url":"https://github.com/sandialabs/Lielab","commit_stats":null,"previous_names":["sandialabs/lielab"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/sandialabs/Lielab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2FLielab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2FLielab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2FLielab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2FLielab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandialabs","download_url":"https://codeload.github.com/sandialabs/Lielab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2FLielab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29954583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T22:53:01.873Z","status":"ssl_error","status_checked_at":"2026-02-28T22:52:50.699Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scr-2897","snl-science-libs"],"created_at":"2024-11-12T15:14:40.534Z","updated_at":"2026-02-28T23:04:10.438Z","avatar_url":"https://github.com/sandialabs.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lielab\n\nSoftware for the geometric modeling and numerical analysis of systems, especially those in relation to Lie theory.\n\n  - Domain: Lie algebras, Lie groups, and smooth manifolds.\n  - Functions: Various transformations and operations on domains, exponential coordinates, Cayley transform, etc.\n  - Integrate: Computation of Initial Value Problems (IVPs).\n  - Optimize: Optimization and root finding algorithms.\n  - Utils: Miscellanious tools and functions not entirely related. Likely to be removed.\n\nThis project is not complete.\n\n## Getting started\n\n### Installation\n\nEasiest way to install is via a package manager\n\n| Manager | Language | Install Command                          | Latest version |\n|---------|----------|------------------------------------------|----------------|\n| pip     | Python   | `pip install lielab`                     | [![PyPI - Version](https://img.shields.io/pypi/v/lielab)](https://pypi.org/project/lielab/) |\n| Conan   | C++      | `conan install --requires=lielab/[*]`    | [![Conan Center](https://img.shields.io/conan/v/lielab)](https://conan.io/center/recipes/lielab) |\n| Spack   | C++      | `spack install lielab`                   | ![Spack](https://img.shields.io/spack/v/lielab) |\n\nThen import into a project with\n\n| Language | Import                  |\n|----------|-------------------------|\n| Python   | `import lielab`         |\n| C++20    | `#include \u003cLielab.hpp\u003e` |\n\n### Quick Example (Python)\n\nA short example in the simulation of the time dependent Schrodinger equation for a closed two-level quantum system on $\\mathbb{C}^2$. Import Lielab and construct the usual Pauli matrices.\n\n```python\nfrom lielab.domain import su, CN, CompositeAlgebra, CompositeManifold\nfrom lielab.integrate import solve_ivp, IVPOptions, HomogeneousIVPSystem\nimport numpy as np\n\nsigma_x = -1j*su.basis(0, 2).get_matrix()\nsigma_y =  1j*su.basis(1, 2).get_matrix()\nsigma_z = -1j*su.basis(2, 2).get_matrix()\n```\n\nCreate a helper function to generate the expectation values of $\\ket{\\psi}$\n\n```python\ndef expectation(y):\n    psibar = y[0].to_complex_vector()\n    ex = np.real(np.dot(np.dot(psibar.conj(), sigma_x), psibar))\n    ey = np.real(np.dot(np.dot(psibar.conj(), sigma_y), psibar))\n    ez = np.real(np.dot(np.dot(psibar.conj(), sigma_z), psibar))\n    return [ex, ey, ez]\n```\n\nCreate two functions evaluating the time dependent Schrodinger equation, $d/dt \\ket{\\psi} = -j H \\ket{\\psi}$, with time and state dependent Hamiltonian $H = \\sigma_x + \\cos(4 \\pi t) |E_1(\\ket{\\psi})| \\sigma_z$\n\n```python\ndef Schrodinger_generator(t, y):\n    ex = expectation(y)\n    const_drift = sigma_x\n    nonconst_drift = 1*np.cos(4*np.pi*t)*np.abs(ex[1])*sigma_z\n    hamiltonian = const_drift + nonconst_drift\n    return CompositeAlgebra([su(-1j*hamiltonian)])\n\ndef Schrodinger_action(g, y):\n    next_psibar = np.dot(g[0].get_matrix(), y[0].to_complex_vector())\n    return CompositeManifold([CN.from_complex_vector(next_psibar)])\n```\n\nSet initial condition $\\ket{\\psi(0)} = \\ket{1}$ and simulate for $t \\in [0, 10]$. Postprocess the expectation values from the result.\n\n```python\npsi0 = CompositeManifold([CN.from_complex_vector([1, 0])])\n\nSchrodinger_equation = HomogeneousIVPSystem(Schrodinger_generator, action=Schrodinger_action)\n\noptions = IVPOptions()\noptions.dt_max = 0.01\n\npath = solve_ivp(Schrodinger_equation, [0, 10], psi0, options)\n\nebar = np.vstack([expectation(yi) for yi in path.y])\n```\n\nPlot the result on the Bloch sphere\n\n```python\nimport matplotlib.pyplot as plt\nfig = plt.figure()\nax = fig.add_subplot(projection='3d')\nax.plot(ebar[:,0], ebar[:,1], ebar[:,2])\nax.text(0, 0, 1.2, r'$|1\u003e$')\nax.text(0, 0, -1.2, r'$|0\u003e$')\nax.set_xlabel(r'$x$')\nax.set_ylabel(r'$y$')\nax.set_zlabel(r'$z$')\nax.set_xlim([-1,1])\nax.set_ylim([-1,1])\nax.set_zlim([-1,1])\nplt.show()\n```\n\n![img](doc/bloch.png)\n\n### Documentation\n\ntbd...\n\n## Other Notes\n\n### Expressiveness\n\nWhile Lielab uses a C++ backend, it's intent is **not** as a high performance code.\n\n### Contributing\n\nSuggestions, feedback, helpful tips, or pseudocode can be submitted via the issues tracker.\n\nPull requests, commits, and other contributions with hard code are not accepted at this time. Sorry.\n\n## Citation\n\n```\n@misc{Lielab,\n  author = {Sparapany, Michael J.},\n  title = {Lielab: Numerical Lie-theory in C++ and Python},\n  year = {2024},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/sandialabs/lielab}}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Flielab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandialabs%2Flielab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Flielab/lists"}