Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cudaq_version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cudaq": {
"repository": "NVIDIA/cuda-quantum",
"ref": "ba4632a0558310cd1464636144a9898e57d6b4b8"
"ref": "39ca4ab6d44cd7be3cf5e1c00d56e65c763267f0"
}
}
12 changes: 6 additions & 6 deletions .github/workflows/scripts/build_cudaq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@ echo "Building MLIR bindings for ${python}" && \
# ==============================================================================

CUDAQ_PATCH='diff --git a/CMakeLists.txt b/CMakeLists.txt
index e12aed8871..d2960728e4 100644
index dc906f615..5d591ea06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -657,7 +657,7 @@ if(CUDAQ_BUILD_TESTS)
@@ -682,7 +682,7 @@ if(CUDAQ_BUILD_TESTS)
endif()

if (CUDAQ_ENABLE_PYTHON)
- find_package(Python 3 COMPONENTS Interpreter Development)
+ find_package(Python 3 COMPONENTS Interpreter Development.Module)

# Apply specific patch to pybind11 for our documentation.
# Only apply the patch if not already applied.
diff --git a/python/runtime/cudaq/domains/plugins/CMakeLists.txt b/python/runtime/cudaq/domains/plugins/CMakeLists.txt
index cf0197f9fd..cceb843bdc 100644
index 675919e25..7de85b815 100644
--- a/python/runtime/cudaq/domains/plugins/CMakeLists.txt
+++ b/python/runtime/cudaq/domains/plugins/CMakeLists.txt
@@ -27,7 +27,7 @@ else()
@@ -31,7 +31,7 @@ else()
endif()
target_link_libraries(cudaq-pyscf
PRIVATE
Expand Down
63 changes: 15 additions & 48 deletions scripts/ci/build_cudaq_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# ============================================================================ #
# Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. #
# Copyright (c) 2022 - 2026 NVIDIA Corporation & Affiliates. #
# All rights reserved. #
# #
# This source code and the accompanying materials are made available under #
Expand Down Expand Up @@ -87,66 +87,33 @@ echo "Building CUDA-Q."
cd /cuda-quantum

CUDAQ_PATCH='diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f2c138..ddb15b3 100644
index dc906f615..5d591ea06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -540,7 +540,7 @@ add_subdirectory(tools)
add_subdirectory(utils)
@@ -682,7 +682,7 @@ if(CUDAQ_BUILD_TESTS)
endif()

if (CUDAQ_ENABLE_PYTHON)
- find_package(Python 3 COMPONENTS Interpreter Development)
+ find_package(Python 3 COMPONENTS Interpreter Development.Module)

# Apply specific patch to pybind11 for our documentation.
# Only apply the patch if not already applied.
diff --git a/python/runtime/cudaq/domains/plugins/CMakeLists.txt b/python/runtime/cudaq/domains/plugins/CMakeLists.txt
index 7b7541d..2261334 100644
index 675919e25..7de85b815 100644
--- a/python/runtime/cudaq/domains/plugins/CMakeLists.txt
+++ b/python/runtime/cudaq/domains/plugins/CMakeLists.txt
@@ -17,6 +17,6 @@ if (SKBUILD)
if (NOT Python_FOUND)
message(FATAL_ERROR "find_package(Python) not run?")
endif()
- target_link_libraries(cudaq-pyscf PRIVATE Python::Python pybind11::pybind11 cudaq-chemistry cudaq-operator cudaq cudaq-py-utils)
+ target_link_libraries(cudaq-pyscf PRIVATE Python::Module pybind11::pybind11 cudaq-chemistry cudaq-operator cudaq cudaq-py-utils)
@@ -31,7 +31,7 @@ else()
endif()
target_link_libraries(cudaq-pyscf
PRIVATE
- Python::Python pybind11::pybind11
+ Python::Module pybind11::pybind11
cudaq-chemistry cudaq-operator cudaq cudaq-py-utils cudaq-platform-default)
endif()
install(TARGETS cudaq-pyscf DESTINATION lib/plugins)'

CUDAQ_PATCH2='diff --git a/lib/Frontend/nvqpp/ConvertDecl.cpp b/lib/Frontend/nvqpp/ConvertDecl.cpp
index 149959c8e..ea23990f6 100644
--- a/lib/Frontend/nvqpp/ConvertDecl.cpp
+++ b/lib/Frontend/nvqpp/ConvertDecl.cpp
@@ -169,8 +169,10 @@ bool QuakeBridgeVisitor::interceptRecordDecl(clang::RecordDecl *x) {
auto fnTy = cast<FunctionType>(popType());
return pushType(cc::IndirectCallableType::get(fnTy));
}
- auto loc = toLocation(x);
- TODO_loc(loc, "unhandled type, " + name + ", in cudaq namespace");
+ if (!isInNamespace(x, "solvers") && !isInNamespace(x, "qec")) {
+ auto loc = toLocation(x);
+ TODO_loc(loc, "unhandled type, " + name + ", in cudaq namespace");
+ }
}
if (isInNamespace(x, "std")) {
if (name.equals("vector")) {
diff --git a/lib/Frontend/nvqpp/ConvertExpr.cpp b/lib/Frontend/nvqpp/ConvertExpr.cpp
index e6350d1c5..28c98c6cb 100644
--- a/lib/Frontend/nvqpp/ConvertExpr.cpp
+++ b/lib/Frontend/nvqpp/ConvertExpr.cpp
@@ -2050,7 +2050,9 @@ bool QuakeBridgeVisitor::VisitCallExpr(clang::CallExpr *x) {
return pushValue(call.getResult(0));
}

- TODO_loc(loc, "unknown function, " + funcName + ", in cudaq namespace");
+ if (!isInNamespace(func, "solvers") && !isInNamespace(func, "qec")) {
+ TODO_loc(loc, "unknown function, " + funcName + ", in cudaq namespace");
+ }
} // end in cudaq namespace

if (isInNamespace(func, "std")) {'
'

echo "$CUDAQ_PATCH" | git apply --verbose
echo "$CUDAQ_PATCH2" | git apply --verbose

$python -m venv --system-site-packages .venv
source .venv/bin/activate
Expand Down
Loading