Commit 950d8cc7 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

setting up anneal time parameter

parent a9de22b1
......@@ -75,7 +75,8 @@ void DWAccelerator::execute(std::shared_ptr<AcceleratorBuffer> buffer,
auto nQMILines = splitLines.size();
auto options = RuntimeOptions::instance();
std::string jsonStr = "",
solverName = "DW_2000Q_VFYC", solveType = "ising", trials = "100";
solverName = "DW_2000Q_VFYC", solveType = "ising", trials = "100",
annealTime = "20";
if (options->exists("dwave-solver")) {
solverName = (*options)["dwave-solver"];
......@@ -105,12 +106,19 @@ void DWAccelerator::execute(std::shared_ptr<AcceleratorBuffer> buffer,
}
}
if(options->exists("dwave-num-reads")) {
trials = (*options)["dwave-num-reads"];
}
if(options->exists("dwave-anneal-time")) {
annealTime = (*options)["dwave-anneal-time"];
}
jsonStr += "[{ \"solver\" : \"" + solverName + "\", \"type\" : \""
+ solveType + "\", \"data\" : \"" + std::to_string(solver.nQubits)
+ " " + std::to_string(nQMILines-1) + "\\n"
+ dwKernel->toString("") + "\", \"params\": { \"num_reads\" : "
+ trials + "} }]";
+ trials + ", \"annealing_time\" : " + annealTime + "} }]";
boost::replace_all(jsonStr, "\n", "\\n");
std::cout << "\nJsonPost= " << jsonStr << "\n\n\n";
......
......@@ -149,7 +149,10 @@ public:
value<std::string>(), "The D-Wave SAPI URL, "
"https://qubist.dwavesys.com/sapi "
"used by default.")("dwave-solver",
value<std::string>(), "The name of the solver to run on.");
value<std::string>(), "The name of the solver to run on.")
("dwave-num-reads", value<std::string>(), "The number of executions on the chip for the given problem.")
("dwave-anneal-time", value<std::string>(), "The time to evolve the chip - an integer in microseconds.")
("dwave-thermalization", value<std::string>(), "The thermalization...");
return desc;
}
......
......@@ -106,7 +106,6 @@ BOOST_AUTO_TEST_CASE(checkKernelExecution) {
// acc.execute(buffer, f);
// BOOST_VERIFY(client->postOccured);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment