message: updating vqe tester to demonstrate new heterogenous map construction
diff: @@ -51,7 +51,10 @@ TEST(VQETester, checkSimple) {
  auto ruccsd = ir->getComposite("f");
  auto optimizer = xacc::getOptimizer("nlopt");
  - std::shared_ptr<Observable> observable = std::make_shared<xacc::quantum::PauliOperator>();//= std::make_shared<xacc::quantum::PauliOperator>();
  + std::shared_ptr<Observable> observable = std::make_shared<
  + xacc::quantum::
  + PauliOperator>(); //=
  + // std::make_shared<xacc::quantum::PauliOperator>();
  observable->fromString(
  "(0.174073,0) Z2 Z3 + (0.1202,0) Z1 Z3 + (0.165607,0) Z1 Z2 + "
  "(0.165607,0) Z0 Z3 + (0.1202,0) Z0 Z2 + (-0.0454063,0) Y0 Y1 X2 X3 + "
  @@ -60,14 +63,19 @@ TEST(VQETester, checkSimple) {
  "Y2 X3 + (0.168336,0) Z0 Z1 + (0.0454063,0) Y0 X1 X2 Y3");
  auto vqe = xacc::getService<Algorithm>("vqe");
  - EXPECT_TRUE(vqe->initialize({std::make_pair("ansatz",ruccsd),
  - std::make_pair("accelerator",acc),
  - std::make_pair("observable", observable),
  - std::make_pair("optimizer",optimizer)}));
  + EXPECT_TRUE(vqe->initialize({{"ansatz", ruccsd},
  + {"accelerator", acc},
  + {"observable", observable},
  + {"optimizer", optimizer}}));
  vqe->execute(buffer);
  - EXPECT_NEAR(-1.13717, mpark::get<double>(buffer->getInformation("opt-val")), 1e-4);
  - EXPECT_NEAR(-1.13717,vqe->execute(buffer, (*buffer)["opt-params"].as<std::vector<double>>())[0], 1e-4);
  - // std::cout << "EVALED: " << vqe->execute(buffer, (*buffer)["opt-params"].as<std::vector<double>>()) << "\n";
  + EXPECT_NEAR(-1.13717, mpark::get<double>(buffer->getInformation("opt-val")),
  + 1e-4);
  + EXPECT_NEAR(-1.13717,
  + vqe->execute(
  + buffer, (*buffer)["opt-params"].as<std::vector<double>>())[0],
  + 1e-4);
  + // std::cout << "EVALED: " << vqe->execute(buffer,
  + // (*buffer)["opt-params"].as<std::vector<double>>()) << "\n";
  // }
  }
  