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

updates to enable qcor on qcs


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent e91e8cfe
Pipeline #59193 passed with stages
in 7 minutes and 16 seconds
#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([&]() {
......@@ -18,4 +18,4 @@ int main() {
auto results = future.get();
results->print();
}
\ No newline at end of file
}
......@@ -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");
......
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