Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure of examples and applications #2218

Merged
merged 71 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a710578
new tutorial
zohimchandani Aug 28, 2024
5e13b83
updates
zohimchandani Aug 29, 2024
6153db0
Add ipywidgets to devdeps image for docs generation
bmhowe23 Aug 29, 2024
078c3ed
Formatting and spelling
bmhowe23 Aug 29, 2024
08af2f8
Merge branch 'main' into main
bmhowe23 Aug 29, 2024
cebc007
Merge branch 'NVIDIA:main' into main
zohimchandani Sep 12, 2024
f7b34c4
Merge branch 'NVIDIA:main' into main
zohimchandani Sep 18, 2024
0387c26
cleanup of docs
zohimchandani Sep 18, 2024
a2dc213
restructure of examples and applications pages
zohimchandani Sep 19, 2024
7a4adc5
adding a blank line
sacpis Sep 19, 2024
e0b7dbe
Merge branch 'main' into main
sacpis Sep 19, 2024
d8f4410
ran digitized_counterdiabatic_qaoa.ipynb to save the output
sacpis Sep 19, 2024
6ce6695
removing tests as the Python (*.py) files have been moved out (or con…
sacpis Sep 19, 2024
636bcc0
commenting out nvidia target and fixing duplicate htest definition
sacpis Sep 19, 2024
705842b
saving output from advanced vqe
zohimchandani Sep 23, 2024
7ffbf3c
updates
zohimchandani Sep 23, 2024
9321724
renaming tutorials -> applications
sacpis Sep 23, 2024
72ead24
purging unused rst files
sacpis Sep 23, 2024
5517077
* Adding missing image in the images folder
sacpis Sep 24, 2024
cc2800a
Merge branch 'main' into main
sacpis Sep 24, 2024
0eb6b44
adding double quotes around the target
sacpis Sep 24, 2024
91c317b
changing number of qpus to pass CI
sacpis Sep 24, 2024
e1eaeee
Merge branch 'main' into main
sacpis Sep 25, 2024
ee09e73
adding intro.py and making changes to rst file to include ipynb file
sacpis Sep 28, 2024
772fea4
Merge branch 'main' into main
sacpis Sep 28, 2024
8f4a736
Merge branch 'main' of https://github.com/zohimchandani/cuda-quantum
sacpis Sep 28, 2024
9f17e73
moving applications, examples, targets into dedicated folders
sacpis Sep 30, 2024
e47acd2
changing path
sacpis Sep 30, 2024
4e24921
adding applications and targets directories
sacpis Sep 30, 2024
06f4b25
Merge branch 'main' into main
sacpis Sep 30, 2024
1f412a6
changing path for hardware providers and few python files
sacpis Sep 30, 2024
3f836d9
Merge branch 'main' into main
sacpis Sep 30, 2024
80526ce
Merge branch 'main' of https://github.com/zohimchandani/cuda-quantum
sacpis Sep 30, 2024
3b580a1
fixing path
sacpis Oct 1, 2024
8fd380e
adding paths
sacpis Oct 2, 2024
9922c52
Merge branch 'main' into main
sacpis Oct 2, 2024
f1df271
adding applications path
sacpis Oct 2, 2024
9eb9ab8
adding python notebook directly in rst file
sacpis Oct 2, 2024
2eb4882
removign maxdepth
sacpis Oct 2, 2024
ffd54a5
fixing paths
sacpis Oct 3, 2024
8b702e6
adding targets path
sacpis Oct 3, 2024
f2cb3c6
adding paths
sacpis Oct 3, 2024
3537b1a
Merge branch 'main' into main
sacpis Oct 3, 2024
8321c36
Merge branch 'main' into main
sacpis Oct 3, 2024
00490c8
removing providers and tutorials path
sacpis Oct 3, 2024
0e5ec8e
clearing output
sacpis Oct 4, 2024
7553eed
adding a building_kernels python file in order to render it under tabs
sacpis Oct 4, 2024
8782cef
correcting spelling check and formatting
sacpis Oct 4, 2024
2afb6bd
excluding /building_kernels.py
sacpis Oct 4, 2024
17ac800
adding missing examples and removing warnings from the output
sacpis Oct 4, 2024
a044deb
Merge branch 'main' into main
sacpis Oct 4, 2024
79879ea
commenting nvidia target
sacpis Oct 5, 2024
6a1514c
Merge branch 'main' of https://github.com/zohimchandani/cuda-quantum
sacpis Oct 5, 2024
6e76a47
Merge branch 'main' into main
sacpis Oct 5, 2024
798a220
Merge branch 'main' into main
sacpis Oct 5, 2024
5ebd717
removing nbsphinx_widgets_path
sacpis Oct 5, 2024
26e564b
Merge branch 'main' of https://github.com/zohimchandani/cuda-quantum
sacpis Oct 5, 2024
b8076e8
changing VQE title
sacpis Oct 7, 2024
ba6a47d
Merge branch 'main' of https://github.com/zohimchandani/cuda-quantum …
sacpis Oct 9, 2024
ad56668
Merge branch 'main' into main
sacpis Oct 10, 2024
733fdfb
DCO Remediation Commit for Sachin Pisal <[email protected]>
sacpis Oct 10, 2024
2975718
DCO Remediation Commit for Ben Howe <[email protected]>
bmhowe23 Oct 10, 2024
eaf0285
sign
Oct 10, 2024
07a7771
Merge branch 'main' into main
sacpis Oct 10, 2024
1ed812e
* Adding applications and targets folder
sacpis Oct 11, 2024
bbbb241
adding pycudaq test for intro.py
sacpis Oct 12, 2024
8d9ac55
removing warnings from the cell output
sacpis Oct 14, 2024
9b66696
Merge branch 'main' into main
sacpis Oct 15, 2024
c66e8b8
Merge branch 'main' into main
sacpis Oct 16, 2024
29e30fa
Merge branch 'main' into main
sacpis Oct 16, 2024
9d27cdf
Merge branch 'main' into main
sacpis Oct 16, 2024
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: 2 additions & 0 deletions .github/workflows/config/spellcheck_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ matrix:
- name: cxx_examples
sources:
- 'docs/sphinx/examples/**/*.cpp'
- 'docs/sphinx/applications/cpp/*.cpp'
- 'docs/sphinx/targets/cpp/*.cpp'
expect_match: false
aspell:
lang: en
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ jobs:
export ORCA_ACCESS_URL='${{ secrets.ORCA_ACCESS_URL }}'
set +e # Allow script to keep going through errors
test_err_sum=0
cpp_tests="docs/sphinx/examples/cpp/providers/orca.cpp"
cpp_tests="docs/sphinx/targets/cpp/orca.cpp"
for filename in $cpp_tests; do
[ -e "$filename" ] || echo "::error::Couldn't find file ($filename)"
nvq++ --target orca --orca-url $ORCA_ACCESS_URL $filename
Expand All @@ -509,7 +509,7 @@ jobs:
test_err_sum=$((test_err_sum+1))
fi
done
python_tests="docs/sphinx/examples/python/providers/orca.py"
python_tests="docs/sphinx/targets/python/orca.py"
for filename in $python_tests; do
[ -e "$filename" ] || echo "::error::Couldn't find file ($filename)"
python3 $filename 1> /dev/null
Expand Down Expand Up @@ -636,7 +636,7 @@ jobs:
done

# Test C++ examples with NVQC
for filename in `find examples/cpp/ -name '*.cpp'`; do
for filename in `find examples/cpp/ applications/cpp/ targets/cpp/ -name '*.cpp'`; do
if [[ "$filename" == *"nvqc"* ]]; then
echo "$filename"
nvqc_config=""
Expand Down Expand Up @@ -672,7 +672,7 @@ jobs:

# Test NVQC Python examples + Python MLIR execution tests (not IR tests)
python3 -m pip install pytest
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
filename=$(basename -- "$ex")
filename="${filename%.*}"
echo "Testing $filename:"
Expand Down Expand Up @@ -789,7 +789,7 @@ jobs:
set +e # Allow script to keep going through errors
python$python_version -m pip install pytest
test_err_sum=0
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
filename=$(basename -- "$ex")
filename="${filename%.*}"
echo "Testing $filename:"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nvqc_regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
done

# Test C++ examples with NVQC
for filename in `find examples/cpp/ -name '*.cpp'`; do
for filename in `find examples/cpp/ applications/cpp/ targets/cpp/ -name '*.cpp'`; do
if [[ "$filename" == *"nvqc"* ]]; then
echo "$filename"
nvqc_config=""
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:

# Test NVQC Python examples + Python MLIR execution tests (not IR tests)
python3 -m pip install pytest
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
filename=$(basename -- "$ex")
filename="${filename%.*}"
echo "Testing $filename:"
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
set +e # Allow script to keep going through errors
python$python_version -m pip install pytest
test_err_sum=0
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
for ex in `find examples/python python/tests/mlir/target -name '*.py'; do
filename=$(basename -- "$ex")
filename="${filename%.*}"
echo "Testing $filename:"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ jobs:
run: |
chmod +x /tmp/install/install_cuda_quantum.*
/tmp/install/install_cuda_quantum.* --accept
rm -rf examples && mv docs/sphinx/examples examples && rm -rf examples/python
rm -rf examples applications targets && mv docs/sphinx/examples examples && mv docs/sphinx/applications applications && mv docs/sphinx/targets targets && rm -rf examples/python && rm -rf applications/python && rm -rf targets/python

GITHUB_STEP_SUMMARY=$GITHUB_STEP_SUMMARY \
bash -l scripts/validate_container.sh | tee /tmp/validation.out
Expand Down Expand Up @@ -835,6 +835,8 @@ jobs:
# Setup links for validate_wheel.sh script
ln -s $GITHUB_WORKSPACE/scripts/validate_wheel.sh .
ln -s $GITHUB_WORKSPACE/docs/sphinx/examples/python /tmp/examples
ln -s $GITHUB_WORKSPACE/docs/sphinx/applications/python /tmp/applications
ln -s $GITHUB_WORKSPACE/docs/sphinx/targets/python /tmp/targets
ln -s $GITHUB_WORKSPACE/docs/sphinx/snippets/python /tmp/snippets
ln -s $GITHUB_WORKSPACE/python/tests /tmp/tests
ln -s $GITHUB_WORKSPACE/python/README.md .
Expand Down Expand Up @@ -941,7 +943,7 @@ jobs:
fi; \
done`

rm -rf examples && mv github-repo/docs/sphinx/examples examples
rm -rf examples applications targets && mv github-repo/docs/sphinx/examples examples && mv github-repo/docs/sphinx/applications applications && mv github-repo/docs/sphinx/targets targets
mv github-repo/docs/notebook_validation.py .
GITHUB_STEP_SUMMARY=$GITHUB_STEP_SUMMARY \
bash github-repo/scripts/validate_container.sh $backends_to_test | tee /tmp/validation.out
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ jobs:
docker run --rm -dit --name wheel-validation-examples wheel_validation:local
status_sum=0

for ex in `find docs/sphinx/examples/python -name '*.py' -not -path '*/providers/*' -not -path '*/divisive_clustering_src/*' -not -path '*/utils_ipie.py' -not -path '*/vqe_cudaq_qnp.py'`; do
for ex in `find docs/sphinx/examples/python -name '*.py' -not -path '*/building_kernels.py'`; do
file="${ex#docs/sphinx/examples/python/}"
echo "__Example ${file}:__" >> /tmp/validation.out
(docker exec wheel-validation-examples bash -c "python${{ inputs.python_version }} /tmp/examples/$file" >> /tmp/validation.out) && success=true || success=false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:

create_output cxx '*.cpp *.h *.hpp :!:test :!:targettests :!:tpls :!:**/nlopt-src/*'
create_output cxx_headers '*.h *.hpp :!:test :!:targettests :!:tpls :!:**/nlopt-src/*'
create_output cxx_examples 'docs/sphinx/examples/**/*.cpp'
create_output cxx_examples 'docs/sphinx/examples/**/*.cpp' 'docs/sphinx/applications/cpp/*.cpp' 'docs/sphinx/targets/cpp/*.cpp'
create_output python '*.py :!:python/tests :!:test :!:targettests :!:tpls :!:docs/sphinx/conf.py'
create_output markdown '*.md :!:tpls'
create_output rst '*.rst :!:tpls'
Expand Down
2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ header:
- 'examples'
- 'tpls'
- 'docs/sphinx/**/*.html'
- 'docs/sphinx/applications'
- 'docs/sphinx/examples'
- 'docs/sphinx/targets'
- 'docs/sphinx/_templates'
- 'docs/sphinx/_static/cuda_quantum_icon.svg'
- 'docker/test/installer/mpi_cuda_check.cpp'
Expand Down
8 changes: 4 additions & 4 deletions Developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ line printed when you build the code and run an example using the command

```bash
bash "$CUDAQ_REPO_ROOT/scripts/build_cudaq.sh" && \
nvq++ "$CUDAQ_REPO_ROOT/docs/sphinx/examples/cpp/algorithms/grover.cpp" -o grover.out && \
nvq++ "$CUDAQ_REPO_ROOT/docs/sphinx/applications/cpp/grover.cpp" -o grover.out && \
./grover.out
```

When working on compiler internals, it can be useful to look at intermediate
representations for CUDA-Q kernels.

To see how the kernels in [this
example](./docs/sphinx/examples/cpp/algorithms/grover.cpp) are translated, you
example](./docs/sphinx/applications/cpp/grover.cpp) are translated, you
can run

```bash
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/examples/cpp/algorithms/grover.cpp
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/applications/cpp/grover.cpp
```

to see its representation in the Quake MLIR dialect. To see its translation to
[QIR](https://www.qir-alliance.org/), you can run

```bash
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/examples/cpp/algorithms/grover.cpp |
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/applications/cpp/grover.cpp |
cudaq-opt --canonicalize --add-dealloc |
quake-translate --convert-to=qir
```
Expand Down
2 changes: 2 additions & 0 deletions docker/build/assets.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ FROM prereqs AS cpp_build
ADD "cmake" /cuda-quantum/cmake
ADD "docs/CMakeLists.txt" /cuda-quantum/docs/CMakeLists.txt
ADD "docs/sphinx/examples" /cuda-quantum/docs/sphinx/examples
ADD "docs/sphinx/applications" /cuda-quantum/docs/sphinx/applications
ADD "docs/sphinx/targets" /cuda-quantum/docs/sphinx/targets
ADD "docs/sphinx/snippets" /cuda-quantum/docs/sphinx/snippets
ADD "include" /cuda-quantum/include
ADD "lib" /cuda-quantum/lib
Expand Down
5 changes: 3 additions & 2 deletions docker/release/cudaq.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ RUN adduser --disabled-password --gecos '' cudaq && adduser cudaq sudo \
ENV PATH="$PATH:/home/cudaq/.local/bin"

ADD ./docs/sphinx/examples/ /home/cudaq/examples/
ADD ./docs/sphinx/applications/ /home/cudaq/applications/
ADD ./docs/sphinx/targets/ /home/cudaq/targets/
ADD ./docker/release/README.md /home/cudaq/README.md
RUN mv /home/cudaq/examples/python/tutorials /home/cudaq/tutorials \
&& chown -R cudaq /home/cudaq && chgrp -R cudaq /home/cudaq
RUN chown -R cudaq /home/cudaq && chgrp -R cudaq /home/cudaq

USER cudaq
WORKDIR /home/cudaq
Expand Down
2 changes: 2 additions & 0 deletions docker/test/installer/linux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ ADD scripts/validate_container.sh /home/cudaq/validate.sh
ADD scripts/configure_build.sh /home/cudaq/configure_build.sh
ADD docker/test/installer/mpi_cuda_check.cpp /home/cudaq/mpi_cuda_check.cpp
ADD docs/sphinx/examples/cpp /home/cudaq/examples
ADD docs/sphinx/applications/cpp /home/cudaq/applications
ADD docs/sphinx/targets/cpp /home/cudaq/targets

# Wheel to check side-by-side installation of Python and C++ support
ARG cuda_quantum_wheel='cuda_quantum_*.whl'
Expand Down
2 changes: 2 additions & 0 deletions docker/test/wheels/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ ARG optional_dependencies=
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
COPY docs/sphinx/examples/python /tmp/examples/
COPY docs/sphinx/applications/python /tmp/applications/
COPY docs/sphinx/targets/python /tmp/targets/
COPY docs/sphinx/snippets/python /tmp/snippets/
COPY python/tests /tmp/tests/
COPY python/README.md /tmp/README.md
Expand Down
2 changes: 2 additions & 0 deletions docker/test/wheels/fedora.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ARG optional_dependencies=
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
COPY docs/sphinx/examples/python /tmp/examples/
COPY docs/sphinx/applications/python /tmp/applications/
COPY docs/sphinx/targets/python /tmp/targets/
COPY docs/sphinx/snippets/python /tmp/snippets/
COPY python/tests /tmp/tests/
COPY python/README.md /tmp/README.md
Expand Down
2 changes: 2 additions & 0 deletions docker/test/wheels/opensuse.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ARG optional_dependencies=
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp39-cp39-manylinux_2_28_x86_64.whl
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
COPY docs/sphinx/examples/python /tmp/examples/
COPY docs/sphinx/applications/python /tmp/applications/
COPY docs/sphinx/targets/python /tmp/targets/
COPY docs/sphinx/snippets/python /tmp/snippets/
COPY python/tests /tmp/tests/
COPY python/README.md /tmp/README.md
Expand Down
2 changes: 2 additions & 0 deletions docker/test/wheels/redhat.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ARG optional_dependencies=
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
COPY docs/sphinx/examples/python /tmp/examples/
COPY docs/sphinx/applications/python /tmp/applications/
COPY docs/sphinx/targets/python /tmp/targets/
COPY docs/sphinx/snippets/python /tmp/snippets/
COPY python/tests /tmp/tests/
COPY python/README.md /tmp/README.md
Expand Down
2 changes: 2 additions & 0 deletions docker/test/wheels/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ ARG optional_dependencies=
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
COPY docs/sphinx/examples/python /tmp/examples/
COPY docs/sphinx/applications/python /tmp/applications/
COPY docs/sphinx/targets/python /tmp/targets/
COPY docs/sphinx/snippets/python /tmp/snippets/
COPY python/tests /tmp/tests/
COPY python/README.md /tmp/README.md
Expand Down
55 changes: 21 additions & 34 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Add nvq++ compile + execution test of code examples
# Args:
# TEST_NAME: name of the test executable. Test name is prefixed with "nvqpp"
# SOURCE_LOCATION: location of the source file (relative to 'sphinx/examples/cpp' directory by default)
# SOURCE_LOCATION: location of the source file (relative to 'sphinx' directory by default)
# Optional keyword args:
# TARGET <TARGET_NAME>: name of the target to use
# TARGET_OPTION <Option>: extra option for the target
Expand All @@ -25,7 +25,7 @@ function(add_nvqpp_test TEST_NAME SOURCE_LOCATION)
endif()
endif()
if (NOT PARSED_ARGS_SOURCE_DIR)
set(PARSED_ARGS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sphinx/examples/cpp")
set(PARSED_ARGS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sphinx")
endif()
add_test(
NAME
Expand All @@ -39,26 +39,26 @@ function(add_nvqpp_test TEST_NAME SOURCE_LOCATION)
endif()
endfunction()

add_nvqpp_test(GHZ basics/static_kernel.cpp)
add_nvqpp_test(MultiControlOps basics/multi_controlled_operations.cpp)
add_nvqpp_test(ExpVals basics/expectation_values.cpp)
add_nvqpp_test(MidCircuitMeasurements basics/mid_circuit_measurement.cpp)
add_nvqpp_test(PhaseEstimation algorithms/phase_estimation.cpp)
add_nvqpp_test(Grover algorithms/grover.cpp)
add_nvqpp_test(QAOA algorithms/qaoa_maxcut.cpp)
add_nvqpp_test(VQEH2 algorithms/vqe_h2.cpp)
add_nvqpp_test(AmplitudeEstimation algorithms/amplitude_estimation.cpp)
add_nvqpp_test(Builder other/builder/builder.cpp)
add_nvqpp_test(QAOABuilder other/builder/qaoa_maxcut_builder.cpp)
add_nvqpp_test(VQEH2Builder other/builder/vqe_h2_builder.cpp)
add_nvqpp_test(ComputeAction other/compute_actions.cpp)
add_nvqpp_test(Gradients other/gradients.cpp)
add_nvqpp_test(IterativePhaseEstimation other/iterative_qpe.cpp)
add_nvqpp_test(RandomWalkPhaseEstimation other/random_walk_qpe.cpp)
add_nvqpp_test(GHZ examples/cpp/basics/static_kernel.cpp)
add_nvqpp_test(MultiControlOps examples/cpp/basics/multi_controlled_operations.cpp)
add_nvqpp_test(ExpVals examples/cpp/basics/expectation_values.cpp)
add_nvqpp_test(MidCircuitMeasurements examples/cpp/basics/mid_circuit_measurement.cpp)
add_nvqpp_test(PhaseEstimation applications/cpp/phase_estimation.cpp)
add_nvqpp_test(Grover applications/cpp/grover.cpp)
add_nvqpp_test(QAOA applications/cpp/qaoa_maxcut.cpp)
add_nvqpp_test(VQEH2 applications/cpp/vqe_h2.cpp)
add_nvqpp_test(AmplitudeEstimation applications/cpp/amplitude_estimation.cpp)
add_nvqpp_test(Builder examples/cpp/other/builder/builder.cpp)
add_nvqpp_test(QAOABuilder examples/cpp/other/builder/qaoa_maxcut_builder.cpp)
add_nvqpp_test(VQEH2Builder examples/cpp/other/builder/vqe_h2_builder.cpp)
add_nvqpp_test(ComputeAction examples/cpp/other/compute_actions.cpp)
add_nvqpp_test(Gradients examples/cpp/other/gradients.cpp)
add_nvqpp_test(IterativePhaseEstimation applications/cpp/iterative_qpe.cpp)
add_nvqpp_test(RandomWalkPhaseEstimation applications/cpp/random_walk_qpe.cpp)

if (CUSTATEVEC_ROOT AND CUDA_FOUND)
add_nvqpp_test(CuQuantumGHZ basics/cuquantum_backends.cpp TARGET nvidia LABELS gpu_required)
add_nvqpp_test(CuQuantumBernsteinVazirani algorithms/bernstein_vazirani.cpp TARGET nvidia LABELS gpu_required)
add_nvqpp_test(CuQuantumGHZ examples/cpp/basics/cuquantum_backends.cpp TARGET nvidia LABELS gpu_required)
add_nvqpp_test(CuQuantumBernsteinVazirani applications/cpp/bernstein_vazirani.cpp TARGET nvidia LABELS gpu_required)
endif()

# code snippets in docs
Expand Down Expand Up @@ -103,7 +103,7 @@ if (CUSTATEVEC_ROOT AND CUDA_FOUND)
endif()
endif()

add_nvqpp_test(photonics_sim providers/photonics.cpp TARGET photonics)
add_nvqpp_test(photonics_sim targets/cpp/photonics.cpp TARGET photonics)
add_nvqpp_test(SampleAsyncRemote using/cudaq/platform/sample_async_remote.cpp TARGET remote-mqpu SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/cpp)
set_tests_properties(
nvqpp_SampleAsyncRemote
Expand All @@ -130,19 +130,6 @@ if (CUDAQ_ENABLE_PYTHON)
endif()
endfunction()

add_pycudaq_test(Intro intro.py)
add_pycudaq_test(BernsteinVazirani bernstein_vazirani.py)
add_pycudaq_test(QAOA qaoa_maxcut.py)
add_pycudaq_test(VQE simple_vqe.py)
add_pycudaq_test(VQEAdvanced advanced_vqe.py)

add_pycudaq_test(AmplitudeDampingNoise noise_amplitude_damping.py)
add_pycudaq_test(BitFlipNoise noise_bit_flip.py)
add_pycudaq_test(DepolarizingNoise noise_depolarization.py)
add_pycudaq_test(PhaseFlipNoise noise_phase_flip.py)
add_pycudaq_test(KrausNoise noise_kraus_operator.py)
add_pycudaq_test(NoiseCallback noise_callback.py)
bmhowe23 marked this conversation as resolved.
Show resolved Hide resolved

if (CUTENSORNET_ROOT AND CUDA_FOUND)
# This example uses tensornet backend.
add_pycudaq_test(SampleAsyncRemote using/cudaq/platform/sample_async_remote.py SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/python)
Expand Down
Loading
Loading