update
This commit is contained in:
parent
6b84da5e77
commit
aac766afbe
@ -1,9 +1,6 @@
|
||||
import guan
|
||||
|
||||
# test
|
||||
guan.test()
|
||||
|
||||
# Pauli matrix
|
||||
sigma_0 = guan.sigma_0()
|
||||
sigma_x = guan.sigma_x()
|
||||
sigma_y = guan.sigma_y()
|
||||
|
@ -1,7 +1,6 @@
|
||||
import guan
|
||||
import numpy as np
|
||||
|
||||
# Fourier transform / calculate band structures / plot figures
|
||||
k_array = np.linspace(-np.pi, np.pi, 100)
|
||||
hamiltonian_function = guan.one_dimensional_fourier_transform_with_k(unit_cell=0, hopping=1) # one dimensional chain
|
||||
eigenvalue_array = guan.calculate_eigenvalue_with_one_parameter(k_array, hamiltonian_function)
|
||||
|
@ -1,6 +1,5 @@
|
||||
import guan
|
||||
|
||||
# Hamiltonian of finite size
|
||||
print('\n', guan.hamiltonian_of_finite_size_system_along_one_direction(3), '\n')
|
||||
print(guan.hamiltonian_of_finite_size_system_along_two_directions_for_square_lattice(2, 2), '\n')
|
||||
print(guan.hamiltonian_of_finite_size_system_along_three_directions_for_cubic_lattice(2, 2, 2), '\n')
|
@ -1,7 +1,6 @@
|
||||
import guan
|
||||
import numpy as np
|
||||
|
||||
# Hamiltonian of models in the reciprocal space / calculate band structures / plot figures
|
||||
k_array = np.linspace(-np.pi, np.pi, 100)
|
||||
eigenvalue_array = guan.calculate_eigenvalue_with_one_parameter(k_array, guan.hamiltonian_of_square_lattice_in_quasi_one_dimension)
|
||||
guan.plot(k_array, eigenvalue_array, xlabel='k', ylabel='E', type='-k')
|
||||
|
@ -1,11 +1,10 @@
|
||||
import guan
|
||||
import numpy as np
|
||||
|
||||
# calculate density of states
|
||||
hamiltonian = guan.hamiltonian_of_finite_size_system_along_two_directions_for_square_lattice(2,2)
|
||||
fermi_energy_array = np.linspace(-4, 4, 400)
|
||||
total_dos_array = guan.total_density_of_states_with_fermi_energy_array(fermi_energy_array, hamiltonian, broadening=0.1)
|
||||
guan.plot(fermi_energy_array, total_dos_array, xlabel='E', ylabel='Total DOS', type='-o')
|
||||
guan.plot(fermi_energy_array, total_dos_array, xlabel='E', ylabel='Total DOS', type='-')
|
||||
|
||||
fermi_energy = 0
|
||||
N1 = 3
|
||||
|
@ -1,13 +1,11 @@
|
||||
import guan
|
||||
import numpy as np
|
||||
|
||||
# calculate conductance
|
||||
fermi_energy_array = np.linspace(-4, 4, 400)
|
||||
h00 = guan.hamiltonian_of_finite_size_system_along_one_direction(4)
|
||||
h01 = np.identity(4)
|
||||
conductance_array = guan.calculate_conductance_with_fermi_energy_array(fermi_energy_array, h00, h01)
|
||||
guan.plot(fermi_energy_array, conductance_array, xlabel='E', ylabel='Conductance', type='-')
|
||||
|
||||
# calculate scattering matrix
|
||||
fermi_energy = 0
|
||||
guan.print_or_write_scattering_matrix(fermi_energy, h00, h01)
|
@ -2,12 +2,10 @@ import guan
|
||||
import numpy as np
|
||||
from math import *
|
||||
|
||||
# calculate Chern number
|
||||
chern_number = guan.calculate_chern_number_for_square_lattice(guan.hamiltonian_of_one_QAH_model, precision=100)
|
||||
print('\nChern number=', chern_number)
|
||||
print('\nChern number=', chern_number, '\n')
|
||||
|
||||
# calculate Wilson loop
|
||||
wilson_loop_array = guan.calculate_wilson_loop(guan.hamiltonian_of_ssh_model)
|
||||
print('Wilson loop =', wilson_loop_array)
|
||||
p = np.log(wilson_loop_array)/2/pi/1j
|
||||
print('p =', p, '\n')
|
||||
print('\np =', p, '\n')
|
@ -1,7 +1,6 @@
|
||||
import guan
|
||||
import numpy as np
|
||||
|
||||
# read and write
|
||||
x_array = np.array([1, 2, 3])
|
||||
y_array = np.array([5, 6, 7])
|
||||
guan.write_one_dimensional_data(x_array, y_array, filename='one_dimensional_data')
|
||||
|
Loading…
x
Reference in New Issue
Block a user