Skip to content

Commit 5fbbfcf

Browse files
zohimchandanibmhowe23sacpisroot
authored
Restructure of examples and applications (#2218)
* 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]>
1 parent 490930d commit 5fbbfcf

File tree

158 files changed

+6439
-3366
lines changed

Some content is hidden

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

158 files changed

+6439
-3366
lines changed

.github/workflows/config/spellcheck_config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ matrix:
193193
- name: cxx_examples
194194
sources:
195195
- 'docs/sphinx/examples/**/*.cpp'
196+
- 'docs/sphinx/applications/cpp/*.cpp'
197+
- 'docs/sphinx/targets/cpp/*.cpp'
196198
expect_match: false
197199
aspell:
198200
lang: en

.github/workflows/integration_tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ jobs:
487487
export ORCA_ACCESS_URL='${{ secrets.ORCA_ACCESS_URL }}'
488488
set +e # Allow script to keep going through errors
489489
test_err_sum=0
490-
cpp_tests="docs/sphinx/examples/cpp/providers/orca.cpp docs/sphinx/examples/cpp/providers/orca_mqpu.cpp"
490+
cpp_tests="docs/sphinx/targets/cpp/orca.cpp docs/sphinx/targets/cpp/orca_mqpu.cpp"
491491
for filename in $cpp_tests; do
492492
[ -e "$filename" ] || echo "::error::Couldn't find file ($filename)"
493493
nvq++ --target orca --orca-url $ORCA_ACCESS_URL $filename
@@ -506,7 +506,7 @@ jobs:
506506
test_err_sum=$((test_err_sum+1))
507507
fi
508508
done
509-
python_tests="docs/sphinx/examples/python/providers/orca.py docs/sphinx/examples/python/providers/orca_mqpu.py"
509+
python_tests="docs/sphinx/targets/python/orca.py docs/sphinx/targets/python/orca_mqpu.py"
510510
for filename in $python_tests; do
511511
[ -e "$filename" ] || echo "::error::Couldn't find file ($filename)"
512512
python3 $filename 1> /dev/null
@@ -633,7 +633,7 @@ jobs:
633633
done
634634
635635
# Test C++ examples with NVQC
636-
for filename in `find examples/cpp/ -name '*.cpp'`; do
636+
for filename in `find examples/cpp/ applications/cpp/ targets/cpp/ -name '*.cpp'`; do
637637
if [[ "$filename" == *"nvqc"* ]]; then
638638
echo "$filename"
639639
nvqc_config=""
@@ -669,7 +669,7 @@ jobs:
669669
670670
# Test NVQC Python examples + Python MLIR execution tests (not IR tests)
671671
python3 -m pip install pytest
672-
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
672+
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
673673
filename=$(basename -- "$ex")
674674
filename="${filename%.*}"
675675
echo "Testing $filename:"
@@ -786,7 +786,7 @@ jobs:
786786
set +e # Allow script to keep going through errors
787787
python$python_version -m pip install pytest
788788
test_err_sum=0
789-
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
789+
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
790790
filename=$(basename -- "$ex")
791791
filename="${filename%.*}"
792792
echo "Testing $filename:"

.github/workflows/nvqc_regression_tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
done
155155
156156
# Test C++ examples with NVQC
157-
for filename in `find examples/cpp/ -name '*.cpp'`; do
157+
for filename in `find examples/cpp/ applications/cpp/ targets/cpp/ -name '*.cpp'`; do
158158
if [[ "$filename" == *"nvqc"* ]]; then
159159
echo "$filename"
160160
nvqc_config=""
@@ -190,7 +190,7 @@ jobs:
190190
191191
# Test NVQC Python examples + Python MLIR execution tests (not IR tests)
192192
python3 -m pip install pytest
193-
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
193+
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
194194
filename=$(basename -- "$ex")
195195
filename="${filename%.*}"
196196
echo "Testing $filename:"
@@ -304,7 +304,7 @@ jobs:
304304
set +e # Allow script to keep going through errors
305305
python$python_version -m pip install pytest
306306
test_err_sum=0
307-
for ex in `find examples/python python/tests/mlir/target -name '*.py' -not -path '*/python/tutorials/*'`; do
307+
for ex in `find examples/python python/tests/mlir/target -name '*.py'; do
308308
filename=$(basename -- "$ex")
309309
filename="${filename%.*}"
310310
echo "Testing $filename:"

.github/workflows/publishing.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ jobs:
791791
run: |
792792
chmod +x /tmp/install/install_cuda_quantum.*
793793
/tmp/install/install_cuda_quantum.* --accept
794-
rm -rf examples && mv docs/sphinx/examples examples && rm -rf examples/python
794+
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
795795
796796
GITHUB_STEP_SUMMARY=$GITHUB_STEP_SUMMARY \
797797
bash -l scripts/validate_container.sh | tee /tmp/validation.out
@@ -837,6 +837,8 @@ jobs:
837837
# Setup links for validate_wheel.sh script
838838
ln -s $GITHUB_WORKSPACE/scripts/validate_wheel.sh .
839839
ln -s $GITHUB_WORKSPACE/docs/sphinx/examples/python /tmp/examples
840+
ln -s $GITHUB_WORKSPACE/docs/sphinx/applications/python /tmp/applications
841+
ln -s $GITHUB_WORKSPACE/docs/sphinx/targets/python /tmp/targets
840842
ln -s $GITHUB_WORKSPACE/docs/sphinx/snippets/python /tmp/snippets
841843
ln -s $GITHUB_WORKSPACE/python/tests /tmp/tests
842844
ln -s $GITHUB_WORKSPACE/python/README.md .
@@ -943,7 +945,7 @@ jobs:
943945
fi; \
944946
done`
945947
946-
rm -rf examples && mv github-repo/docs/sphinx/examples examples
948+
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
947949
mv github-repo/docs/notebook_validation.py .
948950
GITHUB_STEP_SUMMARY=$GITHUB_STEP_SUMMARY \
949951
bash github-repo/scripts/validate_container.sh $backends_to_test | tee /tmp/validation.out

.github/workflows/python_wheels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ jobs:
316316
docker run --rm -dit --name wheel-validation-examples wheel_validation:local
317317
status_sum=0
318318
319-
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
319+
for ex in `find docs/sphinx/examples/python -name '*.py' -not -path '*/building_kernels.py'`; do
320320
file="${ex#docs/sphinx/examples/python/}"
321321
echo "__Example ${file}:__" >> /tmp/validation.out
322322
(docker exec wheel-validation-examples bash -c "python${{ inputs.python_version }} /tmp/examples/$file" >> /tmp/validation.out) && success=true || success=false

.github/workflows/repo_checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
8686
create_output cxx '*.cpp *.h *.hpp :!:test :!:targettests :!:tpls :!:**/nlopt-src/*'
8787
create_output cxx_headers '*.h *.hpp :!:test :!:targettests :!:tpls :!:**/nlopt-src/*'
88-
create_output cxx_examples 'docs/sphinx/examples/**/*.cpp'
88+
create_output cxx_examples 'docs/sphinx/examples/**/*.cpp' 'docs/sphinx/applications/cpp/*.cpp' 'docs/sphinx/targets/cpp/*.cpp'
8989
create_output python '*.py :!:python/tests :!:test :!:targettests :!:tpls :!:docs/sphinx/conf.py'
9090
create_output markdown '*.md :!:tpls'
9191
create_output rst '*.rst :!:tpls :!:docs/sphinx/_templates/**/*.rst'

.licenserc.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ header:
3232
- 'examples'
3333
- 'tpls'
3434
- 'docs/sphinx/**/*.html'
35+
- 'docs/sphinx/applications'
3536
- 'docs/sphinx/examples'
37+
- 'docs/sphinx/targets'
3638
- 'docs/sphinx/_templates'
3739
- 'docs/sphinx/_static/cuda_quantum_icon.svg'
3840
- 'docker/test/installer/mpi_cuda_check.cpp'

Developing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,26 @@ line printed when you build the code and run an example using the command
2828

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

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

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

4242
```bash
43-
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/examples/cpp/algorithms/grover.cpp
43+
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/applications/cpp/grover.cpp
4444
```
4545

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

4949
```bash
50-
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/examples/cpp/algorithms/grover.cpp |
50+
cudaq-quake $CUDAQ_REPO_ROOT/docs/sphinx/applications/cpp/grover.cpp |
5151
cudaq-opt --canonicalize --add-dealloc |
5252
quake-translate --convert-to=qir
5353
```

docker/build/assets.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ FROM prereqs AS cpp_build
9292
ADD "cmake" /cuda-quantum/cmake
9393
ADD "docs/CMakeLists.txt" /cuda-quantum/docs/CMakeLists.txt
9494
ADD "docs/sphinx/examples" /cuda-quantum/docs/sphinx/examples
95+
ADD "docs/sphinx/applications" /cuda-quantum/docs/sphinx/applications
96+
ADD "docs/sphinx/targets" /cuda-quantum/docs/sphinx/targets
9597
ADD "docs/sphinx/snippets" /cuda-quantum/docs/sphinx/snippets
9698
ADD "include" /cuda-quantum/include
9799
ADD "lib" /cuda-quantum/lib

docker/release/cudaq.Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ RUN adduser --disabled-password --gecos '' cudaq && adduser cudaq sudo \
117117
ENV PATH="$PATH:/home/cudaq/.local/bin"
118118

119119
ADD ./docs/sphinx/examples/ /home/cudaq/examples/
120+
ADD ./docs/sphinx/applications/ /home/cudaq/applications/
121+
ADD ./docs/sphinx/targets/ /home/cudaq/targets/
120122
ADD ./docker/release/README.md /home/cudaq/README.md
121-
RUN mv /home/cudaq/examples/python/tutorials /home/cudaq/tutorials \
122-
&& chown -R cudaq /home/cudaq && chgrp -R cudaq /home/cudaq
123+
RUN chown -R cudaq /home/cudaq && chgrp -R cudaq /home/cudaq
123124

124125
USER cudaq
125126
WORKDIR /home/cudaq

docker/test/installer/linux.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ ADD scripts/validate_container.sh /home/cudaq/validate.sh
7575
ADD scripts/configure_build.sh /home/cudaq/configure_build.sh
7676
ADD docker/test/installer/mpi_cuda_check.cpp /home/cudaq/mpi_cuda_check.cpp
7777
ADD docs/sphinx/examples/cpp /home/cudaq/examples
78+
ADD docs/sphinx/applications/cpp /home/cudaq/applications
79+
ADD docs/sphinx/targets/cpp /home/cudaq/targets
7880

7981
# Wheel to check side-by-side installation of Python and C++ support
8082
ARG cuda_quantum_wheel='cuda_quantum_*.whl'

docker/test/wheels/debian.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ ARG optional_dependencies=
3131
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
3232
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
3333
COPY docs/sphinx/examples/python /tmp/examples/
34+
COPY docs/sphinx/applications/python /tmp/applications/
35+
COPY docs/sphinx/targets/python /tmp/targets/
3436
COPY docs/sphinx/snippets/python /tmp/snippets/
3537
COPY python/tests /tmp/tests/
3638
COPY python/README.md /tmp/README.md

docker/test/wheels/fedora.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ ARG optional_dependencies=
2929
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
3030
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
3131
COPY docs/sphinx/examples/python /tmp/examples/
32+
COPY docs/sphinx/applications/python /tmp/applications/
33+
COPY docs/sphinx/targets/python /tmp/targets/
3234
COPY docs/sphinx/snippets/python /tmp/snippets/
3335
COPY python/tests /tmp/tests/
3436
COPY python/README.md /tmp/README.md

docker/test/wheels/opensuse.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ ARG optional_dependencies=
2626
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp39-cp39-manylinux_2_28_x86_64.whl
2727
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
2828
COPY docs/sphinx/examples/python /tmp/examples/
29+
COPY docs/sphinx/applications/python /tmp/applications/
30+
COPY docs/sphinx/targets/python /tmp/targets/
2931
COPY docs/sphinx/snippets/python /tmp/snippets/
3032
COPY python/tests /tmp/tests/
3133
COPY python/README.md /tmp/README.md

docker/test/wheels/redhat.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ ARG optional_dependencies=
2525
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
2626
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
2727
COPY docs/sphinx/examples/python /tmp/examples/
28+
COPY docs/sphinx/applications/python /tmp/applications/
29+
COPY docs/sphinx/targets/python /tmp/targets/
2830
COPY docs/sphinx/snippets/python /tmp/snippets/
2931
COPY python/tests /tmp/tests/
3032
COPY python/README.md /tmp/README.md

docker/test/wheels/ubuntu.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ ARG optional_dependencies=
2424
ARG cuda_quantum_wheel=cuda_quantum-0.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
2525
COPY $cuda_quantum_wheel /tmp/$cuda_quantum_wheel
2626
COPY docs/sphinx/examples/python /tmp/examples/
27+
COPY docs/sphinx/applications/python /tmp/applications/
28+
COPY docs/sphinx/targets/python /tmp/targets/
2729
COPY docs/sphinx/snippets/python /tmp/snippets/
2830
COPY python/tests /tmp/tests/
2931
COPY python/README.md /tmp/README.md

docs/CMakeLists.txt

+21-32
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Add nvq++ compile + execution test of code examples
1010
# Args:
1111
# TEST_NAME: name of the test executable. Test name is prefixed with "nvqpp"
12-
# SOURCE_LOCATION: location of the source file (relative to 'sphinx/examples/cpp' directory by default)
12+
# SOURCE_LOCATION: location of the source file (relative to 'sphinx' directory by default)
1313
# Optional keyword args:
1414
# TARGET <TARGET_NAME>: name of the target to use
1515
# TARGET_OPTION <Option>: extra option for the target
@@ -25,7 +25,7 @@ function(add_nvqpp_test TEST_NAME SOURCE_LOCATION)
2525
endif()
2626
endif()
2727
if (NOT PARSED_ARGS_SOURCE_DIR)
28-
set(PARSED_ARGS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sphinx/examples/cpp")
28+
set(PARSED_ARGS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sphinx")
2929
endif()
3030
add_test(
3131
NAME
@@ -39,26 +39,26 @@ function(add_nvqpp_test TEST_NAME SOURCE_LOCATION)
3939
endif()
4040
endfunction()
4141

42-
add_nvqpp_test(GHZ basics/static_kernel.cpp)
43-
add_nvqpp_test(MultiControlOps basics/multi_controlled_operations.cpp)
44-
add_nvqpp_test(ExpVals basics/expectation_values.cpp)
45-
add_nvqpp_test(MidCircuitMeasurements basics/mid_circuit_measurement.cpp)
46-
add_nvqpp_test(PhaseEstimation algorithms/phase_estimation.cpp)
47-
add_nvqpp_test(Grover algorithms/grover.cpp)
48-
add_nvqpp_test(QAOA algorithms/qaoa_maxcut.cpp)
49-
add_nvqpp_test(VQEH2 algorithms/vqe_h2.cpp)
50-
add_nvqpp_test(AmplitudeEstimation algorithms/amplitude_estimation.cpp)
51-
add_nvqpp_test(Builder other/builder/builder.cpp)
52-
add_nvqpp_test(QAOABuilder other/builder/qaoa_maxcut_builder.cpp)
53-
add_nvqpp_test(VQEH2Builder other/builder/vqe_h2_builder.cpp)
54-
add_nvqpp_test(ComputeAction other/compute_actions.cpp)
55-
add_nvqpp_test(Gradients other/gradients.cpp)
56-
add_nvqpp_test(IterativePhaseEstimation other/iterative_qpe.cpp)
57-
add_nvqpp_test(RandomWalkPhaseEstimation other/random_walk_qpe.cpp)
42+
add_nvqpp_test(GHZ examples/cpp/basics/static_kernel.cpp)
43+
add_nvqpp_test(MultiControlOps examples/cpp/basics/multi_controlled_operations.cpp)
44+
add_nvqpp_test(ExpVals examples/cpp/basics/expectation_values.cpp)
45+
add_nvqpp_test(MidCircuitMeasurements examples/cpp/basics/mid_circuit_measurement.cpp)
46+
add_nvqpp_test(PhaseEstimation applications/cpp/phase_estimation.cpp)
47+
add_nvqpp_test(Grover applications/cpp/grover.cpp)
48+
add_nvqpp_test(QAOA applications/cpp/qaoa_maxcut.cpp)
49+
add_nvqpp_test(VQEH2 applications/cpp/vqe_h2.cpp)
50+
add_nvqpp_test(AmplitudeEstimation applications/cpp/amplitude_estimation.cpp)
51+
add_nvqpp_test(Builder examples/cpp/other/builder/builder.cpp)
52+
add_nvqpp_test(QAOABuilder examples/cpp/other/builder/qaoa_maxcut_builder.cpp)
53+
add_nvqpp_test(VQEH2Builder examples/cpp/other/builder/vqe_h2_builder.cpp)
54+
add_nvqpp_test(ComputeAction examples/cpp/other/compute_actions.cpp)
55+
add_nvqpp_test(Gradients examples/cpp/other/gradients.cpp)
56+
add_nvqpp_test(IterativePhaseEstimation applications/cpp/iterative_qpe.cpp)
57+
add_nvqpp_test(RandomWalkPhaseEstimation applications/cpp/random_walk_qpe.cpp)
5858

5959
if (CUSTATEVEC_ROOT AND CUDA_FOUND)
60-
add_nvqpp_test(CuQuantumGHZ basics/cuquantum_backends.cpp TARGET nvidia LABELS gpu_required)
61-
add_nvqpp_test(CuQuantumBernsteinVazirani algorithms/bernstein_vazirani.cpp TARGET nvidia LABELS gpu_required)
60+
add_nvqpp_test(CuQuantumGHZ examples/cpp/basics/cuquantum_backends.cpp TARGET nvidia LABELS gpu_required)
61+
add_nvqpp_test(CuQuantumBernsteinVazirani applications/cpp/bernstein_vazirani.cpp TARGET nvidia LABELS gpu_required)
6262
endif()
6363

6464
# code snippets in docs
@@ -103,7 +103,7 @@ if (CUSTATEVEC_ROOT AND CUDA_FOUND)
103103
endif()
104104
endif()
105105

106-
add_nvqpp_test(photonics_sim providers/photonics.cpp TARGET photonics)
106+
add_nvqpp_test(photonics_sim targets/cpp/photonics.cpp TARGET photonics)
107107
add_nvqpp_test(SampleAsyncRemote using/cudaq/platform/sample_async_remote.cpp TARGET remote-mqpu SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/cpp)
108108
set_tests_properties(
109109
nvqpp_SampleAsyncRemote
@@ -131,18 +131,7 @@ if (CUDAQ_ENABLE_PYTHON)
131131
endfunction()
132132

133133
add_pycudaq_test(Intro intro.py)
134-
add_pycudaq_test(BernsteinVazirani bernstein_vazirani.py)
135-
add_pycudaq_test(QAOA qaoa_maxcut.py)
136-
add_pycudaq_test(VQE simple_vqe.py)
137-
add_pycudaq_test(VQEAdvanced advanced_vqe.py)
138134

139-
add_pycudaq_test(AmplitudeDampingNoise noise_amplitude_damping.py)
140-
add_pycudaq_test(BitFlipNoise noise_bit_flip.py)
141-
add_pycudaq_test(DepolarizingNoise noise_depolarization.py)
142-
add_pycudaq_test(PhaseFlipNoise noise_phase_flip.py)
143-
add_pycudaq_test(KrausNoise noise_kraus_operator.py)
144-
add_pycudaq_test(NoiseCallback noise_callback.py)
145-
146135
if (CUTENSORNET_ROOT AND CUDA_FOUND)
147136
# This example uses tensornet backend.
148137
add_pycudaq_test(SampleAsyncRemote using/cudaq/platform/sample_async_remote.py SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/python)

0 commit comments

Comments
 (0)