Commit 0061411f authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Merge branch 'master' into tnguyen/qcor

parents 88d4789f 32f63251
......@@ -79,8 +79,12 @@ void VQE::execute(const std::shared_ptr<AcceleratorBuffer> buffer) const {
}
if (nFunctionInstructions > kernel->nInstructions()) {
auto evaled = f->operator()(x);
fsToExec.push_back(evaled);
if (x.empty()) {
fsToExec.push_back(f);
} else {
auto evaled = f->operator()(x);
fsToExec.push_back(evaled);
}
coefficients.push_back(std::real(coeff));
} else {
identityCoeff += std::real(coeff);
......@@ -160,8 +164,12 @@ VQE::execute(const std::shared_ptr<AcceleratorBuffer> buffer,
}
if (nFunctionInstructions > kernel->nInstructions()) {
auto evaled = f->operator()(x);
fsToExec.push_back(evaled);
if (x.empty()) {
fsToExec.push_back(f);
} else {
auto evaled = f->operator()(x);
fsToExec.push_back(evaled);
}
coefficients.push_back(std::real(coeff));
} else {
identityCoeff += std::real(coeff);
......
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