@@ -21,7 +21,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
21
21
τ = 5.0
22
22
23
23
@testset " d = 1, constant integrand" begin
24
- let d = 1 , c = contour, f = t -> 1.0 , N = 200000
24
+ let d = 1 , c = contour, f = t -> 1.0 , N = 2 ^ 17
25
25
val, N_samples = qmc_time_ordered_integral (f, d, c, c (0.1 ), c (0.5 ); τ= τ, N= N)
26
26
@show N_samples / N
27
27
@test isapprox (val, - 0.4 , rtol= 1e-4 )
@@ -41,7 +41,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
41
41
end
42
42
43
43
@testset " d = 1, linear in t integrand" begin
44
- let d = 1 , c = contour, f = t -> t[1 ]. val, N = 200000
44
+ let d = 1 , c = contour, f = t -> t[1 ]. val, N = 2 ^ 17
45
45
val, N_samples = qmc_time_ordered_integral (f, d, c, c (0.1 ), c (0.5 ), τ= τ, N= N)
46
46
@show N_samples / N
47
47
@test isapprox (val, - 0.28 , rtol= 1e-4 )
@@ -61,7 +61,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
61
61
end
62
62
63
63
@testset " d = 2, constant integrand" begin
64
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N = 500000
64
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N = 2 ^ 18
65
65
val, N_samples = qmc_time_ordered_integral (f, d, c, c (0.1 ), c (0.5 ), τ= τ, N= N)
66
66
@show N_samples / N
67
67
@test isapprox (val, 0.08 , rtol= 5e-3 )
@@ -81,7 +81,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
81
81
end
82
82
83
83
@testset " d = 2, bilinear in t1, t2 integrand" begin
84
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N = 1000000
84
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N = 2 ^ 19
85
85
val, N_samples = qmc_time_ordered_integral (f, d, c, c (0.1 ), c (0.5 ), τ= τ, N= N)
86
86
@show N_samples / N
87
87
@test isapprox (val, 0.0392 , rtol= 5e-3 )
@@ -106,7 +106,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
106
106
τ = 5.0
107
107
108
108
@testset " d = 1, constant integrand" begin
109
- let d = 1 , c = contour, f = t -> 1.0 , N_samples = 50000
109
+ let d = 1 , c = contour, f = t -> 1.0 , N_samples = 2 ^ 16
110
110
val, N = qmc_time_ordered_integral_n_samples (f, d, c, c (0.1 ), c (0.5 ); τ= τ, N_samples= N_samples)
111
111
@show N_samples / N
112
112
@test isapprox (val, - 0.4 , rtol= 1e-4 )
@@ -126,7 +126,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
126
126
end
127
127
128
128
@testset " d = 1, linear in t integrand" begin
129
- let d = 1 , c = contour, f = t -> t[1 ]. val, N_samples = 50000
129
+ let d = 1 , c = contour, f = t -> t[1 ]. val, N_samples = 2 ^ 15
130
130
val, N = qmc_time_ordered_integral_n_samples (f, d, c, c (0.1 ), c (0.5 ), τ= τ, N_samples= N_samples)
131
131
@show N_samples / N
132
132
@test isapprox (val, - 0.28 , rtol= 1e-4 )
@@ -146,7 +146,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
146
146
end
147
147
148
148
@testset " d = 2, constant integrand" begin
149
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N_samples = 50000
149
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N_samples = 2 ^ 15
150
150
val, N = qmc_time_ordered_integral_n_samples (f, d, c, c (0.1 ), c (0.5 ), τ= τ, N_samples= N_samples)
151
151
@show N_samples / N
152
152
@test isapprox (val, 0.08 , rtol= 5e-3 )
@@ -166,7 +166,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
166
166
end
167
167
168
168
@testset " d = 2, bilinear in t1, t2 integrand" begin
169
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N_samples = 50000
169
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N_samples = 2 ^ 15
170
170
val, N = qmc_time_ordered_integral_n_samples (f, d, c, c (0.1 ), c (0.5 ), τ= τ, N_samples= N_samples)
171
171
@show N_samples / N
172
172
@test isapprox (val, 0.0392 , rtol= 5e-3 )
@@ -189,7 +189,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
189
189
@testset " qmc_time_ordered_integral_sort()" begin
190
190
191
191
@testset " d = 1, constant integrand" begin
192
- let d = 1 , c = contour, f = t -> 1.0 , N = 200000
192
+ let d = 1 , c = contour, f = t -> 1.0 , N = 2 ^ 17
193
193
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (0.5 ); N= N)
194
194
@test isapprox (val, - 0.4 , rtol= 1e-4 )
195
195
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (2.0 ); N= N)
@@ -204,7 +204,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
204
204
end
205
205
206
206
@testset " d = 1, linear in t integrand" begin
207
- let d = 1 , c = contour, f = t -> t[1 ]. val, N = 200000
207
+ let d = 1 , c = contour, f = t -> t[1 ]. val, N = 2 ^ 18
208
208
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (0.5 ), N= N)
209
209
@test isapprox (val, - 0.28 , rtol= 1e-5 )
210
210
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (2.0 ), N= N)
@@ -219,7 +219,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
219
219
end
220
220
221
221
@testset " d = 2, constant integrand" begin
222
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N = 500000
222
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N = 2 ^ 18
223
223
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (0.5 ), N= N)
224
224
@test isapprox (val, 0.08 , rtol= 1e-4 )
225
225
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (2.0 ), N= N)
@@ -234,7 +234,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
234
234
end
235
235
236
236
@testset " d = 2, bilinear in t1, t2 integrand" begin
237
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N = 1000000
237
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N = 2 ^ 19
238
238
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (0.5 ), N= N)
239
239
@test isapprox (val, 0.0392 , rtol= 1e-4 )
240
240
val = qmc_time_ordered_integral_sort (f, d, c, c (0.1 ), c (2.0 ), N= N)
@@ -252,7 +252,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
252
252
@testset " qmc_time_ordered_integral_root()" begin
253
253
254
254
@testset " d = 1, constant integrand" begin
255
- let d = 1 , c = contour, f = t -> 1.0 , N = 200000
255
+ let d = 1 , c = contour, f = t -> 1.0 , N = 2 ^ 17
256
256
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (0.5 ); N= N)
257
257
@test isapprox (val, - 0.4 , rtol= 1e-4 )
258
258
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (2.0 ); N= N)
@@ -267,7 +267,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
267
267
end
268
268
269
269
@testset " d = 1, linear in t integrand" begin
270
- let d = 1 , c = contour, f = t -> t[1 ]. val, N = 200000
270
+ let d = 1 , c = contour, f = t -> t[1 ]. val, N = 2 ^ 18
271
271
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (0.5 ), N= N)
272
272
@test isapprox (val, - 0.28 , rtol= 1e-5 )
273
273
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (2.0 ), N= N)
@@ -282,7 +282,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
282
282
end
283
283
284
284
@testset " d = 2, constant integrand" begin
285
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N = 500000
285
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); 1.0 ), N = 2 ^ 18
286
286
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (0.5 ), N= N)
287
287
@test isapprox (val, 0.08 , rtol= 1e-4 )
288
288
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (2.0 ), N= N)
@@ -297,7 +297,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
297
297
end
298
298
299
299
@testset " d = 2, bilinear in t1, t2 integrand" begin
300
- let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N = 1000000
300
+ let d = 2 , c = contour, f = t -> (@assert kd. heaviside (c, t[1 ], t[2 ]); t[1 ]. val * t[2 ]. val), N = 2 ^ 19
301
301
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (0.5 ), N= N)
302
302
@test isapprox (val, 0.0392 , rtol= 1e-4 )
303
303
val = qmc_time_ordered_integral_root (f, d, c, c (0.1 ), c (2.0 ), N= N)
@@ -315,7 +315,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
315
315
@testset " qmc_inchworm_integral_root()" begin
316
316
317
317
@testset " d_bold = 0, d_bare = 3, constant integrand" begin
318
- let d_bold = 0 , d_bare = 3 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 1000000
318
+ let d_bold = 0 , d_bare = 3 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 2 ^ 19
319
319
function f (t)
320
320
@assert kd. heaviside (c, t_f, t[1 ])
321
321
@assert kd. heaviside (c, t[1 ], t[2 ])
@@ -329,7 +329,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
329
329
end
330
330
331
331
@testset " d_bold = 0, d_bare = 3, multilinear integrand" begin
332
- let d_bold = 0 , d_bare = 3 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 1000000
332
+ let d_bold = 0 , d_bare = 3 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 2 ^ 19
333
333
function f (t)
334
334
@assert kd. heaviside (c, t_f, t[1 ])
335
335
@assert kd. heaviside (c, t[1 ], t[2 ])
@@ -343,7 +343,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
343
343
end
344
344
345
345
@testset " d_bold = 3, d_bare = 2, constant integrand" begin
346
- let d_bold = 3 , d_bare = 2 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 2000000
346
+ let d_bold = 3 , d_bare = 2 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 2 ^ 20
347
347
function f (t)
348
348
@assert kd. heaviside (c, t_f, t[1 ])
349
349
@assert kd. heaviside (c, t[1 ], t[2 ])
@@ -360,7 +360,7 @@ import QInchworm.qmc_integrate: qmc_time_ordered_integral,
360
360
end
361
361
362
362
@testset " d_bold = 3, d_bare = 2, multilinear integrand" begin
363
- let d_bold = 3 , d_bare = 2 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 2000000
363
+ let d_bold = 3 , d_bare = 2 , c = contour, t_i = c (1.1 ), t_w = c (5.0 ), t_f = c (5.5 ), N = 2 ^ 20
364
364
function f (t)
365
365
@assert kd. heaviside (c, t_f, t[1 ])
366
366
@assert kd. heaviside (c, t[1 ], t[2 ])
0 commit comments