summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-19 23:09:25 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-19 23:09:25 -0500
commit9f83692c20d5c777000bb8d1eeb48ee66892bac8 (patch)
tree2a91edb815a0e53402ea89cb65997d7a79ce980b
parent4669226698d1b37ba05de8332751a5c1710fef95 (diff)
downloadcode-9f83692c20d5c777000bb8d1eeb48ee66892bac8.tar.gz
code-9f83692c20d5c777000bb8d1eeb48ee66892bac8.tar.bz2
code-9f83692c20d5c777000bb8d1eeb48ee66892bac8.zip
command line flag for temperature convergence precision
-rw-r--r--hadamard.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/hadamard.cpp b/hadamard.cpp
index 8eba184..fef5af2 100644
--- a/hadamard.cpp
+++ b/hadamard.cpp
@@ -57,13 +57,14 @@ int main(int argc, char* argv[]) {
unsigned N = 16;
unsigned k = 2;
double ε = 0.01;
+ double ε2 = 0.01;
unsigned M = 10;
unsigned m = 1e4;
int opt;
- while ((opt = getopt(argc, argv, "k:b:c:n:t:N:M:e:m:")) != -1) {
+ while ((opt = getopt(argc, argv, "k:b:c:n:t:N:M:e:m:f:")) != -1) {
switch (opt) {
case 'k':
k = atoi(optarg);
@@ -77,6 +78,9 @@ int main(int argc, char* argv[]) {
case 'e':
ε = atof(optarg);
break;
+ case 'f':
+ ε2 = atof(optarg);
+ break;
case 'n':
m = (unsigned)atof(optarg);
break;
@@ -112,7 +116,7 @@ int main(int argc, char* argv[]) {
std::cout << "Beginning simulation of " << n << ".\n";
std::cout << "Beginning " << n_tuning << " tuning tempering updates of " << M
<< " sweeps each.\n";
- std::vector<double> f = p.tune(n_tuning, M, ε, 0.05);
+ std::vector<double> f = p.tune(n_tuning, M, ε, ε2);
std::cout << "Finished tuning, beginning " << m << " measurement tempering updates of " << M
<< " sweeps each.\n";
p.run(m, M);