Skip to content

Commit 9b60091

Browse files
committed
fixed mistake in Spinor Action function
1 parent d6809ef commit 9b60091

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+417
-122
lines changed

manifold_sampler/Action.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def paral_trans(A): ### check how to calculate parallel transporter
5757

5858
def S_spinor(D):
5959
logdet = np.linalg.slogdet(D)
60-
return 1 / 2 * logdet[1]
60+
return - 1 / 2 * logdet[1] ### important: minus sign
6161

6262

6363
def Dirac_Yukawa_op(adj, sign, D=None, triangles=None, phi=None, A=None):
@@ -136,19 +136,15 @@ def Dirac_operator(adj, sign, D=None, triangles=None, A=None):
136136

137137
sink, sinq, cosk, cosq = np.sin(theta[k] / 2), np.sin(theta[q] / 2), np.cos(theta[k] / 2), np.cos(
138138
theta[q] / 2)
139-
H1 = sign[edge] * np.array([[cosk * cosq, -sinq * cosk], [-sink * cosq, sink * sinq]])
139+
H1 = - sign[edge] * np.array([[-cosk * cosq, sinq * cosk], [sink * cosq, -sink * sinq]])
140140

141141
alpha = theta[k] - theta[adj[edge] % 3] + np.pi
142142
U = sign[edge] * paral_trans((alpha + A[edge]) / 2) # factor of 1/2 accounts for spinor transport
143-
H_0 = 1 / 2 * np.matmul(id + np.cos(theta[k]) * gamma1 - np.sin(theta[k]) * gamma2, U) ### should we subtract identity?
144-
H = np.matmul(eps, H_0)
143+
H_0 = 1 / 2 * np.matmul(id - np.cos(theta[k]) * gamma1 + np.sin(theta[k]) * gamma2, U) ### should we subtract identity?
144+
H = - np.matmul(eps, H_0)
145145

146146
for a in range(2):
147147
for b in range(2):
148148
D[i + a, j + b] += H[a, b]
149149
D1[i + a, j + b] += H1[a, b]
150-
151-
det = np.linalg.slogdet(D1)
152-
if det[0] == -1:
153-
print("sign(det) = -1")
154-
return D1
150+
return D

manifold_sampler/data/haussdorf_ising_.csv

+20
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,23 @@
291291
3.435,0.227,3.551,0.114,200,1000,10
292292
4.433,0.438,4.344,0.286,200,1000,10
293293
4.005,0.478,4.068,0.25,200,1000,10
294+
5.032,1.021,4.257,0.516,80,400,10
295+
4.954,0.365,5.071,0.435,80,400,10
296+
3.474,0.304,3.619,0.237,80,400,10
297+
3.678,0.347,3.778,0.279,80,400,10
298+
3.81,0.446,3.935,0.451,80,400,10
299+
4.278,0.527,4.232,0.4,80,400,10
300+
3.378,0.526,3.615,0.433,80,400,10
301+
3.794,0.569,3.625,0.353,80,400,10
302+
4.497,0.544,3.959,0.308,80,400,10
303+
4.019,0.355,3.815,0.297,80,400,10
304+
3.945,0.551,4.163,0.492,80,400,10
305+
5.134,0.915,4.695,0.489,80,400,10
306+
4.319,0.386,4.059,0.279,80,400,10
307+
4.611,0.55,4.238,0.255,80,400,10
308+
3.405,0.485,3.513,0.271,80,400,10
309+
4.411,0.442,3.991,0.262,80,400,10
310+
3.85,0.679,3.649,0.583,80,400,10
311+
4.155,0.458,4.202,0.494,80,400,10
312+
3.7,0.332,3.716,0.211,80,400,10
313+
3.633,0.501,3.757,0.27,80,400,10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
5.439,0.719,5.113,0.42,80,400,10,,,,,,
2+
5.945,1.235,4.856,0.589,80,400,10,,,,,,
3+
3.351,0.206,3.473,0.295,80,400,10,,,,,,
4+
4.41,0.607,4.383,0.403,80,400,10,,,,,,
5+
3.921,0.266,3.83,0.256,80,400,10,,,,,,
6+
3.46,0.3,3.629,0.308,80,400,10,,,,,,
7+
3.65,0.241,3.615,0.242,80,400,10,,,,,,
8+
4.253,0.509,3.908,0.271,80,400,10,,,,,,
9+
3.754,0.443,4.179,0.46,80,400,10,,,,,,
10+
3.888,0.283,3.604,0.218,80,400,10,,,,,,
11+
5.141,0.52,4.714,0.21,80,400,10,,,,,,
12+
3.863,0.307,3.746,0.259,80,400,10,,,,,,
13+
4.153,0.28,3.99,0.236,80,400,10,,,,,,
14+
4.382,0.617,4.215,0.377,80,400,10,,,,,,
15+
4.032,0.505,4.102,0.286,80,400,10,,,,,,
16+
4.351,0.412,4.268,0.278,80,400,10,,,,,,
17+
3.941,0.265,3.916,0.264,80,400,10,,,,,,
18+
5.441,0.893,4.178,0.397,80,400,10,,,,,,
19+
4.496,0.458,3.884,0.289,80,400,10,,,,,,
20+
4.229,0.286,4.092,0.223,80,400,10,,,,,,
21+
3.812,0.301,3.93,0.25,80,400,10,,,,,,
22+
3.986,0.352,3.98,0.29,80,400,10,,,,,,
23+
5.413,0.751,4.484,0.547,80,400,10,,,,,,
24+
4.263,0.374,3.789,0.22,80,400,10,,,,,,
25+
3.881,0.502,3.503,0.344,80,400,10,,,,,,
26+
4.025,0.354,3.881,0.295,80,400,10,,,,,,
27+
3.296,0.186,3.589,0.316,80,400,10,,,,,,
28+
5.235,0.916,4.123,0.392,80,400,10,,,,,,
29+
3.954,0.356,3.676,0.229,80,400,10,,,,,,
30+
4.913,0.61,4.356,0.362,80,400,10,,,,,,
31+
5.067,0.596,5.224,0.668,80,400,10,,,,,,
32+
5.331,0.712,4.613,0.369,80,400,10,,,,,,
33+
3.861,0.392,3.874,0.276,80,400,10,,,,,,
34+
3.947,0.376,3.876,0.292,80,400,10,,,,,,
35+
3.746,0.17,3.819,0.128,80,400,10,,,,,,
36+
3.644,0.102,3.721,0.174,80,400,10,,,,,,
37+
4.006,0.267,4.092,0.296,80,400,10,,,,,,
38+
4.629,0.355,4.62,0.344,80,400,10,,,,,,
39+
4.319,0.499,4.292,0.505,80,400,10,,,,,,
40+
4.047,0.54,4.198,0.394,80,400,10,,,,,,
41+
3.806,0.386,3.786,0.324,80,400,10,,,,,,
42+
4.224,0.636,4.019,0.364,80,400,10,,,,,,
43+
3.836,0.17,3.869,0.176,80,400,10,,,,,,
44+
5.166,1.061,4.742,0.77,80,400,10,,,,,,
45+
3.148,0.401,3.6,0.372,80,400,10,,,,,,
46+
3.786,0.285,3.71,0.258,80,400,10,,,,,,
47+
3.786,0.24,3.839,0.285,80,400,10,,,,,,
48+
4.722,0.515,4.49,0.332,80,400,10,,,,,,
49+
4.45,0.255,4.159,0.162,80,400,10,,,,,,
50+
4.553,0.473,4.019,0.233,80,400,10,,,,,,
51+
4.249,0.399,4.296,0.391,80,400,10,,,,,,
52+
4.353,0.203,4.304,0.28,80,400,10,,,,,,
53+
3.814,0.308,4.054,0.4,80,400,10,,,,,,
54+
4.441,0.44,4.295,0.365,80,400,10,,,,,,
55+
4.576,0.455,4.261,0.241,80,400,10,,,,,,
56+
3.951,0.262,3.887,0.181,80,400,10,,,,,,
57+
4.755,0.524,4.083,0.336,80,400,10,,,,,,
58+
3.925,0.346,4.077,0.232,80,400,10,,,,,,
59+
4.205,0.286,4.371,0.259,80,400,10,,,,,,
60+
3.863,0.412,3.807,0.29,80,400,10,,,,,,
61+
4.411,0.558,4.193,0.476,80,400,10,,,,,,
62+
3.426,0.345,3.575,0.25,80,400,10,,,,,,
63+
4.918,0.783,4.085,0.431,80,400,10,,,,,,
64+
3.216,0.369,3.308,0.28,80,400,10,,,,,,
65+
4.623,0.493,4.051,0.283,80,400,10,,,,,,
66+
5.159,0.776,4.641,0.454,80,400,10,,,,,,
67+
3.831,0.403,3.554,0.272,80,400,10,,,,,,
68+
4.197,0.368,4.214,0.286,80,400,10,,,,,,
69+
4.183,0.438,3.943,0.353,80,400,10,,,,,,
70+
3.331,0.335,3.565,0.288,80,400,10,,,,,,
71+
4.024,0.576,3.979,0.448,80,400,10,,,,,,
72+
4.384,0.534,4.179,0.363,80,400,10,,,,,,
73+
4.091,0.515,4.045,0.462,80,400,10,,,,,,
74+
3.609,0.262,3.777,0.297,80,400,10,,,,,,
75+
4.501,0.351,4.4,0.378,80,400,10,,,,,,
76+
3.583,0.194,3.529,0.198,80,400,10,,,,,,
77+
3.955,0.302,3.963,0.291,80,400,10,,,,,,
78+
3.597,0.236,3.674,0.278,80,400,10,,,,,,
79+
4.02,0.488,3.573,0.306,80,400,10,,,,,,
80+
4.403,0.464,4.307,0.38,80,400,10,,,,,,
81+
4.645,0.823,3.868,0.399,80,400,10,,,,,,
82+
4.392,0.686,3.928,0.372,80,400,10,,,,,,
83+
4.31,0.295,4.494,0.288,80,400,10,,,,,,
84+
5.144,0.715,4.476,0.411,80,400,10,,,,,,
85+
3.964,0.547,3.779,0.42,80,400,10,,,,,,
86+
3.978,0.389,3.774,0.223,80,400,10,,,,,,
87+
3.952,0.358,3.944,0.288,80,400,10,,,,,,
88+
3.96,0.203,4.18,0.279,80,400,10,,,,,,
89+
4.162,0.241,4.048,0.26,80,400,10,,,,,,
90+
4.126,0.276,4.148,0.271,80,400,10,,,,,,
91+
3.731,0.273,4.079,0.452,80,400,10,,,,,,
92+
4.98,0.602,4.341,0.346,80,400,10,,,,,,
93+
4.381,0.616,4.403,0.474,80,400,10,,,,,,
94+
3.657,0.39,3.51,0.258,80,400,10,,,,,,
95+
3.694,0.362,4.212,0.414,80,400,10,,,,,,
96+
4.326,0.51,3.757,0.276,80,400,10,,,,,,
97+
4.432,0.346,4.619,0.333,80,400,10,,,,,,
98+
5.129,0.982,4.24,0.476,80,400,10,,,,,,
99+
4.076,0.371,3.868,0.309,80,400,10,,,,,,
100+
3.727,0.494,3.965,0.4,80,400,10,,,,,,
101+
4.2,0.328,3.918,0.216,100,500,8,,,,this last batch gives weird results d<4,,
102+
3.964,0.442,3.793,0.353,100,500,8,,,,consider 20:100,,
103+
3.917,0.15,3.991,0.151,100,500,8,,,,,,
104+
4.422,0.553,4.145,0.532,100,500,8,,,,,,
105+
4.257,0.286,4.026,0.253,100,500,8,,,,,,
106+
4.202,0.436,3.87,0.293,100,500,8,,,,,,
107+
3.559,0.446,3.873,0.405,100,500,8,,,,,,
108+
3.602,0.329,3.857,0.21,100,500,8,,,,,,
109+
3.457,0.358,3.823,0.315,100,500,8,,,,,,
110+
3.333,0.257,3.484,0.194,100,500,8,,,,,,
111+
3.447,0.424,3.814,0.384,100,500,8,,,,,,
112+
4.897,0.62,4.37,0.431,100,500,8,,,,,,
113+
3.72,0.496,3.965,0.509,100,500,8,,,,,,
114+
3.949,0.396,4.29,0.31,100,500,8,,,,,,
115+
3.891,0.432,3.598,0.361,100,500,8,,,,,,
116+
4.7,0.57,4.139,0.39,100,500,8,,,,,,
117+
3.534,0.235,3.505,0.23,100,500,8,,,,,,
118+
3.957,0.246,4.244,0.294,100,500,8,,,,,,
119+
3.755,0.466,3.513,0.256,100,500,8,,,,,,
120+
3.921,0.475,3.754,0.401,100,500,8,,,,4.19062963,0.056612958,4.044296296

manifold_sampler/data/haussdorf_spinor_free_.csv

+100
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,103 @@
1818
5.441,0.893,4.178,0.397,80,400,10
1919
4.496,0.458,3.884,0.289,80,400,10
2020
4.229,0.286,4.092,0.223,80,400,10
21+
3.812,0.301,3.93,0.25,80,400,10
22+
3.986,0.352,3.98,0.29,80,400,10
23+
5.413,0.751,4.484,0.547,80,400,10
24+
4.263,0.374,3.789,0.22,80,400,10
25+
3.881,0.502,3.503,0.344,80,400,10
26+
4.025,0.354,3.881,0.295,80,400,10
27+
3.296,0.186,3.589,0.316,80,400,10
28+
5.235,0.916,4.123,0.392,80,400,10
29+
3.954,0.356,3.676,0.229,80,400,10
30+
4.913,0.61,4.356,0.362,80,400,10
31+
5.067,0.596,5.224,0.668,80,400,10
32+
5.331,0.712,4.613,0.369,80,400,10
33+
3.861,0.392,3.874,0.276,80,400,10
34+
3.947,0.376,3.876,0.292,80,400,10
35+
3.746,0.17,3.819,0.128,80,400,10
36+
3.644,0.102,3.721,0.174,80,400,10
37+
4.006,0.267,4.092,0.296,80,400,10
38+
4.629,0.355,4.62,0.344,80,400,10
39+
4.319,0.499,4.292,0.505,80,400,10
40+
4.047,0.54,4.198,0.394,80,400,10
41+
3.806,0.386,3.786,0.324,80,400,10
42+
4.224,0.636,4.019,0.364,80,400,10
43+
3.836,0.17,3.869,0.176,80,400,10
44+
5.166,1.061,4.742,0.77,80,400,10
45+
3.148,0.401,3.6,0.372,80,400,10
46+
3.786,0.285,3.71,0.258,80,400,10
47+
3.786,0.24,3.839,0.285,80,400,10
48+
4.722,0.515,4.49,0.332,80,400,10
49+
4.45,0.255,4.159,0.162,80,400,10
50+
4.553,0.473,4.019,0.233,80,400,10
51+
4.249,0.399,4.296,0.391,80,400,10
52+
4.353,0.203,4.304,0.28,80,400,10
53+
3.814,0.308,4.054,0.4,80,400,10
54+
4.441,0.44,4.295,0.365,80,400,10
55+
4.576,0.455,4.261,0.241,80,400,10
56+
3.951,0.262,3.887,0.181,80,400,10
57+
4.755,0.524,4.083,0.336,80,400,10
58+
3.925,0.346,4.077,0.232,80,400,10
59+
4.205,0.286,4.371,0.259,80,400,10
60+
3.863,0.412,3.807,0.29,80,400,10
61+
4.411,0.558,4.193,0.476,80,400,10
62+
3.426,0.345,3.575,0.25,80,400,10
63+
4.918,0.783,4.085,0.431,80,400,10
64+
3.216,0.369,3.308,0.28,80,400,10
65+
4.623,0.493,4.051,0.283,80,400,10
66+
5.159,0.776,4.641,0.454,80,400,10
67+
3.831,0.403,3.554,0.272,80,400,10
68+
4.197,0.368,4.214,0.286,80,400,10
69+
4.183,0.438,3.943,0.353,80,400,10
70+
3.331,0.335,3.565,0.288,80,400,10
71+
4.024,0.576,3.979,0.448,80,400,10
72+
4.384,0.534,4.179,0.363,80,400,10
73+
4.091,0.515,4.045,0.462,80,400,10
74+
3.609,0.262,3.777,0.297,80,400,10
75+
4.501,0.351,4.4,0.378,80,400,10
76+
3.583,0.194,3.529,0.198,80,400,10
77+
3.955,0.302,3.963,0.291,80,400,10
78+
3.597,0.236,3.674,0.278,80,400,10
79+
4.02,0.488,3.573,0.306,80,400,10
80+
4.403,0.464,4.307,0.38,80,400,10
81+
4.645,0.823,3.868,0.399,80,400,10
82+
4.392,0.686,3.928,0.372,80,400,10
83+
4.31,0.295,4.494,0.288,80,400,10
84+
5.144,0.715,4.476,0.411,80,400,10
85+
3.964,0.547,3.779,0.42,80,400,10
86+
3.978,0.389,3.774,0.223,80,400,10
87+
3.952,0.358,3.944,0.288,80,400,10
88+
3.96,0.203,4.18,0.279,80,400,10
89+
4.162,0.241,4.048,0.26,80,400,10
90+
4.126,0.276,4.148,0.271,80,400,10
91+
3.731,0.273,4.079,0.452,80,400,10
92+
4.98,0.602,4.341,0.346,80,400,10
93+
4.381,0.616,4.403,0.474,80,400,10
94+
3.657,0.39,3.51,0.258,80,400,10
95+
3.694,0.362,4.212,0.414,80,400,10
96+
4.326,0.51,3.757,0.276,80,400,10
97+
4.432,0.346,4.619,0.333,80,400,10
98+
5.129,0.982,4.24,0.476,80,400,10
99+
4.076,0.371,3.868,0.309,80,400,10
100+
3.727,0.494,3.965,0.4,80,400,10
101+
4.2,0.328,3.918,0.216,100,500,8
102+
3.964,0.442,3.793,0.353,100,500,8
103+
3.917,0.15,3.991,0.151,100,500,8
104+
4.422,0.553,4.145,0.532,100,500,8
105+
4.257,0.286,4.026,0.253,100,500,8
106+
4.202,0.436,3.87,0.293,100,500,8
107+
3.559,0.446,3.873,0.405,100,500,8
108+
3.602,0.329,3.857,0.21,100,500,8
109+
3.457,0.358,3.823,0.315,100,500,8
110+
3.333,0.257,3.484,0.194,100,500,8
111+
3.447,0.424,3.814,0.384,100,500,8
112+
4.897,0.62,4.37,0.431,100,500,8
113+
3.72,0.496,3.965,0.509,100,500,8
114+
3.949,0.396,4.29,0.31,100,500,8
115+
3.891,0.432,3.598,0.361,100,500,8
116+
4.7,0.57,4.139,0.39,100,500,8
117+
3.534,0.235,3.505,0.23,100,500,8
118+
3.957,0.246,4.244,0.294,100,500,8
119+
3.755,0.466,3.513,0.256,100,500,8
120+
3.921,0.475,3.754,0.401,100,500,8

manifold_sampler/data/haussdorf_spinor_free_2.csv

+1
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,4 @@ d_H_ws, d_H_err_ws, d_H, d_H_err,size_min,size_max,n_sizes,,,,,
258258
4.228,0.356,4.179,0.202,80,400,10,,,,,
259259
3.991,0.382,3.888,0.271,80,400,10,,,,,
260260
3.417,0.249,3.488,0.193,80,400,10,,4.07985,,4.0156,0.062310107
261+
,,,,,,,,4.102964286,,,
-3.07 KB
-4.13 KB
-4.28 KB
-4.67 KB
-293 Bytes
-4.91 KB
-7.22 KB
-3.85 KB
-1.71 KB
-4.34 KB
-5.48 KB
-4.26 KB
-7.11 KB
-6.12 KB
-5.83 KB
-5.03 KB
-3.35 KB
-5.84 KB
-6.6 KB
-2.69 KB
-4.54 KB
-10.5 KB
-3.92 KB
-7.13 KB
-4.49 KB
-4.62 KB
-5.89 KB
-5.49 KB
-3.69 KB
Binary file not shown.

manifold_sampler/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from Analysis_utils import *
22

3-
N = 6 ### needs to be multiple of 4 + 2
4-
n_sweeps = 1
3+
N = 10
4+
n_sweeps = 100
55

66
beta = 0.63
77
l = Manifold(N)

manifold_sampler/main_hpc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
from scipy.interpolate import CubicSpline
55

66
# params for the lattice-matter system and sampling
7-
size_min, size_max, n_sizes = 200, 1000, 10
7+
size_min, size_max, n_sizes = 80, 400, 10
88
sizes = [(int(i) // 4) * 4 + 2 for i in np.geomspace(size_min, size_max, n_sizes)]
99
beta = 0.216
10-
matter = 'ising'
10+
matter = 'spinor_free'
1111
strategy = ['gravity', matter]
12-
eq_sweeps, meas_sweeps, n_measurements = 50, 2, 600 ### Try longer decorr time
12+
eq_sweeps, meas_sweeps, n_measurements = 50, 2, 200 ### Try longer decorr time
1313

1414
# getting the array index of the hpc batch
1515
array_id = os.getenv('SLURM_ARRAY_TASK_ID')

0 commit comments

Comments
 (0)