qcor.cpp 649 Bytes
Newer Older
Mccaskey, Alex's avatar
Mccaskey, Alex committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "qcor.hpp"

#include "IRProvider.hpp"
#include "XACC.hpp"

using namespace xacc;

namespace qcor {

const std::string persistCompiledCircuit(std::shared_ptr<Function> function) {
  return "";
}

std::shared_ptr<Function> loadCompiledCircuit() {
  auto provider = xacc::getService<IRProvider>("gate");
  auto function = provider->createFunction("tmp", {});
  return function;
}

std::future<int> submit(HandlerLambda &&totalJob) {
  // Create the QPU Handler to pass to the given
  // Handler HandlerLambda
  qpu_handler handler;
  return std::async(std::launch::async, [&] {
    totalJob(handler);
    return 1;
  });
}

} // namespace qcor