The ability to simulate quantum systems offers invaluable opportunities for building up intuition and understanding of the bizzare world of quantum mechanics. We developed QuSpin – an open source Python package for exact diagonalisation and dynamics of quantum many-body systems.


Check out QuSpin’s Documentation for guidance how to install and use tha package, as well as the project’s Github repository for more information.


Understanding the physics of many-body quantum condensed matter systems often involves a great deal of numerical simulations, be it to gain intuition about the complicated problem of interest, or because they do not admit an analytical solution which can be expressed in a closed form. QuSpin is an ED-based package which wraps some of the functionality of Python’s Numpy and Scipy libraries, to efficiently allow for the user-friendly simulation of quantum many-body systems [1,2].


Being scientists, it is particularly useful to have a reliable toolbox available at our disposal which allows us to quickly simulate and study these and related nonequilibrium problems. As such, QuSpin offers easy access to performing numerical simulations, which can facilitate the development and inspiration of new ideas and the discovery of novel phenomena, eliminating the cost of spending time to develop a reliable code. Besides theorists, QuSpin will hopefully even prove valuable to experimentalists working on problems containing dynamical setups, as it can help students and researchers focus on perfecting the experiment, rather than worry about writing the supporting simulation code.


With the computational processing power growing higher than ever before, the role played by simulations for theoretical research becomes increasingly more important too. It can, therefore, be expected that in the near future quantum simulations become an integral part of the standard physics university curriculum, and having easily accessible toolboxes, such as QuSpin, is one of the required prerequisites for this anticipated change.

The following snippet of code shows how one can employ QuSpin to study the thermalising dynamics of the following peoriodically-driven closed spin chain

\[i \partial_t|\psi(t)\rangle = H(t)|\psi(t)\rangle,\qquad |\psi(0)\rangle=|\mathrm{GS}[H(t=0)]\rangle\] \[H(t) = \sum_{j=0}^{L-1} \left( JS^z_{j+1}S^z_j + hS^z_j + g\cos(\Omega t)S^x_j \right)\]

in the zero-momentum sector (kblock=0) of positive parity (pblock=1). Click here for more examples.


from quspin.operators import hamiltonian # Hamiltonians and operators
from quspin.basis import spin_basis_1d # Hilbert space spin basis
from quspin.tools.Floquet import Floquet_t_vec # stroboscopic time vector
import numpy as np # generic math functions
#
##### define model parameters #####
L=4 # system size
J=1.0 # spin interaction
g=0.809 # transverse field
h=0.9045 # longitudinal field
##### define periodic drive #####
Omega=4.5 # drive frequency
def drive(t,Omega):
	return np.cos(Omega*t)
drive_args=[Omega]
#
##### construct basis in the 0-total momentum and +1-parity sector
basis=spin_basis_1d(L=L,a=1,kblock=0,pblock=1)
# define PBC site-coupling lists for operators
x_field=[[g,i] for i in range(L)]
z_field=[[h,i] for i in range(L)]
J_nn=[[J,i,(i+1)%L] for i in range(L)] # PBC
# static and dynamic lists
static=[["zz",J_nn],["z",z_field]]
dynamic=[["x",x_field,drive,drive_args]]
##### construct Hamiltonian and define initial state
H=hamiltonian(static,dynamic,dtype=np.float64,basis=basis)
# get GS of H(t=0)
E,V=H.eigsh(time=0.0,k=1,which='SA')
psi_i=V[:,0].squeeze()
##### define time vector and evolve state
t=Floquet_t_vec(Omega,10,1)
psi_t=H.evolve(psi_i,t.i,t.vals)



References:
[1] P. Weinberg and M.B., SciPost Phys. 2, 003 (2017).
[2] P. Weinberg and M.B., SciPost Phys. 7, 020 (2019).

Copyright © 2017 Marin Bukov