Lynn-015 / NJU_DMRG

Other
0 stars 0 forks source link

Task1. Tight binding chain model #1

Open GiggleLiu opened 9 years ago

GiggleLiu commented 9 years ago

Solve the tight-binding chain hamiltonian, with on-site energy e0=0.2, hopping t = 1 and chain length N=100.

  1. write down the hamiltonian.
  2. plot the band in k-space.
  3. show the density of states(DOS).

Deadline: Nov. 10 2015

Technical Note: Use python and it's numerical libraries - numpy, matplotlib. For the DOS, use Lorenzian broadening method. Any problem, welcome to A505.

GiggleLiu commented 9 years ago

Comment on YangLin's HomeWork:

  1. The result is basically correct, numpy is used efficiently.
  2. Less global variables, global variables are not flexible.
  3. Use np.pi instead of 3.14, double precision is required.
  4. Documentation should be added! In the form
def func(a,b):
    '''
    descriptions.

    a:
        the type and meaning of parameter a.
    b:
        the type and meaning of parameter b.

    *return*:
        the type and meaning of return values.
    '''
    <body>
  1. In density_of_state function, both k=0 and k=2*pi/a are considered in the while loop, which is double counted.
  2. To make the program more efficient, broadcasting is needed in density_of_state function.