Skip to content

Commit c101d68

Browse files
Fix overflow
1 parent 15fe8c1 commit c101d68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/tfim_validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def main():
247247
if len(sys.argv) > 4:
248248
t1 = float(sys.argv[4])
249249
else:
250-
t1 = dt * dt
250+
t1 = dt * dt * dt
251251
if len(sys.argv) > 5:
252252
shots = int(sys.argv[5])
253253
else:
@@ -343,7 +343,7 @@ def main():
343343
# Additionally, this same mean-field exponent is the amplitude of time-dependent oscillation (also in the geometric series exponent).
344344
t = d * dt
345345
# Determine how to weight closed-form vs. conventional simulation contributions:
346-
model = (1 - 1 / math.exp(t / t1)) if (t1 > 0) else 1
346+
model = (1 - 1 / math.exp(t / t1)) if (t1 > 0) and ((t / t1) < 709) else 1
347347
d_magnetization = 0
348348
d_sqr_magnetization = 0
349349

0 commit comments

Comments
 (0)