Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fcffe50
Set up pipeline for cuquantum 25.03 (#56)
1tnguyen Feb 28, 2025
7fb9c9f
Merge pull request #58 from NVIDIA/main
bmhowe23 Mar 3, 2025
96003fd
Update Python dynamics to use cuquantum 25.03 API (#57)
1tnguyen Mar 4, 2025
abe5c00
Missing private packages for deployment/publishing (#60)
1tnguyen Mar 4, 2025
f000da1
Support MPS general noise channel (#55)
1tnguyen Mar 5, 2025
c973c72
Merge main to staging
bmhowe23 Mar 5, 2025
c2ce345
Fixes for private Publishing (#62)
1tnguyen Mar 7, 2025
7406726
Merge main to staging
bmhowe23 Mar 7, 2025
ecfd2a3
Updating cudensitymat APIs with batchSize parameter (#63)
sacpis Mar 7, 2025
c695d32
Merge main to staging
bmhowe23 Mar 10, 2025
53abe4e
Update mgpu sha: add CUDAQ_FORCE_EXP_PAULI_DECOMPOSE option (#66)
1tnguyen Mar 10, 2025
f28179a
Merge branch 'main' into staging/0.10.0
bettinaheim Mar 11, 2025
2d1094a
Merge pull request #68 from NVIDIA/main_updates
bettinaheim Mar 11, 2025
fe921b0
squashing network issue mitigation into a single commit
bettinaheim Mar 11, 2025
59592b8
Update publishing.yml to split the wheelhouse due to file size limita…
bmhowe23 Mar 12, 2025
f7b3156
[core] Make the get-concrete-matrix pass a Module pass. (#2715)
schweitzpgi Mar 12, 2025
a1b5c92
Fixing class names (#2721)
sacpis Mar 12, 2025
3e8b469
Adding state to a vector of size 1 (#2723)
sacpis Mar 12, 2025
23748a6
Skipping non-dynamics examples for dynamics target (#2722)
sacpis Mar 12, 2025
87f098e
Adding curand dynamic dependency (#72)
bettinaheim Mar 12, 2025
0b0c61d
Adding test_helpers to CI (#2724)
sacpis Mar 12, 2025
1d0d222
removing afqmc notebook
bettinaheim Mar 12, 2025
92c1cd3
fixing typo in the publishing pipeline
bettinaheim Mar 12, 2025
005c063
Suppress deprecation warnings on cuquantum import (#73)
1tnguyen Mar 12, 2025
ca5f6f4
Setting device parameter (#75)
sacpis Mar 13, 2025
a44a939
Fix test_qnn.py for more than 2 GPUs (#2728)
1tnguyen Mar 13, 2025
ad77358
allowing release creation even with manual gitlab commit (to re rever…
bettinaheim Mar 13, 2025
139b4a1
Bump mgpu sha to pick up a thread-safety fix (#76)
1tnguyen Mar 13, 2025
676aae0
Adding deprecation notices for CUDA 11 (#77)
bettinaheim Mar 13, 2025
f24f4f7
Bump mgpu sha to incorporate gate grouping integer overflow hot fix (…
1tnguyen Mar 14, 2025
f9e8e23
Revert temporary changes (#80)
1tnguyen Mar 17, 2025
b3dffed
Update docs for trajectory simulation (#74)
1tnguyen Mar 17, 2025
306e993
Undoing a change for permissive publishing
bettinaheim Mar 17, 2025
13c708e
Merge pull request #2738 from bettinaheim/staging/0.10.0
bettinaheim Mar 17, 2025
857dd2c
Update neutral atom documentation (#2734)
nvidia-dobri Mar 17, 2025
a7986ed
Merge branch 'main' into rel_0.10.0
bettinaheim Mar 17, 2025
b9c743a
Merge branch 'main' into rel_0.10.0
bettinaheim Mar 18, 2025
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 .github/workflows/config/gitlab_commits.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nvidia-mgpu-repo: cuda-quantum/cuquantum-mgpu.git
nvidia-mgpu-commit: de32bf2abae42f118a0da36be0066296d76b0dbc
nvidia-mgpu-commit: ddfaacf2ffd7dc1a9a4333e06474b213887d437c
9 changes: 7 additions & 2 deletions .github/workflows/docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
driver-opts: |
network=host
image=moby/buildkit:v0.19.0

- name: Build Open MPI
id: docker_build
uses: docker/build-push-action@v5
Expand Down Expand Up @@ -483,6 +483,9 @@ jobs:

platform_tag=${{ needs.metadata.outputs.platform_tag }}
cuda_major=`echo ${{ inputs.cuda_version }} | cut -d . -f1`
if [ "$cuda_major" == "11" ]; then
deprecation_notice="**Note**: Support for CUDA 11 will be removed in future releases. Please update to CUDA 12."
fi
image_tag=${platform_tag:+$platform_tag-}${cuda_major:+cu${cuda_major}-}
if ${{ github.event.pull_request.number != '' }} || [ -n "$(echo ${{ github.ref_name }} | grep pull-request/)" ]; then
pr_number=`echo ${{ github.ref_name }} | grep -o [0-9]*`
Expand All @@ -502,6 +505,7 @@ jobs:
echo "base_image=$base_image" >> $GITHUB_OUTPUT
echo "devdeps_image=$devdeps_image" >> $GITHUB_OUTPUT
echo "dev_image_name=$dev_image_name" >> $GITHUB_OUTPUT
echo "deprecation_notice=$deprecation_notice" >> $GITHUB_OUTPUT

if ${{ inputs.environment == '' }}; then
tar_archive=/tmp/cuda-quantum.tar
Expand Down Expand Up @@ -602,6 +606,7 @@ jobs:
cudaqdev_image=${{ steps.prereqs.outputs.dev_image_name }}@${{ steps.release_build.outputs.digest }}
base_image=${{ steps.prereqs.outputs.base_image }}
release_version=${{ steps.prereqs.outputs.image_tag }}
deprecation_notice=${{ steps.prereqs.outputs.deprecation_notice }}
tags: ${{ steps.cudaq_metadata.outputs.tags }}
labels: ${{ steps.cudaq_metadata.outputs.labels }}
platforms: ${{ inputs.platforms }}
Expand Down Expand Up @@ -719,7 +724,7 @@ jobs:
# Unfortunately, we need to install cuquantum for docs generation to work properly,
# since using mock imports in the autodocs configuration doesn't work properly.
# See also https://github.com/sphinx-doc/sphinx/issues/11211.
docker exec cuda-quantum-dev bash -c "python3 -m pip install cuquantum-python-cu12~=24.11"
docker exec cuda-quantum-dev bash -c "python3 -m pip install cuquantum-python-cu12~=25.03"

(docker exec cuda-quantum-dev bash -c "export $docs_version && bash scripts/build_docs.sh" && built=true) || built=false
if $built; then docker cp cuda-quantum-dev:"/usr/local/cudaq/docs/." docs; \
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ jobs:
echo "docker_output=type=local,dest=/tmp/wheels" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.REPO_BOT_ACCESS_TOKEN }}

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -1127,7 +1127,7 @@ jobs:
pattern: '*-wheels'
path: /tmp/wheels
merge-multiple: true

- name: Load metapackage
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -1214,10 +1214,16 @@ jobs:
for installer in `find installers/ -type f -not -name '*.whl'`; do
mv -v "$installer" "$(basename -- "$installer")"
done
for dir in `ls wheelhouse/`; do
mv -v "wheelhouse/$dir"/* wheelhouse/ && rmdir "wheelhouse/$dir"
# A single wheelhouse.zip file is too big. Split it up by platform.
platforms=$(ls wheelhouse | cut -d- -f1 | sort | uniq)
for p in $platforms; do
mkdir wheelhouse-${p}
for fulldir in wheelhouse/${p}-*; do
dir=$(basename $fulldir)
mv -v "wheelhouse/$dir"/* wheelhouse-${p}/ && rmdir "wheelhouse/$dir"
done
zip -r wheelhouse-${p}.zip wheelhouse-${p}
done
zip -r wheelhouse.zip wheelhouse
zip -r metapackages.zip metapackages

release_id=${{ inputs.assets_from_run || github.run_id }}
Expand All @@ -1234,7 +1240,7 @@ jobs:
--target $github_commit --draft $prerelease \
--generate-notes --notes-start-tag $latest_tag --notes "$rel_notes"
gh release upload $release_id -R ${{ github.repository }} install_cuda_quantum* --clobber
gh release upload $release_id -R ${{ github.repository }} wheelhouse.zip --clobber
gh release upload $release_id -R ${{ github.repository }} wheelhouse-*.zip --clobber
gh release upload $release_id -R ${{ github.repository }} metapackages.zip --clobber
gh release edit $release_id -R ${{ github.repository }} \
--title "$release_title" --tag $version $prerelease # --draft=false
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/python_metapackages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ jobs:
echo "Creating README.md for cudaq package"
package_name=cudaq
cuda_version_requirement="11.x (where x \>= 8) or 12.x"
cuda_version_conda=11.8.0 # only used as example in the install script
cuda_version_conda=12.4.0 # only used as example in the install script
deprecation_notice="**Note**: Support for CUDA 11 will be removed in future releases. Please update to CUDA 12."
cat python/README.md.in > python/metapackages/README.md
for variable in package_name cuda_version_requirement cuda_version_conda; do
for variable in package_name cuda_version_requirement cuda_version_conda deprecation_notice; do
sed -i "s/.{{[ ]*$variable[ ]*}}/${!variable}/g" python/metapackages/README.md
done
if [ -n "$(cat python/metapackages/README.md | grep -e '.{{.*}}')" ]; then
Expand Down
2 changes: 1 addition & 1 deletion docker/build/assets.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ RUN gcc_packages=$(dnf list installed "gcc*" | sed '/Installed Packages/d' | cut

## [Python MLIR tests]
RUN cd /cuda-quantum && source scripts/configure_build.sh && \
python3 -m pip install lit pytest scipy cuquantum-python-cu$(echo ${CUDA_VERSION} | cut -d . -f1)~=24.11 && \
python3 -m pip install lit pytest scipy cuquantum-python-cu$(echo ${CUDA_VERSION} | cut -d . -f1)~=25.03 && \
"${LLVM_INSTALL_PREFIX}/bin/llvm-lit" -v _skbuild/python/tests/mlir \
--param nvqpp_site_config=_skbuild/python/tests/mlir/lit.site.cfg.py
# The other tests for the Python wheel are run post-installation.
Expand Down
2 changes: 1 addition & 1 deletion docker/build/devdeps.ext.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ ENV PATH="${CUDA_INSTALL_PREFIX}/lib64/:${CUDA_INSTALL_PREFIX}/bin:${PATH}"
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* && \
python3 -m pip install cuquantum-python-cu$(echo $CUDA_VERSION | cut -d . -f1)~=24.11 && \
python3 -m pip install cuquantum-python-cu$(echo $CUDA_VERSION | cut -d . -f1)~=25.03 && \
if [ "$(python3 --version | grep -o [0-9\.]* | cut -d . -f -2)" != "3.10" ]; then \
echo "expecting Python version 3.10"; \
fi
Expand Down
4 changes: 3 additions & 1 deletion docker/release/cudaq.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ Version: ${CUDA_QUANTUM_VERSION}\n\n\
Copyright (c) 2025 NVIDIA Corporation & Affiliates \n\
All rights reserved.\n\n\
To run a command as administrator (user `root`), use `sudo <command>`.\n"
RUN echo -e "$COPYRIGHT_NOTICE" > "$CUDA_QUANTUM_PATH/Copyright.txt"
ARG deprecation_notice=""
RUN echo -e "$COPYRIGHT_NOTICE" > "$CUDA_QUANTUM_PATH/Copyright.txt" && \
echo -e "$deprecation_notice" >> "$CUDA_QUANTUM_PATH/Copyright.txt"
RUN echo 'cat "$CUDA_QUANTUM_PATH/Copyright.txt"' > /etc/profile.d/welcome.sh

# See also https://github.com/microsoft/vscode-remote-release/issues/4781
Expand Down
5 changes: 4 additions & 1 deletion docker/release/cudaq.wheel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ RUN cd cuda-quantum && cat python/README.md.in > python/README.md && \
package_name=cuda-quantum-cu$(echo ${CUDA_VERSION} | cut -d . -f1) && \
cuda_version_requirement="\>= ${CUDA_VERSION}" && \
cuda_version_conda=${CUDA_VERSION}.0 && \
for variable in package_name cuda_version_requirement cuda_version_conda; do \
if [ "${CUDA_VERSION#11.}" != "${CUDA_VERSION}" ]; then \
deprecation_notice="**Note**: Support for CUDA 11 will be removed in future releases. Please update to CUDA 12."; \
fi && \
for variable in package_name cuda_version_requirement cuda_version_conda deprecation_notice; do \
sed -i "s/.{{[ ]*$variable[ ]*}}/${!variable}/g" python/README.md; \
done && \
if [ -n "$(cat python/README.md | grep -e '.{{.*}}')" ]; then \
Expand Down
11 changes: 11 additions & 0 deletions docker/release/installer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ RUN source /cuda-quantum/scripts/configure_build.sh && \
## [<CUDAQuantumAssets]

## [Self-extracting Archive]
ARG deprecation_notice=""
RUN if [ -z "${deprecation_notice}" ] && [ "${CUDA_VERSION#11.}" != "${CUDA_VERSION}" ]; then \
deprecation_notice="**Note**: Support for CUDA 11 will be removed in future releases. Please update to CUDA 12."; \
fi && \
if [ -n "${deprecation_notice}" ]; then \
notice="deprecation_notice='"${deprecation_notice}"'" && \
key='expected_key="Enter any key to continue."' && \
# prompt and wait for confirmation if input and output is a terminal, print to error stream otherwise
prompt='if [ -t 0 ] && [ -t 1 ]; then while true; do read -p "$deprecation_notice $expected_key" -r choice < /dev/tty; case "$choice" in * ) break;; esac; done; else echo -e "\e[01;31m${deprecation_notice}\e[0m" >&2; fi' && \
echo "$notice" >> install.sh && echo "$key" >> install.sh && echo "$prompt" >> install.sh; \
fi
RUN bash /makeself/makeself.sh --gzip --sha256 --license /cuda-quantum/LICENSE \
/cuda_quantum_assets install_cuda_quantum_cu$(echo ${CUDA_VERSION} | cut -d . -f1).$(uname -m) \
"CUDA-Q toolkit for heterogeneous quantum-classical workflows" \
Expand Down
44 changes: 44 additions & 0 deletions docs/sphinx/snippets/cpp/using/backends/trajectory_batching.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. *
* All rights reserved. *
* *
* This source code and the accompanying materials are made available under *
* the terms of the Apache License 2.0 which accompanies this distribution. *
******************************************************************************/

// [Begin Documentation]
#include <chrono>
#include <cudaq.h>
#include <iostream>

struct xOp {
void operator()(int qubit_count) __qpu__ {
cudaq::qvector q(qubit_count);
x(q);
mz(q);
}
};

int main() {
// Add a simple bit-flip noise channel to X gate
const double error_probability = 0.01;

cudaq::bit_flip_channel bit_flip(error_probability);
// Add noise channels to our noise model.
cudaq::noise_model noise_model;
// Apply the bitflip channel to any X-gate on any qubits
noise_model.add_all_qubit_channel<cudaq::types::x>(bit_flip);

const int qubit_count = 10;
const auto start_time = std::chrono::high_resolution_clock::now();
// Due to the impact of noise, our measurements will no longer be uniformly in
// the |1...1> state.
auto counts =
cudaq::sample({.shots = 1000, .noise = noise_model}, xOp{}, qubit_count);
const auto end_time = std::chrono::high_resolution_clock::now();
counts.dump();
const std::chrono::duration<double, std::milli> elapsed_time =
end_time - start_time;
std::cout << "Simulation elapsed time: " << elapsed_time.count() << "ms\n";
return 0;
}
3 changes: 3 additions & 0 deletions docs/sphinx/snippets/python/using/backends/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import cudaq

# Use the `nvidia` target
# Other targets capable of trajectory simulation are:
# - `tensornet`
# - `tensornet-mps`
cudaq.set_target("nvidia")

# Let's define a simple kernel that we will add noise to.
Expand Down
46 changes: 46 additions & 0 deletions docs/sphinx/snippets/python/using/backends/trajectory_batching.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ============================================================================ #
# Copyright (c) 2022 - 2024 NVIDIA Corporation & Affiliates. #
# All rights reserved. #
# #
# This source code and the accompanying materials are made available under #
# the terms of the Apache License 2.0 which accompanies this distribution. #
# ============================================================================ #

#[Begin Docs]
import time
import cudaq
# Use the `nvidia` target
cudaq.set_target("nvidia")

# Let's define a simple kernel that we will add noise to.
qubit_count = 10


@cudaq.kernel
def kernel(qubit_count: int):
qvector = cudaq.qvector(qubit_count)
x(qvector)
mz(qvector)


# Add a simple bit-flip noise channel to X gate
error_probability = 0.01
bit_flip = cudaq.BitFlipChannel(error_probability)

# Add noise channels to our noise model.
noise_model = cudaq.NoiseModel()
# Apply the bit-flip channel to any X-gate on any qubits
noise_model.add_all_qubit_channel("x", bit_flip)

ideal_counts = cudaq.sample(kernel, qubit_count, shots_count=1000)

start = time.time()
# Due to the impact of noise, our measurements will no longer be uniformly
# in the |1...1> state.
noisy_counts = cudaq.sample(kernel,
qubit_count,
noise_model=noise_model,
shots_count=1000)
end = time.time()
noisy_counts.dump()
print(f"Simulation elapsed time: {(end - start) * 1000} ms")
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
from cudaq import spin

# Use the `nvidia` target
# Other targets capable of trajectory simulation are:
# - `tensornet`
# - `tensornet-mps`
cudaq.set_target("nvidia")


Expand Down
Loading