Release:

0.4.3

Date:

9 January 2026

Useful links: Issue Tracker | Cite | User support | Tutorials

Hint

We recommend to install magnopy with optional dependencies (Plotly and matplotlib) whether possible.

pip install "magnopy[visual]"

Then, magnopy will produce graphical output (.html and .png) files in addition to the .txt output with the actual data.

Note that if you can not install either Plotly or matplotlib, then all functions of magnopy are still available to you. The only missing part would be the visualization.

What is magnopy?#

Magnopy is a python code that, given spin Hamiltonian in any convention, computes bosonic (magnon) Hamiltonian of the form

\[\mathcal{H} \approx E^{(0)} + E^{(2)} + \sum_{\boldsymbol{k}} \Delta(\boldsymbol{k}) + \sum_{\alpha} \sum_{\boldsymbol{k}\in 1^{st} BZ} \omega_{\alpha}(\boldsymbol{k}) \Biggl( b^{\dagger}_{\alpha}(\boldsymbol{k})b_{\alpha}(\boldsymbol{k}) + \dfrac{1}{2} \Biggr) + \dots\]

where

  • \(E^{(0)}\) is a classical energy of the ground state;

Next three terms are derived within the Linear Spin Wave Theory (LSWT):

  • \(E^{(2)}\) is a quantum correction to the ground state energy;

  • \(\omega_{\alpha}(\boldsymbol{k})\) is magnon dispersion at the level of LSWT;

  • \(\sum_{\boldsymbol{k}}\Delta(\boldsymbol{k})\) is an energy measure of \(\pm \boldsymbol{k}\) asymmetry.

What can it do?#

How to support magnopy?#

Magnopy is a relatively young code and we would highly appreciate your support.

  • If you use and like magnopy, please give it a star on GitHub.

  • Please give feedback on your experience with magnopy (see User support page).

  • If you use magnopy in your research, please cite it (see How to cite? page).