Giter Club home page Giter Club logo

fermionhamiltonian's Introduction

FermionHamiltonian

Before doing calculation of a finite size fermion system, one need to define a Hamiltonian object. This object contains all the information of Hamiltonian in the cluster, like : hopping terms, Coulomb U, inter site V....

After it being defined, it can futher be used for Lanczos or Hoseholder method directly.

example

In this example, adding a hopping term between site 0 and site 3 is shown. In formalism, it represent the term:

t03Σσ(c+c+h.c.)

one can find many more kinds of interactions in source code directly.

program main
  use FermionHamiltonian
  implicit none

  TYPE(Ham)::h
  integer::hpara(8)
  complex*16::v
  character*16::Intp


  ! Initialization  (needed)
  call h%Initialization( ns = 6)


  ! start append H terms  (needed)
  call h%StartAppendingInteraction()


  ! append a hopping term between site 0 and site 3
  Intp     = "Hopping"
  hpara(1) = 0
  hpara(2) = 3
  v        = (1.0_8,0._8)

  call h%AppendingInteraction(InterType=Intp,InterPara=hpara,InterV=v)


  !End appending (needed)  After this subroutine being called, no more terms can be appended into H
  call h%EndAppendingInteraction()


  ! more terms can be found in source code directly.
endprogram

tips

function h%StartAppendingInteraction() must be called before appending interactions. And h%StartAppendingInteraction() must be called after all appending finished. These two subroutines should only (and must ) be called once. h%StartAppendingInteraction() can be called for many times in order to append all kinds of interactions.

fermionhamiltonian's People

Contributors

hengyueli avatar

Watchers

James Cloos 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.