Skip to content

C++ library with Python interface to calculate the ground state of the non-particle conserving hermitian BCS Hamiltonian in the site basis, by means of Lanczos exact diagonalization.

Notifications You must be signed in to change notification settings

SebWouters/libBCS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##############
##  libBCS  ##
##############

A library to find the ground state of the non-particle conserving hermitian BCS Hamiltonian in the site basis. The latex formula would be:

\begin{equation}
\hat{H} = \sum\limits_{ij\sigma} t^{\sigma}_{ij} \hat{a}_{i \sigma}^{\dagger} \hat{a}_{j \sigma} + \sum\limits_{i} U_i \hat{n}_{i \uparrow} \hat{n}_{i \downarrow} - \mu_{\uparrow} \sum\limits_{i} \hat{n}_{i \uparrow} - \mu_{\downarrow} \sum\limits_{i} \hat{n}_{i \downarrow} + \sum\limits_{ij} \Delta_{ij} \left( \hat{a}_{i \uparrow}^{\dagger} \hat{a}_{j \downarrow}^{\dagger} + \hat{a}_{j \downarrow} \hat{a}_{i \uparrow} \right)
\end{equation}

where the latin letters denote site-indices and the greek letters spin projections. All Hamiltonian parameters should be real. Hermiticity requires the two t-matrices to be symmetric. There are no requirements on the $\Delta$-matrix. This Hamiltonian preserves spin projection, but not particle number. The ground state is calculated by exact diagonalization, more specifically the Lanczos method as implemented in ARPACK.


1. Building the library

     Edit the makefile. Normally only LIBS, CC, CXX, CFLAGS and LDFLAGS have to be set.
     Arpack is needed by the libBCS. For Ubuntu, you can find it in the package repository.

     Run the makefile:
        make -f makefile

2. Generating documentation

     There is a file .doc-config in ./ for doxygen.
     The manual can be generated in two ways:
        make -f makefile doc
     or
        doxygen .doc-config
     A folder ./latex-docs/ is created. Go to that folder and build the manual:
        cd latex-docs
        make -f Makefile
     A file refman.pdf should have been compiled. It contains information on the use of libBCS.

3. Using libBCS

     Two python files should allow for easy use of libBCS.
     PyBCS.py contains the Python class PyBCS, which handles the interface with the C++ library.
     example.py contains two examples showing the usage of the PyBCS class:
     The Hubbard model and the single-particle BCS Hamiltonian.

     Have fun!

Sebastian <sebastianwouters@ugent.be>


About

C++ library with Python interface to calculate the ground state of the non-particle conserving hermitian BCS Hamiltonian in the site basis, by means of Lanczos exact diagonalization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published