This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import math | |
def gen_E8_lattice(L): | |
for x in itertools.product(range(-L, L+1), repeat=8): | |
if sum(x) % 2 == 0: | |
yield x | |
for x in itertools.product(range(-L, L+1), repeat=8): | |
half = [xi + 0.5 for xi in x] | |
if sum(half) % 2 == 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.interpolate import RegularGridInterpolator | |
plt.rcParams['font.size'] = 14 | |
plt.rcParams['figure.figsize'] = (5, 4) | |
plt.rcParams['text.usetex'] = True | |
n = 100 | |
N = int(1e5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <string> | |
#include <tuple> | |
#include <print> | |
template <size_t n, typename A, typename ...B> | |
size_t nth(A a, B... b) | |
{ if constexpr (n == 0) | |
return a; | |
else |