MaxwellBloch is now clerq
MaxwellBloch has been renamed to clerq, starting with version 0.13.0. The code, the solver and the JSON problem format are the same. The package name, the import name, the repository and the documentation address have changed.
Version 0.13.0 also contains a physics fix that is independent of the rename. The Maxwell propagation equation was missing a factor of 2, so the optical depth in earlier versions was half its physical value (the propagation step used the convention for a coupling of \(\Omega\), while the Bloch solver uses the standard \(\Omega/2\)). Absorption and propagation results change. Recompute any cached .qu results and any figures you made with earlier versions. See the changelog.
Why a new name
The package was never really solving the Maxwell–Bloch equations. The optical Bloch equations describe a two-level atom. What the solver does is evolve the full density matrix of an arbitrary multi-level open quantum system under the Lindblad master equation (it wraps QuTiP’s mesolve), with spontaneous decay and dephasing as collapse operators, hyperfine structure and several fields, and couple it to a classical Maxwell field propagating through the medium. “MaxwellBloch” named only the two-level special case of that.
The new name says what it is: clerq is Clerk (as in James Clerk Maxwell, for the classical fields) with a q for quantum (for the open quantum systems).
“Maxwell–Bloch” is still the familiar name for the two-level case, so it appears in these docs where that is what is meant.
What changed
| Before | Now | |
|---|---|---|
| Install | pip install maxwellbloch |
pip install clerq |
| Import | import maxwellbloch |
import clerq |
| Source | github.com/tpogden/maxwellbloch |
github.com/tpogden/clerq |
| Documentation | readthedocs | clerq.org |
| Plotly theme name | "maxwellbloch" |
"clerq" |
Old GitHub links redirect to the new repository, so existing issue and pull request links keep working.
How to update
- Install the new package:
pip install clerq. - Replace
maxwellblochwithclerqin your imports, for examplefrom maxwellbloch import mb_solvebecomesfrom clerq import mb_solve. - Re-run anything that depends on cached results, because of the physics fix above.
The command-line tools mbsolve and obsolve keep their names.
What happens to pip install maxwellbloch
The old name stays on PyPI as a transitional release (maxwellbloch 0.12.1). It installs clerq and re-exports it, so existing code keeps working: from maxwellbloch import mb_solve gives the same objects as from clerq import mb_solve. Importing it prints a DeprecationWarning. It will receive no further updates, and new features will only appear in clerq.
If you pinned maxwellbloch==0.12.0 or earlier, nothing changes for you until you upgrade.
Citing
If you use clerq in research, please cite the original package, which was published as MaxwellBloch. The citation is in the README. A citation with a DOI for clerq itself will be added once it is available.
Questions and problems
Please open an issue. The troubleshooting page lists common problems.