clerq
clerq solves the propagation of classical electromagnetic fields through media of open quantum systems, using Maxwell's equations coupled to the Lindblad master equation. It is used for near-resonant light in thermal atomic vapours, with two-, three- and many-level atoms, spontaneous decay, dephasing and Doppler broadening.
Renamed from
maxwellbloch. This package was previously published asmaxwellbloch. Installclerqand changeimport maxwellblochtoimport clerq. The old name keeps working through a transitional release that re-exportsclerqwith aDeprecationWarning. Version 0.13.0 also fixes a factor-of-2 error in the propagation equation, so results from earlier versions change. See the announcement.
Above is an example solution for the propagation of a 4π pulse through a dense atomic vapour. The pulse immediately breaks up on entering the medium and the resultant pulses form two optical solitons each with a pulse area of 2π.
Documentation
Docs for the project are at clerq.org.
Install
The recommended way to install is via uv:
uv pip install clerq
Or using pip:
pip install clerq
If you prefer Conda, you can create and activate an environment with the required dependencies with
conda create --name mb -c conda-forge python=3.11 qutip
conda activate mb
pip install clerq
More detailed installation instructions can be found in the docs along with many example problems.
Attribution
If you use clerq for research, please cite it. The DOI below is the concept DOI, which covers all versions and always resolves to the latest; Zenodo also gives each release its own version DOI.
@software{ogden_clerq,
author = {Ogden, Thomas P.},
title = {clerq},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.23269881},
url = {https://doi.org/10.5281/zenodo.23269881}
}
Work that used earlier versions, published as MaxwellBloch, can also cite the original package:
@misc{ogden2020maxwellbloch,
author = {Ogden, Thomas P.},
title = {{MaxwellBloch}: a Python package for solving the coupled
Maxwell-Bloch equations describing the nonlinear propagation of
near-resonant light through thermal quantised systems such as atomic
vapors.},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/tpogden/clerq}}
}
A CITATION.cff is included too (GitHub's "Cite this repository" button reads it).
Changelog
See CHANGELOG.md.
License
MIT License. See LICENSE.txt.
Metadata
Release files for clerq 0.15.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 |
|---|---|---|---|---|
| clerq-0.15.0.tar.gz | 158.5 kB | With provenance | Details for clerq-0.15.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clerq-0.15.0-py3-none-any.whl | Python 3 | none | any | Details for clerq-0.15.0-py3-none-any.whl |
Total release size: 264.2 kB
Release files / clerq-0.15.0.tar.gz
| Download URL | clerq-0.15.0.tar.gz |
|---|---|
| Size | 158.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53b55cf872d760a3052f59343cac8543e43202cb2754689a8e9b8969b37a6e5e
|
|
BLAKE2b-256 checksum How to use checksums |
981314b5cb18c7627f050985e2f483d4c263fc0d107c3b46d4c2d813e3c65d35
|
| 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 Oct 24, 2026.
Transparency logRelease files / clerq-0.15.0-py3-none-any.whl
| Download URL | clerq-0.15.0-py3-none-any.whl |
|---|---|
| Size | 105.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49fb6e79498c946a7948beac932c799cf766a42211dfdca90f6fa3226fbd29b5
|
|
BLAKE2b-256 checksum How to use checksums |
e2cdd12b53bc62df913260ab91fb1f0301f87ec9924eed39afec50db0b7d561c
|
| 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 Oct 24, 2026.
Transparency logSecurity for clerq 0.15.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 clerq-0.15.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 24, 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.