Metadata-Version: 2.4
Name: spylind
Version: 0.21
Summary: Simple definition and fast solution of quantum systems described by a Lindblad master equation.
Home-page: https://github.com/morgatron/spylind
Author: Morgan Hedges
Author-email: morgan.hedges@gmail.com
License: BSD (3-clause)
Classifier: Development Status :: 3 - Alpha
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: sympy
Requires-Dist: qutip
Requires-Dist: python-box
Requires-Dist: matplotlib
Requires-Dist: pandas
Provides-Extra: tf
Requires-Dist: tensorflow; extra == "tf"
Requires-Dist: tensorflow-probability; extra == "tf"
Provides-Extra: jax
Requires-Dist: jax; extra == "jax"
Requires-Dist: jaxlib; extra == "jax"
Requires-Dist: diffrax; extra == "jax"
Requires-Dist: equinox; extra == "jax"
Provides-Extra: full
Requires-Dist: tensorflow; extra == "full"
Requires-Dist: tensorflow-probability; extra == "full"
Requires-Dist: jax; extra == "full"
Requires-Dist: jaxlib; extra == "full"
Requires-Dist: diffrax; extra == "full"
Requires-Dist: equinox; extra == "full"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

=======
Spylind
=======

Spylind is a Python library for the symbolic definition and high-performance solution of large ensembles of quantum systems described by the Lindblad master equation.

It is particularly optimized for ensembles with many degrees of freedom (e.g., inhomogeneous broadening), utilizing **JAX** and **TensorFlow** for JIT compilation and GPU acceleration.

Core Components
---------------

* **spylind**: Generates symbolic equations of motion (EOM) for density matrix elements from a Hamiltonian and collapse operators.
* **spyIVP**: A high-performance bridge between symbolic expressions and numerical ODE solvers.

Key Features
------------

* **Symbolic-to-Numerical**: Automates the transition from SymPy expressions to optimized solver code.
* **Multiple Backends**:
    * **Diffrax (JAX)**: High-performance, JIT-compiled, and GPU-capable.
    * **NumPy (SciPy)**: Robust, industry-standard CPU integration.
    * **TensorFlow**: scalable integration for large-scale problems.
* **Multi-dimensional Ensembles**: Native support for parameter sweeps and spatial dimensions.
* **QuTiP Integration**: Supports QuTiP ``Qobj`` for operator definitions.

Installation
------------

.. code-block:: bash

    pip install spylind[jax]  # Recommended for performance
    pip install spylind[tf]   # For TensorFlow support
    pip install spylind[full] # All backends

Quick Example
-------------

.. code-block:: python

    from spylind import spylind as spl
    import qutip as q
    import numpy as np
    import sympy as sm

    # Define a 2-level system symbolically
    H = [0.1 * np.pi * q.sigmaz(), [sm.symbols('Omega')/2, q.sigmax()]]
    tlist = np.linspace(0, 1.0, 101)

    # Solve using the Diffrax backend
    res = spl.mesolve(H, q.basis(2,0), tlist,
                      t_dep_fL={'Omega': lambda t: 2*np.pi},
                      e_ops=[q.sigmaz()],
                      backend='diffrax')

* License: 3-clause BSD
