summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hadamard.cpp3
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";