Skip to main content

Simple definition and fast solution of quantum systems described by a Lindblad master equation.

Project description

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

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

Quick Example

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spylind-0.22.tar.gz (66.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spylind-0.22-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file spylind-0.22.tar.gz.

File metadata

  • Download URL: spylind-0.22.tar.gz
  • Upload date:
  • Size: 66.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for spylind-0.22.tar.gz
Algorithm Hash digest
SHA256 6464c85d23d4b00c5ec8e36dd8b49dc418a3191574b6dfd3ed1edbdcb67b2fa8
MD5 5df33535c3cdc015c40aec0267f898bb
BLAKE2b-256 6596454950fde4788b7a67ab633421d67a115b9499735a7285a5df5b7aba7bcb

See more details on using hashes here.

File details

Details for the file spylind-0.22-py3-none-any.whl.

File metadata

  • Download URL: spylind-0.22-py3-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for spylind-0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 da194b913f3269580733641ad3955f2cf4824aea81ff0a643e441cc90da65bba
MD5 ebdd3b4eed6325cbd28a96c360689916
BLAKE2b-256 dcd58e02c024d53e678296cfd19d536a39bbd9463ea8df83be2932070ec60384

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page