Skip to content

Commit 3eff6c5

Browse files
Fix precision
1 parent c101d68 commit 3eff6c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/tfim_validation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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) and ((t / t1) < 709) else 1
346+
model = math.exp(-t / t1) if (t1 > 0) else 0
347347
d_magnetization = 0
348348
d_sqr_magnetization = 0
349349

@@ -392,9 +392,9 @@ def main():
392392
d_magnetization = -d_magnetization
393393

394394
# Mix in the initial state component.
395-
bias = model * bias + (1 - model) * bias_0
396-
magnetization = model * d_magnetization + (1 - model) * magnetization_0
397-
sqr_magnetization = model * d_sqr_magnetization + (1 - model) * sqr_magnetization_0
395+
bias = (1 - model) * bias + model * bias_0
396+
magnetization = (1 - model) * d_magnetization + model * magnetization_0
397+
sqr_magnetization = (1 - model) * d_sqr_magnetization + model * sqr_magnetization_0
398398

399399
# The full 2^n marginal probabilities will be produced in the statistics calculation,
400400
# but notice that the global magnetization value only requires (n+1) dimensions of marginal probability,

0 commit comments

Comments
 (0)