I'm looking for software (which can also run in parallel) for Exact Diagonalization of Quantum Spin Hamiltonians in 1D and 2D (e.g. Heisenberg Model) consisting of a large number of spin sites.

There are some such packages (e.g. QuSpin, ALPS, SpinPack, Hphi, etc.)!

However, if it can be listed out, what are the pros and cons of each package, and which package is more suitable for what type of calculations?

Many beginners will be benefit from the answers, and any help in this direction will be appreciated.

Answers in the format of these examples would be appreciated:

  • 2
    $\begingroup$ Welcome to the site! Thank you for contributing your question here (+1!) and we hope to see much more of you! It is strongly preferred that one question is asked per post, so the part where you asked specifically about software for "magnetic properties such as magnetization, correlation, susceptibility" can possibly be asked separately, and you can easily get back what you wrote by looking at the edit history. See the examples I provided above, to see what we hope for the questions and answers to look like. Welcome again! $\endgroup$ – Nike Dattani Dec 16 '20 at 5:37
  • 1
    $\begingroup$ @NikeDattani, Thanks for edit! $\endgroup$ – Chumbak Dec 16 '20 at 5:57


QuSpin is an open-source Python code that can do exact diagonalization of spin, fermion, and boson systems. It has a wide support for use of symmetries, constrained Hilbert spaces, various models, and time evolution. The combination of fairly simple Python syntax and a large number of tutorials make it a great choice for beginners, for small-scale experimentation, and time-evolution problems in many-body systems. However, the parallelization options are limited. As far as I know, as of v. 0.3.4 QuSpin only supports on-node parallelization through OpenMP and MKL. Thus QuSpin is typically not the best choice if you want to reach the largest systems. In addition, QuSpin seems to currently lack built-in support for dynamical correlation functions, which is of interest to modeling inelastic experiments.


  1. Project on GitHub: https://weinbe58.github.io/QuSpin/
  2. Introducing paper: Phillip Weinberg, and Marin Bukov, QuSpin: a Python package for dynamics and exact diagonalisation of quantum many body systems part I: spin chains, SciPost Phys. 2, 003 (2017).
  3. Follow-up paper: Phillip Weinberg, and Marin Bukov, QuSpin: a Python package for dynamics and exact diagonalisation of quantum many body systems. Part II: bosons, fermions and higher spins, SciPost Phys. 7, 020 (2019).
  • $\begingroup$ Thanks for writing, Yes, It is one option for a beginner to start with $\endgroup$ – Chumbak Dec 18 '20 at 6:04
  • $\begingroup$ @Chumbak No problem. I guess I will give others more time to write answers of their own, but if nobody chimes in I could post an answer about HPhi too. $\endgroup$ – Anyon Dec 18 '20 at 16:11
  • $\begingroup$ Yeah, Sure, Thanks $\endgroup$ – Chumbak Dec 18 '20 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.