Skip to content

Commit

Permalink
Restructure of examples and applications (#2218)
Browse files Browse the repository at this point in the history
* new tutorial

* updates

* Add ipywidgets to devdeps image for docs generation

* Formatting and spelling

* cleanup of docs

* restructure of examples and applications pages

* adding a blank line

* ran digitized_counterdiabatic_qaoa.ipynb to save the output

* removing tests as the Python (*.py) files have been moved out (or condensed) as part of PR #2218

* commenting out nvidia target and fixing duplicate htest definition

* saving output from advanced vqe

* updates

* renaming tutorials -> applications

* purging unused rst files

* * Adding missing image in the images folder
* Correcting the image path in ipynb
* Setting nbsphinx_widgets_path to empty string (to resolve this warning
  generated during sphinx docs generation
  WARNING: nbsphinx_widgets_path not given and ipywidgets module unavailable)

* adding double quotes around the target

* changing number of qpus to pass CI

* adding intro.py and making changes to rst file to include ipynb file

* moving applications, examples, targets into dedicated folders

* changing path

* adding applications and targets directories

* changing path for hardware providers and few python files

* fixing path

* adding paths

* adding applications path

* adding python notebook directly in rst file

* removign maxdepth

* fixing paths

* adding targets path

* adding paths

* removing providers and tutorials path

* clearing output

* adding a building_kernels python file in order to render it under tabs

* correcting spelling check and formatting

* excluding /building_kernels.py

* adding missing examples and removing warnings from the output

* commenting nvidia target

* removing nbsphinx_widgets_path

* changing VQE title

* DCO Remediation Commit for Sachin Pisal <[email protected]>

I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 7a4adc5
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: d8f4410
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 6ce6695
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 636bcc0
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 9321724
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 72ead24
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 5517077
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 0eb6b44
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 91c317b
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: ee09e73
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 9f17e73
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: e47acd2
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 4e24921
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 1f412a6
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 3b580a1
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 8fd380e
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: f1df271
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 9eb9ab8
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 2eb4882
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: ffd54a5
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 8b702e6
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: f2cb3c6
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 00490c8
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 0e5ec8e
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 7553eed
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 8782cef
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 2afb6bd
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 17ac800
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 79879ea
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: 5ebd717
I, Sachin Pisal <[email protected]>, hereby add my Signed-off-by to this commit: b8076e8

Signed-off-by: Sachin Pisal <[email protected]>

* DCO Remediation Commit for Ben Howe <[email protected]>

I, Ben Howe <[email protected]>, hereby add my Signed-off-by to this commit: 6153db0
I, Ben Howe <[email protected]>, hereby add my Signed-off-by to this commit: 078c3ed

Signed-off-by: Ben Howe <[email protected]>

* sign

* * Adding applications and targets folder
* Removing unnecessary binary files

* adding pycudaq test for intro.py

* removing warnings from the cell output

---------

Signed-off-by: Sachin Pisal <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Co-authored-by: Ben Howe <[email protected]>
Co-authored-by: Ben Howe <[email protected]>
Co-authored-by: Sachin Pisal <[email protected]>
Co-authored-by: root <[email protected]>
  • Loading branch information
5 people authored Oct 17, 2024
1 parent 490930d commit 5fbbfcf
Show file tree
Hide file tree
Showing 158 changed files with 6,439 additions and 3,366 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/config/spellcheck_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,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 @@ -487,7 +487,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 docs/sphinx/examples/cpp/providers/orca_mqpu.cpp"
cpp_tests="docs/sphinx/targets/cpp/orca.cpp docs/sphinx/targets/cpp/orca_mqpu.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 @@ -506,7 +506,7 @@ jobs:
test_err_sum=$((test_err_sum+1))
fi
done
python_tests="docs/sphinx/examples/python/providers/orca.py docs/sphinx/examples/python/providers/orca_mqpu.py"
python_tests="docs/sphinx/targets/python/orca.py docs/sphinx/targets/python/orca_mqpu.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 @@ -633,7 +633,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 @@ -669,7 +669,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 @@ -786,7 +786,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 @@ -154,7 +154,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 @@ -190,7 +190,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 @@ -304,7 +304,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 @@ -791,7 +791,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 @@ -837,6 +837,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 @@ -943,7 +945,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 @@ -85,7 +85,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 :!:docs/sphinx/_templates/**/*.rst'
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
53 changes: 21 additions & 32 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 Down Expand Up @@ -131,18 +131,7 @@ if (CUDAQ_ENABLE_PYTHON)
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)

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
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5fbbfcf

Please sign in to comment.