Skip to content

Commit 7b280c7

Browse files
authored
Merge branch 'main' into nvqc_serialized_python_code_execution
2 parents 687bd79 + c929cd1 commit 7b280c7

File tree

123 files changed

+5499
-5136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+5499
-5136
lines changed

.github/workflows/config/validation_config.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"operating_systems":
77
[
88
"ubuntu:22.04",
9-
"fedora:39",
10-
"opensuse/leap:15.5"
9+
"fedora:39"
1110
]
1211
},
1312
{
@@ -17,8 +16,7 @@
1716
"ubuntu:22.04",
1817
"debian:12",
1918
"fedora:38",
20-
"redhat/ubi9:9.2",
21-
"opensuse/leap:15.5"
19+
"redhat/ubi9:9.2"
2220
]
2321
},
2422
{
@@ -27,8 +25,7 @@
2725
[
2826
"ubuntu:24.04",
2927
"fedora:39",
30-
"redhat/ubi9:9.2",
31-
"opensuse/leap:15.6"
28+
"redhat/ubi9:9.2"
3229
]
3330
}
3431
],

.github/workflows/publishing.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -839,11 +839,10 @@ jobs:
839839
- name: Basic validation (GPU backends)
840840
shell: bash
841841
run: |
842-
# We don't test the 'dynamics' target in these tests
843842
backends_to_test=`\
844843
for file in $(ls $CUDA_QUANTUM_PATH/targets/*.yml); \
845844
do
846-
if [[ "$file" != *"dynamics"* ]] && [ -n "$(cat $file | grep "gpu-requirements")" ]; then \
845+
if [ -n "$(cat $file | grep "gpu-requirements")" ]; then \
847846
basename $file | cut -d "." -f 1; \
848847
elif [ -n "$(basename $file | grep mqpu)" ]; then \
849848
echo remote-mqpu; \

.github/workflows/python_wheels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ jobs:
250250
echo "::error file=python_wheel.yml::Python tests failed with status $pytest_status."
251251
exit 1
252252
fi
253-
python${{ inputs.python_version }} -m pip install --user fastapi uvicorn llvmlite
253+
python${{ inputs.python_version }} -m pip install --user fastapi uvicorn llvmlite
254254
for backendTest in /tmp/tests/backends/*.py; do
255255
python${{ inputs.python_version }} -m pytest $backendTest
256256
pytest_status=$?

.github/workflows/test_in_devenv.yml

+3
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ jobs:
215215
-t dev_env:local -f docker/build/cudaq.dev.Dockerfile . \
216216
--build-arg base_image=$base_image
217217
218+
- name: Setup proxy cache
219+
uses: nv-gha-runners/setup-proxy-cache@main
220+
218221
- name: Build and test CUDA Quantum (Python)
219222
uses: ./.github/actions/run-in-docker
220223
with:

Overview.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,8 @@ diagnostics infrastructures for free.
116116

117117
Specifically, this library provides the `qudit`, `qubit`, `qreg`, and `qspan`
118118
types, the intrinsic quantum operations, and the algorithmic primitives like
119-
`cudaq::sample` and `cudaq::observe`.
120-
121-
This library defines the `cudaq::spin_op` for defining general Pauli tensor
122-
product terms.
119+
`cudaq::sample`, `cudaq::observe`, and `cudaq::evolve`, as well as their
120+
asynchronous versions.
123121

124122
This library defines the `quantum_platform` architecture, enabling CUDA-Q to
125123
target both simulated and physical quantum computing architectures.

docker/build/devdeps.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ COPY --from=prereqs /usr/local/aws "$AWS_INSTALL_PREFIX"
145145

146146
# Install additional dependencies required to build and test CUDA-Q.
147147
RUN apt-get update && apt-get install --no-install-recommends -y wget ca-certificates \
148-
&& wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-$(uname -m).tar.gz \
149-
&& tar xf cmake-3.26.4* && mv cmake-3.26.4-linux-$(uname -m)/ /usr/local/cmake-3.26/ && rm -rf cmake-3.26.4* \
148+
&& wget https://github.com/Kitware/CMake/releases/download/v3.28.4/cmake-3.28.4-linux-$(uname -m).tar.gz \
149+
&& tar xf cmake-3.28.4* && mv cmake-3.28.4-linux-$(uname -m)/ /usr/local/cmake-3.28/ && rm -rf cmake-3.28.4* \
150150
# NOTE: removing ca-certificates also remove python3-pip.
151151
&& apt-get remove -y wget ca-certificates \
152152
&& apt-get autoremove -y --purge && apt-get clean && rm -rf /var/lib/apt/lists/*
153-
ENV PATH="${PATH}:/usr/local/cmake-3.26/bin"
153+
ENV PATH="${PATH}:/usr/local/cmake-3.28/bin"
154154
# We must use h5py<3.11 because 3.11 doesn't include aarch64 Linux wheels.
155155
# https://github.com/h5py/h5py/issues/2408
156156
RUN apt-get update && apt-get install -y --no-install-recommends \

docker/build/devdeps.manylinux.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ RUN dnf install -y --nobest --setopt=install_weak_deps=False \
7878
&& cmake --build . --target install --config Release \
7979
&& cd / && rm -rf /pybind11-project
8080

81-
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-$(uname -m).sh -o cmake-install.sh \
81+
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.28.4/cmake-3.28.4-linux-$(uname -m).sh -o cmake-install.sh \
8282
&& bash cmake-install.sh --skip-licence --exclude-subdir --prefix=/usr/local \
8383
&& rm cmake-install.sh
8484

docker/test/wheels/debian.Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ARG pip_install_flags=""
1515
ARG preinstalled_modules="numpy pytest nvidia-cublas-cu12"
1616

1717
ARG DEBIAN_FRONTEND=noninteractive
18-
RUN apt-get update && apt-get install -y --no-install-recommends \
18+
RUN apt-get update && apt-get install -y --no-install-recommends wget \
1919
python${python_version} python${python_version}-venv
2020

2121
# We need to make sure the virtual Python environment remains
@@ -42,8 +42,12 @@ RUN if [ -n "$pip_install_flags" ]; then \
4242
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/' $VIRTUAL_ENV/pyvenv.cfg; \
4343
fi
4444

45-
RUN python${python_version} -m pip install ${pip_install_flags} /tmp/$cuda_quantum_wheel
45+
# Working around issue https://github.com/pypa/pip/issues/11153.
46+
RUN wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin && \
47+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
48+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} /tmp/$cuda_quantum_wheel
4649
RUN if [ -n "$optional_dependencies" ]; then \
4750
cudaq_package=$(echo $cuda_quantum_wheel | cut -d '-' -f1 | tr _ -) && \
48-
python${python_version} -m pip install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
51+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
52+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
4953
fi

docker/test/wheels/fedora.Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ARG DEBIAN_FRONTEND=noninteractive
1818
# Some Python versions need the latest version of libexpat on Fedora, and the
1919
# base fedora:38 image doesn't have the latest version installed.
2020
RUN dnf update -y --nobest expat \
21-
&& dnf install -y --nobest --setopt=install_weak_deps=False \
21+
&& dnf install -y --nobest --setopt=install_weak_deps=False wget \
2222
python$(echo $python_version | tr -d .) \
2323
&& python${python_version} -m ensurepip --upgrade
2424
RUN if [ -n "$preinstalled_modules" ]; then \
@@ -35,8 +35,12 @@ COPY docs/sphinx/snippets/python /tmp/snippets/
3535
COPY python/tests /tmp/tests/
3636
COPY python/README*.md /tmp/
3737

38-
RUN python${python_version} -m pip install ${pip_install_flags} /tmp/$cuda_quantum_wheel
38+
# Working around issue https://github.com/pypa/pip/issues/11153.
39+
RUN wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin && \
40+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
41+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} /tmp/$cuda_quantum_wheel
3942
RUN if [ -n "$optional_dependencies" ]; then \
4043
cudaq_package=$(echo $cuda_quantum_wheel | cut -d '-' -f1 | tr _ -) && \
41-
python${python_version} -m pip install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
44+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
45+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
4246
fi

docker/test/wheels/opensuse.Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ARG preinstalled_modules="numpy pytest nvidia-cublas-cu12"
1515

1616
ARG DEBIAN_FRONTEND=noninteractive
1717
RUN zypper clean --all && zypper ref && zypper --non-interactive up --no-recommends \
18-
&& zypper --non-interactive in --no-recommends \
18+
&& zypper --non-interactive in --no-recommends wget \
1919
python$(echo ${python_version} | tr -d .) \
2020
&& python${python_version} -m ensurepip --upgrade
2121
RUN if [ -n "$preinstalled_modules" ]; then \
@@ -32,8 +32,12 @@ COPY docs/sphinx/snippets/python /tmp/snippets/
3232
COPY python/tests /tmp/tests/
3333
COPY python/README*.md /tmp/
3434

35-
RUN python${python_version} -m pip install ${pip_install_flags} /tmp/$cuda_quantum_wheel
35+
# Working around issue https://github.com/pypa/pip/issues/11153.
36+
RUN wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin && \
37+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
38+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} /tmp/$cuda_quantum_wheel
3639
RUN if [ -n "$optional_dependencies" ]; then \
3740
cudaq_package=$(echo $cuda_quantum_wheel | cut -d '-' -f1 | tr _ -) && \
38-
python${python_version} -m pip install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
41+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
42+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
3943
fi

docker/test/wheels/redhat.Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG pip_install_flags="--user"
1414
ARG preinstalled_modules="numpy pytest nvidia-cublas-cu12"
1515

1616
ARG DEBIAN_FRONTEND=noninteractive
17-
RUN dnf install -y --nobest --setopt=install_weak_deps=False \
17+
RUN dnf install -y --nobest --setopt=install_weak_deps=False wget \
1818
python${python_version} \
1919
&& python${python_version} -m ensurepip --upgrade
2020
RUN if [ -n "$preinstalled_modules" ]; then \
@@ -31,8 +31,12 @@ COPY docs/sphinx/snippets/python /tmp/snippets/
3131
COPY python/tests /tmp/tests/
3232
COPY python/README*.md /tmp/
3333

34-
RUN python${python_version} -m pip install ${pip_install_flags} /tmp/$cuda_quantum_wheel
34+
# Working around issue https://github.com/pypa/pip/issues/11153.
35+
RUN wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin && \
36+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
37+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} /tmp/$cuda_quantum_wheel
3538
RUN if [ -n "$optional_dependencies" ]; then \
3639
cudaq_package=$(echo $cuda_quantum_wheel | cut -d '-' -f1 | tr _ -) && \
37-
python${python_version} -m pip install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
40+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
41+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
3842
fi

docker/test/wheels/ubuntu.Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG pip_install_flags="--user"
1414
ARG preinstalled_modules="numpy pytest nvidia-cublas-cu12"
1515

1616
ARG DEBIAN_FRONTEND=noninteractive
17-
RUN apt-get update && apt-get install -y --no-install-recommends \
17+
RUN apt-get update && apt-get install -y --no-install-recommends wget \
1818
python${python_version} python${python_version}-venv
1919

2020
# We need to make sure the virtual Python environment remains
@@ -38,8 +38,12 @@ COPY python/README*.md /tmp/
3838

3939
RUN sed -ie 's/include-system-site-packages\s*=\s*false/include-system-site-packages = true/g' "$VIRTUAL_ENV/pyvenv.cfg"
4040

41-
RUN python${python_version} -m pip install ${pip_install_flags} /tmp/$cuda_quantum_wheel
41+
# Working around issue https://github.com/pypa/pip/issues/11153.
42+
RUN wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin && \
43+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
44+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} /tmp/$cuda_quantum_wheel
4245
RUN if [ -n "$optional_dependencies" ]; then \
4346
cudaq_package=$(echo $cuda_quantum_wheel | cut -d '-' -f1 | tr _ -) && \
44-
python${python_version} -m pip install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
47+
RAPIDS_PIP_EXE="python${python_version} -m pip" \
48+
/usr/local/bin/rapids-pip-retry install ${pip_install_flags} $cudaq_package[$optional_dependencies]; \
4549
fi

docs/notebook_validation.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,9 @@ def print_results(success, failed, skipped=[]):
103103
notebooks_success, notebooks_skipped, notebooks_failed = (
104104
[] for i in range(3))
105105

106-
## `afqmc`:
107-
## See: https://github.com/NVIDIA/cuda-quantum/issues/2577
108106
## `quantum_transformer`:
109107
## See: https://github.com/NVIDIA/cuda-quantum/issues/2689
110-
notebooks_skipped = ['afqmc.ipynb', 'quantum_transformer.ipynb']
108+
notebooks_skipped = ['quantum_transformer.ipynb']
111109

112110
for notebook_filename in notebook_filenames:
113111
base_name = os.path.basename(notebook_filename)

0 commit comments

Comments
 (0)