Commit 558209bd authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

fixing a few bugs


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent f238178d
......@@ -163,7 +163,9 @@ int main(int argc, char **argv) {
}
}
xacc::setAccelerator(accName);
if (!accName.empty()) {
xacc::setAccelerator(accName);
}
if (!tooling::runToolOnCodeWithArgs(action, src, args)) {
xacc::error("Error running qcor compiler.");
}
......
set(CMAKE_CXX_COMPILER qcor)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -a local-ibm")
message(STATUS "LINKING ${XACC_ROOT}/lib")
link_directories(${XACC_ROOT}/lib)
......
......@@ -14,13 +14,17 @@ TEST(bell_state_tester, check_bell_state) {
bell(q);
q->print();
EXPECT_TRUE(q->getMeasurementCounts().count("00"));
EXPECT_TRUE(q->getMeasurementCounts().count("11"));
auto handle = qcor::submit([&](qcor::qpu_handler& qh) {
qh.execute(bell);
});
auto results = qcor::sync(handle);
results->print();
EXPECT_TRUE(results->getMeasurementCounts().count("00"));
EXPECT_TRUE(results->getMeasurementCounts().count("11"));
}
......
......@@ -79,14 +79,14 @@ def main(argv=None):
'-lxacc-pauli']
if verbose:
print('Generated New file: ', ' '.join([c for c in sys.argv+baseIncludes+baseLibs]))
try:
result = subprocess.run(sys.argv+baseIncludes+baseLibs, check=True)
except subprocess.CalledProcessError as e:
print(e.output)
print(e.returncode)
return e.returncode
if verbose:
print('Generated New file: ', ' '.join([c for c in sys.argv+baseIncludes+baseLibs]))
try:
result = subprocess.run(sys.argv+baseIncludes+baseLibs, check=True)
except subprocess.CalledProcessError as e:
print(e.output)
print(e.returncode)
return e.returncode
if not keepSrcFiles:
os.remove(expectedFile)
......
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