# I How to simulate a lattice with boundary conditions?

1. Sep 23, 2017

### Amentia

Hello,

My question is very simple but I do not have a lot of experience with simulation. I want to write some code to simulate a lattice with boundary conditions and then I will perform calculations with the Hubbard model to find different kinds of properties of interest. I would like to know how to do this first step, for any lattice (you can choose a simple one like a square lattice with few atoms to give an example).

Thank you!

2. Sep 24, 2017

### Lord Jestocost

Maybe, you might use "periodic boundary" conditions, but I am not really sure whether it works when simulating a Hubbard model on a two dimensional lattice. I am sure, however, that there is many stuff around if you search in this direction.

3. Sep 24, 2017

### Amentia

Hello,

Thank you for your answer. In fact, I did not find anything, maybe because it is too simple. My question is even more simple than that: assume no boundary conditions, what should I write to model a system like two sites with two electrons that can be on either site with a hopping parameter t=1? Because I think once I am sure how to link the sites numerically, I should just have to link bottom atomic sites with top atomic sites with the correct t or 0 hopping paramater, in order to simulate the periodic boundary conditions. I know it is possible for a Hubbard model on a 2D lattice because there is already literature on that. But they give their results, not their codes.

4. Sep 24, 2017

### Lord Jestocost

You should search for quantum monte carlo simulations regarding the Hubbard model.

5. Sep 24, 2017

### Amentia

Ok thank you. By the way, is the mean field approximation included into the quantum monte carlo simulations?

6. Sep 24, 2017

### Lord Jestocost

Mean field approximations provide analytical, approximative solutions. Monte Carlo simulations provide numerical solutions.

7. Sep 24, 2017

### Amentia

I am still confused. Maybe I will detail more what I want to do.

1) Create a lattice with sites that can have up to two electrons and link them with a hopping parameter t (main question of this thread)
2) Use this lattice to make a hamiltonian matrix for the kinetic part of the Hubbard model
3) Diagonalize and get the eigenvalues
4) Compute density of states
5) Knowing the number of electrons and the number of sites, find the chemical potential for finite temperature
6) Use a mean field approximation for the second part of the Hamiltonian
7) Plot a curve to see how the material will behave, for example if it is supposed to be ferromagnetic, if there are phase transitions...

8. Sep 24, 2017

### Lord Jestocost

9. Sep 24, 2017

### Amentia

Thank you for the book. I think it is much more involved than what I want to do now but I will keep it for later. It could be of great help.