diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-12-10 13:53:36 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-12-10 13:53:36 -0500 |
commit | f2a747eff7add6e6de089ba38602d4ede103c5d5 (patch) | |
tree | 58f979bf691bbc139d2989e002bc0b10cf7bbd6e | |
parent | 0ec7cbaf7a33de59796844d4c9fe3f22b83c55e4 (diff) | |
download | code-f2a747eff7add6e6de089ba38602d4ede103c5d5.tar.gz code-f2a747eff7add6e6de089ba38602d4ede103c5d5.tar.bz2 code-f2a747eff7add6e6de089ba38602d4ede103c5d5.zip |
mistake in initialization led to incorrect energies
-rw-r--r-- | hadamard.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hadamard.cpp b/hadamard.cpp index 15f73b1..0a8ba36 100644 --- a/hadamard.cpp +++ b/hadamard.cpp @@ -15,8 +15,8 @@ public: } void after_sweep(double, double E, const Orthogonal&) override { - totalE += E; N++; + totalE += E; } double energy() const { return totalE / N; } @@ -99,6 +99,7 @@ int main(int argc, char* argv[]) { for (MCMC& sim : p.Ms) { sim.M = walsh(k); + sim.E = sim.M.energy(); } std::cout << "Beginning " << n_tuning << " tuning steps for " << n << ".\n"; |