module TBit.Systems.SquareLattice where

import TBit.Types
import TBit.Parameterization
import Numeric.LinearAlgebra.HMatrix
import Data.Complex (conjugate)
import Data.Map as M hiding ((!))

parameters = Parameters { scalarParams = loadParams [("m", 1.0)]
                        , vectorParams = M.empty
                        , latticeData  = [ vector [0,1] , vector [1,0] ]
                        , meshingData  = Spacing 0.025}

hgteHamiltonian :: Parameterized Hamiltonian
hgteHamiltonian = do m <- getScalar "m"
                     let mass k = 2 + m - ((cos (k!0) + cos(k!1)) :+ 0.0)
                     let off k = sin (k!0) :+ (negate $ sin (k!1))
                     return $ \k -> (2 >< 2)
                            $ [ mass k ,             off k
                              , conjugate (off k)  , negate $ mass k ]
