Commit bbff4bcf authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

fixing memory bug in vqe

Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <>
parent 98ce4318
Pipeline #65277 passed with stage
in 6 minutes and 18 seconds
......@@ -23,7 +23,7 @@ bool VQE::initialize(const AlgorithmParameters &parameters) {
try {
observable ="observable").as_no_error<std::shared_ptr<Observable>>();
} catch (std::exception &e) {
observable = std::shared_ptr<Observable>("observable").as<Observable*>());
observable = std::shared_ptr<Observable>("observable").as<Observable*>(), [](Observable*){});
optimizer ="optimizer").as<std::shared_ptr<Optimizer>>();
kernel ="ansatz").as<std::shared_ptr<Function>>();
Markdown is supported
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