levisim
levisim simulates optically levitated nanoparticles.
- Several particles, one cavity.
MultiTrapsolves the linearised quantum Langevin equations of N levitated particles, each moving in up to three dimensions, coupled by coherent scattering to one shared cavity mode. It returns the homodyne and heterodyne spectra of the cavity output and the power and cross spectral densities of every motion. Seven independent calculation routes are provided (linear-amplifier models, numerical and power-series hybridisation, and an exact closed form that inverts no N×N matrix), which agree with each other to within 5e-13 (relative) on every system in the test suite and notebooks. - One particle, free space.
Simulationintegrates the stochastic (Langevin) dynamics of a bead in a Gaussian-beam tweezer with gas damping, feedback cold damping, a directed force, kicks and an optional detection floor, photon recoil and gravity;SpectralDensityEstimateandSpectralDensityTheoryanalyse the traces. - Entanglement. Covariance-matrix dynamics, an exact multi-tone (Floquet) drive and Gaussian-state measures (log-negativity, discord, Duan and Hillery–Zubairy witnesses) for two-tone schemes.
pip install levisim
import numpy as np
from levisim.core.units import kHz, degrees
from levisim.multiphysics.enums import QuantumLinearTheoryMethod
from levisim.multiphysics.multitrap import MultiTrap
from levisim.multiphysics.utils.shelf import DEFAULT_cavity_kwargs, DEFAULT_gas_kwargs
mtrap = MultiTrap(
num_traps=2,
Cartesian_axes_per_trap=2,
gas_kwargs=DEFAULT_gas_kwargs,
cavity_kwargs=DEFAULT_cavity_kwargs,
φn_dict={2: 30*degrees}, # second tweezer's phase
ω_range=np.arange(125, 165, 0.02) * kHz, # angular units: kHz is 2π × 10³ rad/s
)
S_hh = mtrap.homodyne_spectrum(QuantumLinearTheoryMethod.LINEAR_AMPLIFIER_MODEL)
Documentation: https://julianiacoponi.github.io/levisim/ — user guide, the calculation methods (with a flowchart), conventions, logging, an API reference, and a gallery of demo notebooks and reproductions of published experiments.
Optional extras: levisim[elk] (logs to Elasticsearch/Kibana via the levisim-logs command),
levisim[notebooks], levisim[docs], levisim[dev], levisim[video], levisim[notify].
levisim is licensed under the GNU GPL v3 or later. Parts of it were written with an LLM at the
author's request; DISCLAIMER.md in the source distribution records which.
Metadata
Release files for levisim 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| levisim-0.1.0.tar.gz | 332.7 kB | With provenance | Details for levisim-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| levisim-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for levisim-0.1.0-py3-none-any.whl |
Total release size: 596.9 kB
Release files / levisim-0.1.0.tar.gz
| Download URL | levisim-0.1.0.tar.gz |
|---|---|
| Size | 332.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
acf5cbe322467506cad61f220fe363c28ab74b6fcc7c66af317e30688869f691
|
|
BLAKE2b-256 checksum How to use checksums |
6dde5b7ba5ace080623a000150e3901f16e3e99b882b81c124f82e89836b4916
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / levisim-0.1.0-py3-none-any.whl
| Download URL | levisim-0.1.0-py3-none-any.whl |
|---|---|
| Size | 264.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d13b62954be86a1c47bf13b7ab8865a761bd72498c409f416eb3c05050974591
|
|
BLAKE2b-256 checksum How to use checksums |
2aaa944c4f77cca921bee252edf820d0adfc82560b923ee574cfe9994ac14ed5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for levisim 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for levisim-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.