update
This commit is contained in:
parent
5d781ae1f3
commit
315cf278a3
@ -1,3 +1,8 @@
|
|||||||
|
"""
|
||||||
|
This code is supported by the website: https://www.guanjihuan.com
|
||||||
|
The newest version of this code is on the web page: https://www.guanjihuan.com/archives/16199
|
||||||
|
"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from math import *
|
from math import *
|
||||||
import cmath
|
import cmath
|
||||||
|
@ -1,18 +1,23 @@
|
|||||||
|
"""
|
||||||
|
This code is supported by the website: https://www.guanjihuan.com
|
||||||
|
The newest version of this code is on the web page: https://www.guanjihuan.com/archives/16730
|
||||||
|
"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from math import *
|
from math import *
|
||||||
import guan
|
import guan
|
||||||
|
|
||||||
def hamiltonian(kx, ky): # kagome lattice
|
def hamiltonian(kx, ky): # kagome lattice
|
||||||
k1 = kx
|
k1_dot_a1 = kx
|
||||||
k2 = kx/2+ky*sqrt(3)/2
|
k2_dot_a2 = kx/2+ky*sqrt(3)/2
|
||||||
k3 = -kx/2+ky*sqrt(3)/2
|
k3_dot_a3 = -kx/2+ky*sqrt(3)/2
|
||||||
h = np.zeros((3, 3), dtype=complex)
|
h = np.zeros((3, 3), dtype=complex)
|
||||||
h[0, 1] = cos(k1)
|
h[0, 1] = 2*cos(k1_dot_a1)
|
||||||
h[0, 2] = cos(k2)
|
h[0, 2] = 2*cos(k2_dot_a2)
|
||||||
h[1, 2] = cos(k3)
|
h[1, 2] = 2*cos(k3_dot_a3)
|
||||||
h = h + h.transpose().conj()
|
h = h + h.transpose().conj()
|
||||||
t = 1
|
t = 1
|
||||||
h = -2*t*h
|
h = -t*h
|
||||||
return h
|
return h
|
||||||
|
|
||||||
kx_array = np.linspace(-pi ,pi, 100)
|
kx_array = np.linspace(-pi ,pi, 100)
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
NotebookFileLineBreakTest
|
NotebookFileLineBreakTest
|
||||||
NotebookFileLineBreakTest
|
NotebookFileLineBreakTest
|
||||||
NotebookDataPosition[ 158, 7]
|
NotebookDataPosition[ 158, 7]
|
||||||
NotebookDataLength[ 2340, 82]
|
NotebookDataLength[ 2422, 82]
|
||||||
NotebookOptionsPosition[ 2002, 67]
|
NotebookOptionsPosition[ 2082, 67]
|
||||||
NotebookOutlinePosition[ 2387, 84]
|
NotebookOutlinePosition[ 2469, 84]
|
||||||
CellTagsIndexPosition[ 2344, 81]
|
CellTagsIndexPosition[ 2426, 81]
|
||||||
WindowFrame->Normal*)
|
WindowFrame->Normal*)
|
||||||
|
|
||||||
(* Beginning of Notebook Content *)
|
(* Beginning of Notebook Content *)
|
||||||
@ -21,16 +21,16 @@ Notebook[{
|
|||||||
Cell[BoxData[{
|
Cell[BoxData[{
|
||||||
RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], "\n",
|
RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], "\n",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"k1", "=", "kx"}], ";"}], "\n",
|
RowBox[{"k1a1", "=", "kx"}], ";"}], "\n",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"k2", "=",
|
RowBox[{"k2a2", "=",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"kx", "/", "2"}], "+",
|
RowBox[{"kx", "/", "2"}], "+",
|
||||||
RowBox[{"ky", "*",
|
RowBox[{"ky", "*",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"Sqrt", "[", "3", "]"}], "/", "2"}]}]}]}], ";"}], "\n",
|
RowBox[{"Sqrt", "[", "3", "]"}], "/", "2"}]}]}]}], ";"}], "\n",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"k3", "=",
|
RowBox[{"k3a3", "=",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"-", "kx"}], "/", "2"}], "+",
|
RowBox[{"-", "kx"}], "/", "2"}], "+",
|
||||||
@ -46,27 +46,27 @@ Cell[BoxData[{
|
|||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"{",
|
RowBox[{"{",
|
||||||
RowBox[{"0", ",",
|
RowBox[{"0", ",",
|
||||||
RowBox[{"Cos", "[", "k1", "]"}], ",",
|
RowBox[{"Cos", "[", "k1a1", "]"}], ",",
|
||||||
RowBox[{"Cos", "[", "k2", "]"}]}], "}"}], ",",
|
RowBox[{"Cos", "[", "k2a2", "]"}]}], "}"}], ",",
|
||||||
RowBox[{"{",
|
RowBox[{"{",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"Cos", "[", "k1", "]"}], ",", "0", ",",
|
RowBox[{"Cos", "[", "k1a1", "]"}], ",", "0", ",",
|
||||||
RowBox[{"Cos", "[", "k3", "]"}]}], "}"}], ",",
|
RowBox[{"Cos", "[", "k3a3", "]"}]}], "}"}], ",",
|
||||||
RowBox[{"{",
|
RowBox[{"{",
|
||||||
RowBox[{
|
RowBox[{
|
||||||
RowBox[{"Cos", "[", "k2", "]"}], ",",
|
RowBox[{"Cos", "[", "k2a2", "]"}], ",",
|
||||||
RowBox[{"Cos", "[", "k3", "]"}], ",", "0"}], "}"}]}], "}"}],
|
RowBox[{"Cos", "[", "k3a3", "]"}], ",", "0"}], "}"}]}], "}"}],
|
||||||
")"}]}]}], ";"}], "\n",
|
")"}]}]}], ";"}], "\n",
|
||||||
RowBox[{"MatrixForm", "[", "H", "]"}], "\n",
|
RowBox[{"MatrixForm", "[", "H", "]"}], "\n",
|
||||||
RowBox[{"eigenvalue", "=",
|
RowBox[{"eigenvalue", "=",
|
||||||
RowBox[{"MatrixForm", "[",
|
RowBox[{"MatrixForm", "[",
|
||||||
RowBox[{"Eigenvalues", "[", "H", "]"}], "]"}]}]}], "Input",
|
RowBox[{"Eigenvalues", "[", "H", "]"}], "]"}]}]}], "Input",
|
||||||
CellChangeTimes->{{3.837485198864452*^9,
|
CellChangeTimes->{{3.837485198864452*^9, 3.837485198867505*^9}, {
|
||||||
3.837485198867505*^9}},ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-\
|
3.837497369979506*^9, 3.8374974574378343`*^9}},
|
||||||
d94836d031ca"]
|
CellLabel->"",ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-d94836d031ca"]
|
||||||
},
|
},
|
||||||
WindowSize->{1904, 997},
|
WindowSize->{1147, 812},
|
||||||
WindowMargins->{{-8, Automatic}, {Automatic, 0}},
|
WindowMargins->{{Automatic, 228}, {22, Automatic}},
|
||||||
Magnification:>1.7 Inherited,
|
Magnification:>1.7 Inherited,
|
||||||
FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (2019\:5e744\:67088\
|
FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (2019\:5e744\:67088\
|
||||||
\:65e5)",
|
\:65e5)",
|
||||||
@ -83,7 +83,7 @@ CellTagsIndex->{}
|
|||||||
*)
|
*)
|
||||||
(*NotebookFileOutline
|
(*NotebookFileOutline
|
||||||
Notebook[{
|
Notebook[{
|
||||||
Cell[558, 20, 1440, 45, 419, "Input",ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-d94836d031ca"]
|
Cell[558, 20, 1520, 45, 514, "Input",ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-d94836d031ca"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
*)
|
*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user