Metadata-Version: 2.4
Name: clerq
Version: 0.13.1
Summary: Classical Maxwell fields propagating through open quantum systems: Maxwell's equations coupled to the Lindblad master equation.
Author-email: Thomas P Ogden <t@ogden.eu>
License: MIT
Project-URL: Homepage, https://github.com/tpogden/clerq
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: qutip>=5
Requires-Dist: tqdm>=4
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Provides-Extra: docs
Requires-Dist: quartodoc; extra == "docs"
Requires-Dist: jupyter; extra == "docs"
Requires-Dist: matplotlib; extra == "docs"
Requires-Dist: seaborn; extra == "docs"
Requires-Dist: plotly>=5.18; extra == "docs"
Requires-Dist: kaleido>=0.2; extra == "docs"
Provides-Extra: plot
Requires-Dist: plotly>=5.18; extra == "plot"
Requires-Dist: kaleido>=0.2; extra == "plot"
Provides-Extra: dev
Requires-Dist: clerq[docs,plot,test]; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: bump-my-version; extra == "dev"
Dynamic: license-file

# clerq

[![Build Status](https://github.com/tpogden/clerq/actions/workflows/ci.yml/badge.svg)](https://github.com/tpogden/clerq/actions/workflows/ci.yml)
[![Documentation](https://img.shields.io/badge/docs-clerq.org-blue)](https://clerq.org)
[![PyPI](https://img.shields.io/pypi/v/clerq)](https://pypi.org/project/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 as
> `maxwellbloch`. Install `clerq` and change `import maxwellbloch` to
> `import clerq`. The old name keeps working through a transitional release
> that re-exports `clerq` with a `DeprecationWarning`. Version 0.13.0 also
> fixes a factor-of-2 error in the propagation equation, so results from
> earlier versions change. See the
> [announcement](https://clerq.org/news/rename.html).

![](example.gif)

Above is an [example solution][4pi] 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π.

[4pi]: https://github.com/tpogden/notebooks-maxwellbloch/blob/master/examples/mb-solve-two-sech-4pi.ipynb


## Documentation

Docs for the project are at [clerq.org][docs].

## Install

The recommended way to install is via [uv](https://docs.astral.sh/uv/):

```sh
uv pip install clerq
```

Or using pip:

```sh
pip install clerq
```

If you prefer Conda, you can create and activate an environment with the
required dependencies with
```sh
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][docs] along with many example problems.

## Attribution

If you use clerq for research, please cite the original package, which was
published as MaxwellBloch:
```
@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` for clerq is included (GitHub's "Cite this repository" button
reads it). A citation with its own DOI will be added once the first archived
release under the new name is available.

## Changelog

See [CHANGELOG.md](CHANGELOG.md).

## License

MIT License. See [LICENSE.txt](LICENSE.txt).

[docs]: https://clerq.org/
