Commit c78d130d authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

bug fix for qcs when backend has -qvm


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent fdc6af69
Pipeline #59198 passed with stages
in 10 minutes and 57 seconds
......@@ -84,7 +84,7 @@ std::shared_ptr<IR> MapToPhysical::transform(std::shared_ptr<IR> ir) {
// Compute the minor graph embedding
auto embedding = embeddingAlgorithm->embed(problemGraph, hardwareGraph);
embedding.persist(std::cout);
// embedding.persist(std::cout);
std::vector<int> physicalMap;
for (auto& kv : embedding) {
if (kv.second.size() > 1) {
......@@ -180,19 +180,19 @@ void QCSAccelerator::execute(std::shared_ptr<AcceleratorBuffer> buffer,
auto shape = results.request().shape;
// py::print(shape[0]);
// py::print(shape[1]);
// py::print(results);
//py::print(results);
// py::print("QUIL\n");
// py::print(quilStr);
// py::print(buffer->size());
//py::print(buffer->size());
std::string zeroString = "";
for (int i = 0; i < buffer->size(); i++)
for (int i = 0; i < shape[1]; i++)
zeroString += "0";
for (int i = 0; i < shots; i++) {
std::string bitString = zeroString;
std::stringstream s;
for (int j = 0; j < buffer->size(); j++) {
for (int j = 0; j < shape[1]; j++) {
// auto qbit = bitToQubit[j];
s << *results.data(i, j);
// bitString[buffer->size()-1-qbit] = s.str()[0];
......
......@@ -98,6 +98,10 @@ public:
if (xacc::optionExists("qcs-backend")) {
auto backend = xacc::getOption("qcs-backend");
if (backend.find("-qvm") != std::string::npos) {
backend.erase(backend.find("-qvm"), 4);
}
Client client;
auto response = client.get("https://forest-server.qcs.rigetti.com",
"/lattices/" + backend);
......
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