Skip to content

Commit

Permalink
IBMAccelerator::execute() prints job id
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Claudino <claudinodc@ornl.gov>
  • Loading branch information
danclaudino committed Oct 25, 2024
1 parent fb97b3a commit 3b1f47b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions quantum/plugins/ibm/accelerator/IBMAccelerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,14 @@ auto transpiled = json::parse(get(IBM_TRANSPILER_URL, "/transpile/" + task_id, h
};

for (const auto & c : transpiled["result"]) {
std::cout << c["qasm"] << "\n";
body["params"]["pubs"].push_back(
{c["qasm"], json::array(), shots}
);
}

auto reserve_response = post(IBM_API_URL, "/runtime/jobs", body.dump(), headers);
auto reserve_response = post(IBM_API_URL, "/runtime/jobs", body.dump(), headers);

xacc::info("Current job ID: " + json::parse(reserve_response)["id"].get<std::string>());

}

Expand Down

0 comments on commit 3b1f47b

Please sign in to comment.