Coder Social home page Coder Social logo

hubbardmodel2d's Introduction

HubbardModel2D

A C++ version of the 2D Hubbard Model with arbitrary lattice. The Hubbard Model is defined by

Requirements

  • C++11
  • Eigen3
  • For diagonalization
    • By default the code uses Lanczos using ietl
      • ietl requires Boost and LAPACK
    • To find all eigenvalue/vector or increased resolution there is Spectra. See the note below.

Install

Make and navigate to a build directory (mkdir build; cd build) and run

cmake .. -DEIGEN3_INCLUDE_DIR=/path/to/eigen3 -DIETL_DIR=/path/to/ietl
make -j 2

if using Spectra, add -DSpectra_DIR=/path/to/spectra/include

Note that to change the lattice size, HubbardModel2D needs to be recompiled (see below)

Notes

Defaults to 4x4 lattice with 2 ↑ and 2 ↓ electrons at U/t=4. The boundary conditions are set by the bond file implicitly.
Unfortunately the code doesn't take into account symmetries; therefore it doesn't scale well.

To confirm data see E. Dagotto, A. Moreo, F. Ortolani, D. Poilblanc, J. Riera, Phys. Rev. B 45 (1992) 10741–10760. The default values, Ne=4 and U/t=4 should have a ground state of -11.53029

Input/Running

There is not currently a default lattice, so a list of bonds is required. Place bond.dat in the same folder as the executable when running. Two examples of 4x1 (how to have the code calculate 1D) and 4x4 are included. To use, rename bond_4x4.dat to bond.dat in the build directory.

To set a new lattice size, change #define BASISSIZE sites*2 in Hubbard2D.hpp

One can programatically change the number of electrons and the U/t value using the following command line input:

$ ./HubbardModel2D -ne [#num electrons] -U [# for U/t]

Thefore the default numbers are ./HubbardModel2D -ne 2 -U 4

Spectra


If you use spectra, this code requires a patch of spectra, (for non lanczos)

cp eigenref.patch /path/to/spectra/
git apply eigenref.patch

hubbardmodel2d's People

Contributors

ryanlevy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.