From c5397d347c66d865fc7c1611cec9f8b145b0f7b6 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 | 4 +++- 2 files changed, 4 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 69d97be..5141aee 100644 --- a/src/qirxacc/XaccQuantum.cc +++ b/src/qirxacc/XaccQuantum.cc @@ -52,7 +52,9 @@ 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;