|
45 | 45 | "In second quantization, the TB Hamiltonian is given by:\n", |
46 | 46 | "\n", |
47 | 47 | "$$\n", |
48 | | - "H = -\\sum_{i j l_1 l_2 \\sigma} t_{i j}^{l_1 l_2} [c^{\\dagger}_{i l_1 \\sigma} c_{j l_2 \\sigma} + c^{\\dagger}_{j l_2 \\sigma} c_{i l_1 \\sigma}]\n", |
| 48 | + "H = -\\sum_{<i j> l_1 l_2 \\sigma} t_{i j}^{l_1 l_2} [c^{\\dagger}_{i l_1 \\sigma} c_{j l_2 \\sigma} + c^{\\dagger}_{j l_2 \\sigma} c_{i l_1 \\sigma}]\n", |
49 | 49 | "$$\n", |
50 | 50 | "\n", |
51 | 51 | "where:\n", |
|
110 | 110 | }, |
111 | 111 | { |
112 | 112 | "cell_type": "code", |
113 | | - "execution_count": 4, |
| 113 | + "execution_count": 17, |
114 | 114 | "metadata": {}, |
115 | | - "outputs": [], |
| 115 | + "outputs": [ |
| 116 | + { |
| 117 | + "ename": "ImportError", |
| 118 | + "evalue": "cannot import name 'TB_to_sympy' from 'triqs.lattice.utils' (/Users/munenekariuki/opt/anaconda3/envs/TRIQS/lib/python3.11/site-packages/triqs/lattice/utils.py)", |
| 119 | + "output_type": "error", |
| 120 | + "traceback": [ |
| 121 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 122 | + "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", |
| 123 | + "Cell \u001b[0;32mIn[17], line 11\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mmatplotlib\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mpyplot\u001b[39;00m \u001b[39mas\u001b[39;00m \u001b[39mplt\u001b[39;00m\n\u001b[1;32m 10\u001b[0m \u001b[39m# import all files from lattice in TRIQS\u001b[39;00m\n\u001b[0;32m---> 11\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mtriqs\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mlattice\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mutils\u001b[39;00m \u001b[39mimport\u001b[39;00m TB_to_sympy\n", |
| 124 | + "\u001b[0;31mImportError\u001b[0m: cannot import name 'TB_to_sympy' from 'triqs.lattice.utils' (/Users/munenekariuki/opt/anaconda3/envs/TRIQS/lib/python3.11/site-packages/triqs/lattice/utils.py)" |
| 125 | + ] |
| 126 | + } |
| 127 | + ], |
116 | 128 | "source": [ |
117 | 129 | "# importing the dependencies\n", |
118 | 130 | "from itertools import product as itp\n", |
|
124 | 136 | "import matplotlib.pyplot as plt\n", |
125 | 137 | "\n", |
126 | 138 | "# import all files from lattice in TRIQS\n", |
127 | | - "import triqs.lattice " |
| 139 | + "\n", |
| 140 | + "# # importing it from TRIQS repo\n", |
| 141 | + "# from triqs.lattice.utils import TB_to_sympy\n", |
| 142 | + "\n", |
| 143 | + "# importing it from this locala tutorials repo\n", |
| 144 | + "from TB_to_sympy import TB_to_sympy" |
128 | 145 | ] |
129 | 146 | }, |
130 | 147 | { |
|
136 | 153 | }, |
137 | 154 | { |
138 | 155 | "cell_type": "code", |
139 | | - "execution_count": 5, |
| 156 | + "execution_count": 11, |
140 | 157 | "metadata": {}, |
141 | 158 | "outputs": [], |
142 | 159 | "source": [ |
|
152 | 169 | "cell_type": "markdown", |
153 | 170 | "metadata": {}, |
154 | 171 | "source": [ |
155 | | - "We can call ```TB_from_sympy``` for different cases depending on the values we assign to its parameters. Here is one case:" |
| 172 | + "We can call ```TB_to_sympy``` for different cases depending on the values we assign to its parameters. Here is one case:" |
156 | 173 | ] |
157 | 174 | }, |
158 | 175 | { |
159 | 176 | "cell_type": "code", |
160 | | - "execution_count": 6, |
| 177 | + "execution_count": 12, |
161 | 178 | "metadata": {}, |
162 | 179 | "outputs": [ |
163 | 180 | { |
164 | | - "name": "stdout", |
165 | | - "output_type": "stream", |
166 | | - "text": [ |
167 | | - "The analytical expression \n", |
168 | | - " [[-0.88*cos(a1k + a3k) - 0.88*cos(a2k + a3k) + 0.159]]\n" |
| 181 | + "ename": "NameError", |
| 182 | + "evalue": "name 'TB_to_sympy' is not defined", |
| 183 | + "output_type": "error", |
| 184 | + "traceback": [ |
| 185 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 186 | + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", |
| 187 | + "Cell \u001b[0;32mIn[12], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m\"\u001b[39m\u001b[39mThe analytical expression \u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m\"\u001b[39m, TB_to_sympy(w90_triqs_La2CuO4, analytical \u001b[39m=\u001b[39m \u001b[39mTrue\u001b[39;00m, precision \u001b[39m=\u001b[39m \u001b[39m3\u001b[39m))\n", |
| 188 | + "\u001b[0;31mNameError\u001b[0m: name 'TB_to_sympy' is not defined" |
169 | 189 | ] |
170 | 190 | } |
171 | 191 | ], |
|
175 | 195 | }, |
176 | 196 | { |
177 | 197 | "cell_type": "code", |
178 | | - "execution_count": 7, |
| 198 | + "execution_count": 13, |
179 | 199 | "metadata": {}, |
180 | 200 | "outputs": [ |
181 | 201 | { |
182 | | - "name": "stdout", |
183 | | - "output_type": "stream", |
184 | | - "text": [ |
185 | | - "The numerical expression \n", |
186 | | - " [[-0.88*cos(3.818*kx) - 0.88*cos(3.818*ky) + 0.159]]\n" |
| 202 | + "ename": "NameError", |
| 203 | + "evalue": "name 'TB_to_sympy' is not defined", |
| 204 | + "output_type": "error", |
| 205 | + "traceback": [ |
| 206 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 207 | + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", |
| 208 | + "Cell \u001b[0;32mIn[13], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m\"\u001b[39m\u001b[39mThe numerical expression \u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m\"\u001b[39m, TB_to_sympy(w90_triqs_La2CuO4, analytical \u001b[39m=\u001b[39m \u001b[39mFalse\u001b[39;00m, precision \u001b[39m=\u001b[39m \u001b[39m3\u001b[39m))\n", |
| 209 | + "\u001b[0;31mNameError\u001b[0m: name 'TB_to_sympy' is not defined" |
187 | 210 | ] |
188 | 211 | } |
189 | 212 | ], |
|
0 commit comments