|
78 | 78 | }, |
79 | 79 | "outputs": [], |
80 | 80 | "source": [ |
81 | | - "!pip install sparse_ir\n", |
82 | 81 | "import numpy as np\n", |
83 | 82 | "import scipy\n", |
84 | 83 | "import itertools\n", |
|
150 | 149 | " gx = vd @ gx @ v\n", |
151 | 150 | " gy = vd @ gy @ v\n", |
152 | 151 | " gxy = vd @ gxy @ v\n", |
153 | | - " chi_iw += np.einsum(\"ab, bmn, bc, cmn, cd, dmn, da, amn->mn\", \n", |
| 152 | + " chi_iw += np.einsum(\"ab, bmn, bc, cmn, cd, dmn, da, amn->mn\",\n", |
154 | 153 | " gx, giw, gy, giw, gx, giw, gy, giw, optimize=True)\n", |
155 | 154 | " chi_iw += (1/2) * np.einsum(\"ab, bmn, bc, cmn, ca, amn->mn\",\n", |
156 | 155 | " gx, giw, gy, giw, gxy, giw, optimize=True)\n", |
|
314 | 313 | " kx, ky = 2*np.pi*k[0]/a, 2*np.pi*(k[0] + 2*k[1])/(a*sq3)\n", |
315 | 314 | " h = -t * (np.exp(1j*ky*a/sq3) + 2 * np.cos(kx*a/2) * np.exp(-1j*ky*a/(2*sq3)))\n", |
316 | 315 | " hk = np.array([ [ 0, h ], [ np.conj(h), 0 ] ])\n", |
317 | | - " \n", |
| 316 | + "\n", |
318 | 317 | " hx = t * a * np.sin(kx/2) * np.exp(-1j*ky/(2*sq3))\n", |
319 | 318 | " hy = -t * a * (1j/sq3 * (np.exp(1j*ky/sq3) - np.cos(kx/2) * np.exp(-1j*ky/(2*sq3))))\n", |
320 | 319 | " gx = np.array([ [ 0, hx ], [ np.conj(hx), 0 ] ])\n", |
321 | 320 | " gy = np.array([ [ 0, hy ], [ np.conj(hy), 0 ] ])\n", |
322 | | - " \n", |
| 321 | + "\n", |
323 | 322 | " hxy = -t * a * a * 1j/(2*sq3) * np.sin(kx/2) * np.exp(-1j*ky/(2*sq3))\n", |
324 | 323 | " gxy = np.array([ [ 0, hxy ], [ np.conj(hxy), 0 ] ])\n", |
325 | 324 | "\n", |
|
379 | 378 | "name": "python", |
380 | 379 | "nbconvert_exporter": "python", |
381 | 380 | "pygments_lexer": "ipython3", |
382 | | - "version": "3.13.3" |
| 381 | + "version": "3.13.9" |
383 | 382 | } |
384 | 383 | }, |
385 | 384 | "nbformat": 4, |
|
0 commit comments