QuantumLattices.jl

CI codecov 996.icu LICENSE LICENSE Code Style: Blue ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

Julia package for the construction of quantum lattice systems.

Welcome to QuantumLattices. Here we provide a general framework to construct the operator-formed Hamiltonian of any quantum lattice system, with the inputs as simple as its description by the natural language. This operator-formed Hamiltonian supports complete symbolic computations when combined with SymPy, and can serve as a convenient frontend of quantum many-body algorithms, such as TBA (tight-bind approximation), LSWT (linear spin wave theory), SCMF (self-consistent mean field theory), ED (exact diagonalization), CPT/VCA (cluster perturbation theory / variational cluster approach), DMRG (density matrix renormalization group), RPA (random phase approximation), etc. Generic interfaces are defined to provide a unified access to these algorithms with automatic project management.

Installation

In Julia v1.8+, please type ] in the REPL to use the package mode, then type this command:

pkg> add QuantumLattices

Quick Start

Build your first quantum lattice system in just a few lines:

using QuantumLattices
using SymPy: Sym, symbols

# 1. Define the lattice (1D chain with 2 sites)
lattice = Lattice([zero(Sym)], [one(Sym)])

# 2. Define the internal degrees of freedom (spin-1/2 fermions)
hilbert = Hilbert(site => Fock{:f}(1, 2) for site in eachindex(lattice))

# 3. Define the Hamiltonian terms
t = Hopping(:t, symbols("t", real=true), 1) # nearest-neighbor hopping
U = Hubbard(:U, symbols("U", real=true))    # Hubbard interaction

# 4. Generate the Hamiltonian operators
operators = expand(OperatorGenerator(bonds(lattice, 1), hilbert, (t, U)))

This generates all the operators in the Hamiltonian:

\[H = t c^\dagger_{1\uparrow} c_{2\uparrow} + t c^\dagger_{2\uparrow} c_{1\uparrow} + t c^\dagger_{1\downarrow} c_{2\downarrow} + t c^\dagger_{2\downarrow} c_{1\downarrow} + U n_{1\uparrow} n_{1\downarrow} + U n_{2\uparrow} n_{2\downarrow}\]

Package Features

The mathematical foundations of our package are that the operators in a lattice Hamiltonian:

  • act on local Hilbert spaces, and
  • form an algebra over the complex field.

Based on this, the package provides the following features:

  • Unitcell Description Framework: The Hamiltonian can be constructed based on the unitcell of a lattice, using information about the local algebra acting on the local Hilbert space at each point and the terms that couple different degrees of freedom on the same or different points. This information can be provided to the program in the same way as describing the quantum system in a research paper.

  • Complete Symbolic Computation: With this package alone, symbolic computation between operators is supported while keeping the coefficients of any operator numeric. By integrating it with SymPy, complete symbolic computation can be achieved without requiring any modifications to the methods in this package.

  • Generic Frontend of Many-Body Algorithms: Using the operator-formed Hamiltonian as a foundation, quantum many-body algorithms can be initialized in a consistent manner with minimal modifications. Moreover, automatic project management is provided, including result recording, data caching, parameter updating, information logging, dependency management, and more.

Supported Systems

Four common categories of quantum lattice systems in condensed matter physics are supported:

  • Canonical complex fermionic systems
  • Canonical complex and hard-core bosonic systems
  • SU(2) spin systems
  • Phononic systems

Furthermore, other systems can be easily supported by extending the generic protocols provided in this package.

Supported Algorithms

Concrete algorithms can be considered as the "backend" of quantum lattice systems. They are developed in separate packages:

  • TBA: Tight-binding approximation for complex-fermionic/complex-bosonic/phononic systems.
  • LSWT: Linear spin wave theory for magnetically ordered local-spin systems.
  • SCMF: Self-consistent mean field theory for complex fermionic systems.
  • ED: Exact diagonalization for complex-fermionic/hard-core-bosonic/local-spin systems.
  • CPT/VCA: Cluster perturbation theory and variational cluster approach for complex fermionic and local spin systems.
  • DMRG: Density matrix renormalization group for complex-fermionic/hard-core-bosonic/local-spin systems based on TensorKit and MPSKit.
  • RPA: Random phase approximation for complex fermionic systems.

Getting Started

Note

Due to the rapid development of this package, releases with different minor version numbers are not guaranteed to be compatible with previous ones before the release of v1.0.0. Comments are welcomed in the GitHub issues.

Contact

  • Email: waltergu1989@gmail.com

Python Counterpart

HamiltonianPy: The authors of this Julia package initially worked on a Python package before transitioning to Julia.