From 454b2071873ceda77fcf42bd7f9c1033eea8a327 Mon Sep 17 00:00:00 2001 From: Austin Adams Date: Mon, 7 Oct 2024 23:36:35 -0400 Subject: [PATCH] Address PR comments --- src/qiree/Module.hh | 2 +- src/qirxacc/XaccQuantum.cc | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qiree/Module.hh b/src/qiree/Module.hh index fc7247c..21ed2df 100644 --- a/src/qiree/Module.hh +++ b/src/qiree/Module.hh @@ -46,7 +46,7 @@ class Module explicit Module(UPModule&& module); // Construct from an externally created LLVM module and an entry point - explicit Module(UPModule&& module, std::string const& entrypoint); + Module(UPModule&& module, std::string const& entrypoint); // Construct with an LLVM IR file (bitcode or disassembled) explicit Module(std::string const& filename); diff --git a/src/qirxacc/XaccQuantum.cc b/src/qirxacc/XaccQuantum.cc index e09e420..35442d2 100644 --- a/src/qirxacc/XaccQuantum.cc +++ b/src/qirxacc/XaccQuantum.cc @@ -51,7 +51,10 @@ XaccQuantum::XaccQuantum(std::ostream& os, xacc::setIsPyApi(); // Create accelerator - set_accelerator_and_shots(accel_name, shots); + accelerator_ = xacc::getAccelerator(accel_name); + QIREE_VALIDATE(accelerator_, << "failed to create accelerator"); + accelerator_->updateConfiguration({{"shots", static_cast(shots)}}); + // TODO: bit order is accelerator-dependent? endian_ = Endianness::little;