Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

PULSUS

PUlse-dressed Liouvillian Spectroscopy Using Superoperators.

PULSUS calculates linear and third-order spectra of open quantum systems directly in the frequency domain. It supports finite Gaussian pulses, full and rotating-wave interactions, impulsive limits, and selected spectral coordinates.

Install

Requires Python 3.10 or newer:

pip install pulsus-spec

Import the package as pulsus. The first example below works with 0.2.0 or newer. The linear plotter and optional figure export require 0.3.0 or newer. To install from a cloned checkout instead of PyPI, run this from the repository root:

python -m pip install -e .

Documentation

Your first spectrum

Copy this complete example into a notebook or Python file. It uses only the installed package and its dependencies, displays a finite-pulse nonrephasing spectrum of two coupled sites, and saves no files.

import matplotlib.pyplot as plt
import numpy as np
import pulsus

# Use consistent model units with hbar = 1.
# Build two coupled two-level sites.
identity = np.eye(2, dtype=complex)
lower = np.array([[0, 1], [0, 0]], dtype=complex)
a = np.kron(identity, lower)
b = np.kron(lower, identity)
H = (
    1.0 * (a.conj().T @ a)
    + 1.2 * (b.conj().T @ b)
    + 0.1 * (a.conj().T @ b + b.conj().T @ a)
)
dipole_plus = a.conj().T + b.conj().T
dipole_minus = dipole_plus.conj().T
dipole = dipole_plus + dipole_minus

gamma = 0.05
nbar = 0.05
collapse_ops = [
    np.sqrt(gamma * (nbar + 1)) * a,
    np.sqrt(gamma * nbar) * a.conj().T,
    np.sqrt(gamma * (nbar + 1)) * b,
    np.sqrt(gamma * nbar) * b.conj().T,
]
system = pulsus.SpectroscopySystem(
    H=H,
    dipole=dipole,
    collapse_ops=collapse_ops,
    hbar=1.0,
    dipole_plus=dipole_plus,
    dipole_minus=dipole_minus,
)
rho_ss = system.stationary_state()

# Define the pulse and frequency axes, then calculate the spectrum.
pulse = pulsus.GaussianPulse(omega_L=1.10, sigma=1.25, E0=1.0)
omega1 = np.linspace(0.7, 1.5, 31)
omega3 = np.linspace(0.7, 1.5, 31)
S = pulsus.finite_pulse_spectrum(
    system=system,
    pulse1=pulse,
    pulse2=pulse,
    pulse3=pulse,
    omega1=omega1,
    omega3=omega3,
    T=20.0,
    eta=0.02,
    pathway="NR",
    rho0=rho_ss,
)

# Display the normalized imaginary component.
pulsus.plot_spectrum(
    omega1=omega1,
    omega3=omega3,
    spectrum=S,
    component="imag",
    normalize=True,
    title="Finite-pulse nonrephasing dimer spectrum",
    xlabel=r"$\omega_1$ (inverse time units)",
    ylabel=r"$\omega_3$ (inverse time units)",
)
plt.show()

Finite-pulse nonrephasing dimer spectrum

S[j, i] corresponds to omega3[j] and omega1[i]. All quantities use consistent model units with hbar=1; sigma is the Gaussian field-envelope standard deviation. eta ensures convergence of the causal transform and adds broadening: reduce it and refine the frequency grid until the result is stable.

Available models

The rotating-wave approximation (RWA) and impulsive approximation can be chosen separately. The principal third-order grid functions are:

Function Pulse treatment Interaction
finite_pulse_spectrum Finite Gaussian pulses Full
finite_pulse_rwa_spectrum Finite Gaussian pulses RWA
short_pulse_rwa_spectrum Gaussian spectral envelopes RWA
impulsive_rwa_spectrum Impulsive RWA
impulsive_spectrum Impulsive Full

For linear spectra, use finite_pulse_linear_spectrum, short_pulse_linear_rwa_spectrum, impulsive_linear_rwa_spectrum, or impulsive_linear_spectrum. Functions return complex numerical responses; plotting is a separate step. See the model guide for the arguments to keep or omit when switching models.

Plotting and optional export in 0.3.0

Using system, pulse, and rho_ss from the first example:

omega = np.linspace(0.7, 1.5, 401)
S_linear = pulsus.finite_pulse_linear_spectrum(
    system=system, pulse=pulse, omega=omega, eta=0.02, rho0=rho_ss,
)
fig, ax, line = pulsus.plot_linear_spectrum(
    omega, S_linear, component="imag", normalize=True,
    title="Finite-pulse linear spectrum",
)
plt.show()

plot_linear_spectrum draws a line without markers by default. Both plotters support component="real", "imag", or "abs", optional normalization, savepath="spectrum.png" or "spectrum.pdf", and dpi=300. They return editable Matplotlib objects without calling plt.show() or closing the figure. Omitting savepath saves nothing. You can modify ax and then call fig.savefig(...) and plt.show(). See the plotting reference for overlays and all options.

Physical scope

The formulation uses finite-dimensional systems, electric-dipole coupling, and a time-independent Markovian Lindblad Liouvillian. Standard finite-pulse calculations assume a stationary initial state and temporally ordered, separated Gaussian pulses. RWA calculations require explicit raising and lowering dipole components. Impulsive time-domain response functions are also available; finite-duration driven time propagation is not part of the public API.

Development

From a cloned repository:

python -m pip install -e ".[dev]"
pytest -q

The suite includes 108 unit and regression tests. See the method and validation notes for scientific benchmarks and the changelog for release changes. Maintainers can follow the release checklist to publish a new version.

Citation and license

The archived 0.2.0 release can be cited as:

Castillo-Gonzalez, Alfonso. PULSUS: Pulse-dressed Liouvillian Spectroscopy Using Superoperators. Version 0.2.0, Zenodo, 2026. doi:10.5281/zenodo.23253040.

See CITATION.cff for citation metadata. PULSUS is distributed under the BSD 3-Clause license.

Metadata

Release files for pulsus-spec 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for pulsus-spec 0.3.0
File Size Uploaded Provenance Actions
pulsus_spec-0.3.0.tar.gz 35.3 kB With provenance Details for pulsus_spec-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pulsus-spec 0.3.0
File Interpreter ABI Platform Actions
pulsus_spec-0.3.0-py3-none-any.whl Python 3 none any Details for pulsus_spec-0.3.0-py3-none-any.whl

Total release size: 58.4 kB

Release files / pulsus_spec-0.3.0.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pulsus_spec-0.3.0.tar.gz
Size 35.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9c92da50388b849d065f996009cb8c859c56cd3ead1a37e6f2547d2da708b687
BLAKE2b-256 checksum
How to use checksums
08fab3a444d2886d432694755a4db5e3dd39020dbbd78f2be5fabd35645a7283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release files / pulsus_spec-0.3.0-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pulsus_spec-0.3.0-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bb652476b77f37f8a096f127876c13fdd49cca1148dc3c3079ac3b70d01a4bd
BLAKE2b-256 checksum
How to use checksums
22ac8365e5585e56837d2b749b5854cfeb19709445ced6359cec65047b0a50eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Security for pulsus-spec 0.3.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.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for pulsus_spec-0.3.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 Oct 17, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page