Skip to content

Commit

Permalink
Merge with main
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Gringauze <[email protected]>
  • Loading branch information
annagrin committed Oct 17, 2024
1 parent 21a87c1 commit 3fc56de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions python/tests/interop/quantum_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> -fPIC --enable-mlir --disable

# FIXME Error with SHARED, it pulls in all the mlir libraries anyway
add_library(quantum_lib OBJECT quantum_lib.cpp)
add_dependencies(quantum_lib nvq++ cudaq-opt cudaq-quake cudaq-translate)
7 changes: 3 additions & 4 deletions runtime/common/BaseRemoteRESTQPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,13 @@ class BaseRemoteRESTQPU : public cudaq::QPU {
if (!func->hasAttr(cudaq::entryPointAttrName))
func->setAttr(cudaq::entryPointAttrName, builder.getUnitAttr());
auto moduleOp = builder.create<mlir::ModuleOp>();
moduleOp.push_back(func.clone());
moduleOp->setAttrs(m_module->getAttrDictionary());

for (auto &op : m_module.getOps()) {
if (auto funcOp = dyn_cast<mlir::func::FuncOp>(op)) {
// Add quantum kernels defined in the module.
if (funcOp->hasAttr(cudaq::kernelAttrName) ||
funcOp.getName().startswith("__nvqpp__mlirgen__") ||
funcOp.getBody().empty())
// Add function definitions for runtime functions.
if (funcOp.getBody().empty())
moduleOp.push_back(funcOp.clone());
}
// Add globals defined in the module.
Expand Down
2 changes: 1 addition & 1 deletion targettests/execution/state_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ int main() {
}

// CHECK: 00
// CHECK: 10
// CHECK: 10

0 comments on commit 3fc56de

Please sign in to comment.