QuSpin

QuSpin is an open-source Python package for exact diagonalization (ED) and quantum dynamics of arbitrary boson, fermion, and spin many-body systems. Developed by the Quantum Many-Body Dynamics Group, it wraps SciPy, NumPy, and custom C++…

3. DMFT & MANY-BODY 3.5 Exact Diagonalization VERIFIED 1 paper
Back to Directory Official Website

Overview

QuSpin is an open-source Python package for exact diagonalization (ED) and quantum dynamics of arbitrary boson, fermion, and spin many-body systems. Developed by the Quantum Many-Body Dynamics Group, it wraps SciPy, NumPy, and custom C++/Cython libraries to offer state-of-the-art exact diagonalization calculations with a user-friendly Python interface.

Reference Papers (1)

Full Documentation

Official Resources

  • Homepage: https://quspin.github.io/QuSpin/
  • Source Repository: https://github.com/QuSpin/QuSpin
  • Documentation: https://quspin.github.io/QuSpin/
  • License: BSD-3-Clause License

Overview

QuSpin is an open-source Python package for exact diagonalization (ED) and quantum dynamics of arbitrary boson, fermion, and spin many-body systems. Developed by the Quantum Many-Body Dynamics Group, it wraps SciPy, NumPy, and custom C++/Cython libraries to offer state-of-the-art exact diagonalization calculations with a user-friendly Python interface.

QuSpin supports various user-defined symmetries for one and higher-dimensional lattice systems, including translation, reflection, and spin inversion symmetries in 1D, as well as user-defined symmetries based on elementary transformations (site and spin flips). It enables (imaginary) time evolution following arbitrary user-specified driving protocols, constrained Hilbert spaces, and parallel sparse linear algebra tools. The package is designed for both educational and research use in condensed matter physics.

Scientific domain: Quantum many-body physics, condensed matter, exact diagonalization
Target user community: Condensed matter physicists, quantum information researchers

Theoretical Methods

  • Exact diagonalization of many-body Hamiltonians
  • Sparse and dense matrix representations
  • Symmetry-based Hilbert space reduction
  • (Imaginary) time evolution via Schrödinger equation
  • User-defined driving protocols
  • Floquet engineering and periodically-driven systems
  • Constrained Hilbert space calculations
  • Many-body localization studies

Capabilities (CRITICAL)

  • Arbitrary boson, fermion, and spin many-body systems
  • User-defined symmetries (translation, reflection, spin inversion, custom)
  • 1D and higher-dimensional lattice support
  • Time-dependent Hamiltonians with arbitrary driving protocols
  • Constrained Hilbert spaces
  • Parallel sparse linear algebra
  • Floquet time vectors and stroboscopic analysis
  • Gross-Pitaevskii equation (GPE) solver
  • Pre-defined models (Haldane, BHZ) and custom model support
  • Code generation in multiple languages
  • Pre-compiled binaries for Linux, macOS, Windows

Inputs & Outputs

Input formats:

  • Python scripts using quspin.basis, quspin.operators, quspin.tools modules
  • Static and dynamic operator lists
  • Lattice geometry and coupling specifications
  • Symmetry specifications

Output data types:

  • Hamiltonian matrices (sparse or dense)
  • Eigenvalues and eigenvectors
  • Time-evolved states
  • Observables and expectation values
  • Floquet quasi-energies

Interfaces & Ecosystem

  • Programming language: Python with C++/Cython backend
  • Dependencies: NumPy, SciPy
  • Installation: pip install quspin
  • Platforms: Linux, macOS, Windows (64-bit, pre-compiled)
  • Related tools: SciPy sparse matrix library, NumPy arrays

Limitations & Known Constraints

  • Exact diagonalization limited to small systems (Hilbert space grows exponentially)
  • Memory requirements grow rapidly with system size
  • Sparse matrix operations can be slow for very large systems
  • Some advanced features require understanding of symmetry group theory

Performance Characteristics

  • C++/Cython backend for performance-critical operations
  • Sparse matrix storage for memory efficiency
  • Symmetry reduction dramatically decreases effective Hilbert space size
  • Parallel sparse linear algebra tools
  • Pre-compiled binaries for cross-platform performance

Comparison with Other Codes

  • vs QuTiP: QuTiP focuses on open quantum systems; QuSpin focuses on lattice many-body ED
  • vs ITensor: ITensor uses tensor network methods; QuSpin uses exact diagonalization
  • vs ALPS: ALPS is C++-based; QuSpin provides Python interface with C++ backend
  • vs TenPy: TenPy focuses on tensor networks for 1D; QuSpin focuses on ED

Best Practices

  • Use symmetries to reduce Hilbert space size whenever possible
  • Use sparse matrices for large systems
  • Leverage the basis module for automated symmetry handling
  • Use the tools module for evolution and Floquet analysis
  • Follow example scripts for many-body localization and quantum scars

Verification & Sources

Primary sources:

  1. Official website: https://quspin.github.io/QuSpin/
  2. GitHub repository: https://github.com/QuSpin/QuSpin
  3. P. Weinberg and M. Bukov, SciPost Phys. 2, 003 (2017)
  4. PyPI: https://pypi.org/project/quspin/

Confidence: VERIFIED - Official website, GitHub, and PyPI all confirmed accessible

Related Tools in 3.5 Exact Diagonalization