Commit 59c4df4f authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

updates to enable qcor on qcs

parent e91e8cfe
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
#include "qcor.hpp"

int main() {
int main(int argc, char** argv) {

  qcor::Initialize({"--accelerator", "local-ibm"});
  qcor::Initialize(argc, argv); 

  auto future = qcor::submit([&](qcor::qpu_handler &qh) {
    qh.execute([&]() { 
+5 −1
Original line number Diff line number Diff line
@@ -66,8 +66,12 @@ const std::string persistCompiledCircuit(std::shared_ptr<Function> function,
                    InstructionParameter(persistedFunction), ".qcor_cache");

  if (acc) {
    auto accName = acc->name();
    if (xacc::optionExists(accName+"-backend")) {
       accName = accName + ":" + xacc::getOption(accName+"-backend");
    }
    xacc::appendCache(file_name, "accelerator",
                      InstructionParameter(acc->name()), ".qcor_cache");
                      InstructionParameter(accName), ".qcor_cache");
  } else {
    xacc::appendCache(file_name, "accelerator",
                      InstructionParameter("default-sim"), ".qcor_cache");