update
This commit is contained in:
		| @@ -0,0 +1,21 @@ | |||||||
|  | import numpy as np | ||||||
|  | from math import * | ||||||
|  | import guan | ||||||
|  |  | ||||||
|  | def hamiltonian(kx, ky):  # kagome lattice | ||||||
|  |     k1 = kx | ||||||
|  |     k2 = kx/2+ky*sqrt(3)/2 | ||||||
|  |     k3 = -kx/2+ky*sqrt(3)/2 | ||||||
|  |     h = np.zeros((3, 3), dtype=complex) | ||||||
|  |     h[0, 1] = cos(k1) | ||||||
|  |     h[0, 2] = cos(k2) | ||||||
|  |     h[1, 2] = cos(k3) | ||||||
|  |     h = h + h.transpose().conj() | ||||||
|  |     t = 1 | ||||||
|  |     h = -2*t*h | ||||||
|  |     return h | ||||||
|  |  | ||||||
|  | kx_array = np.linspace(-pi ,pi, 100) | ||||||
|  | ky_array = np.linspace(-pi ,pi, 100) | ||||||
|  | eigenvalue_array = guan.calculate_eigenvalue_with_two_parameters(kx_array, ky_array, hamiltonian) | ||||||
|  | guan.plot_3d_surface(kx_array, ky_array, eigenvalue_array, xlabel='kx', ylabel='ky', zlabel='E') | ||||||
| @@ -0,0 +1,90 @@ | |||||||
|  | (* Content-type: application/vnd.wolfram.mathematica *) | ||||||
|  |  | ||||||
|  | (*** Wolfram Notebook File ***) | ||||||
|  | (* http://www.wolfram.com/nb *) | ||||||
|  |  | ||||||
|  | (* CreatedBy='Mathematica 12.0' *) | ||||||
|  |  | ||||||
|  | (*CacheID: 234*) | ||||||
|  | (* Internal cache information: | ||||||
|  | NotebookFileLineBreakTest | ||||||
|  | NotebookFileLineBreakTest | ||||||
|  | NotebookDataPosition[       158,          7] | ||||||
|  | NotebookDataLength[      2340,         82] | ||||||
|  | NotebookOptionsPosition[      2002,         67] | ||||||
|  | NotebookOutlinePosition[      2387,         84] | ||||||
|  | CellTagsIndexPosition[      2344,         81] | ||||||
|  | WindowFrame->Normal*) | ||||||
|  |  | ||||||
|  | (* Beginning of Notebook Content *) | ||||||
|  | Notebook[{ | ||||||
|  | Cell[BoxData[{ | ||||||
|  |  RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], "\n",  | ||||||
|  |  RowBox[{ | ||||||
|  |   RowBox[{"k1", "=", "kx"}], ";"}], "\n",  | ||||||
|  |  RowBox[{ | ||||||
|  |   RowBox[{"k2", "=",  | ||||||
|  |    RowBox[{ | ||||||
|  |     RowBox[{"kx", "/", "2"}], "+",  | ||||||
|  |     RowBox[{"ky", "*",  | ||||||
|  |      RowBox[{ | ||||||
|  |       RowBox[{"Sqrt", "[", "3", "]"}], "/", "2"}]}]}]}], ";"}], "\n",  | ||||||
|  |  RowBox[{ | ||||||
|  |   RowBox[{"k3", "=",  | ||||||
|  |    RowBox[{ | ||||||
|  |     RowBox[{ | ||||||
|  |      RowBox[{"-", "kx"}], "/", "2"}], "+",  | ||||||
|  |     RowBox[{"ky", "*",  | ||||||
|  |      RowBox[{ | ||||||
|  |       RowBox[{"Sqrt", "[", "3", "]"}], "/", "2"}]}]}]}], ";"}], "\n",  | ||||||
|  |  RowBox[{ | ||||||
|  |   RowBox[{"H", "=",  | ||||||
|  |    RowBox[{ | ||||||
|  |     RowBox[{"-", "2"}], "*", "t", "*",  | ||||||
|  |     RowBox[{"(",  | ||||||
|  |      RowBox[{"{",  | ||||||
|  |       RowBox[{ | ||||||
|  |        RowBox[{"{",  | ||||||
|  |         RowBox[{"0", ",",  | ||||||
|  |          RowBox[{"Cos", "[", "k1", "]"}], ",",  | ||||||
|  |          RowBox[{"Cos", "[", "k2", "]"}]}], "}"}], ",",  | ||||||
|  |        RowBox[{"{",  | ||||||
|  |         RowBox[{ | ||||||
|  |          RowBox[{"Cos", "[", "k1", "]"}], ",", "0", ",",  | ||||||
|  |          RowBox[{"Cos", "[", "k3", "]"}]}], "}"}], ",",  | ||||||
|  |        RowBox[{"{",  | ||||||
|  |         RowBox[{ | ||||||
|  |          RowBox[{"Cos", "[", "k2", "]"}], ",",  | ||||||
|  |          RowBox[{"Cos", "[", "k3", "]"}], ",", "0"}], "}"}]}], "}"}],  | ||||||
|  |      ")"}]}]}], ";"}], "\n",  | ||||||
|  |  RowBox[{"MatrixForm", "[", "H", "]"}], "\n",  | ||||||
|  |  RowBox[{"eigenvalue", "=",  | ||||||
|  |   RowBox[{"MatrixForm", "[",  | ||||||
|  |    RowBox[{"Eigenvalues", "[", "H", "]"}], "]"}]}]}], "Input", | ||||||
|  |  CellChangeTimes->{{3.837485198864452*^9,  | ||||||
|  |   3.837485198867505*^9}},ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-\ | ||||||
|  | d94836d031ca"] | ||||||
|  | }, | ||||||
|  | WindowSize->{1904, 997}, | ||||||
|  | WindowMargins->{{-8, Automatic}, {Automatic, 0}}, | ||||||
|  | Magnification:>1.7 Inherited, | ||||||
|  | FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (2019\:5e744\:67088\ | ||||||
|  | \:65e5)", | ||||||
|  | StyleDefinitions->"Default.nb" | ||||||
|  | ] | ||||||
|  | (* End of Notebook Content *) | ||||||
|  |  | ||||||
|  | (* Internal cache information *) | ||||||
|  | (*CellTagsOutline | ||||||
|  | CellTagsIndex->{} | ||||||
|  | *) | ||||||
|  | (*CellTagsIndex | ||||||
|  | CellTagsIndex->{} | ||||||
|  | *) | ||||||
|  | (*NotebookFileOutline | ||||||
|  | Notebook[{ | ||||||
|  | Cell[558, 20, 1440, 45, 419, "Input",ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-d94836d031ca"] | ||||||
|  | } | ||||||
|  | ] | ||||||
|  | *) | ||||||
|  |  | ||||||
		Reference in New Issue
	
	Block a user
	 guanjihuan
					guanjihuan