KEMBAR78
CPP examples by sacpis · Pull Request #2790 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@sacpis
Copy link
Collaborator

@sacpis sacpis commented Apr 8, 2025

Adding cpp examples for the corresponding Python examples in CUDA-Q documentation.

@sacpis sacpis requested a review from efratshabtai April 8, 2025 03:56
github-actions bot pushed a commit that referenced this pull request Apr 8, 2025
@github-actions
Copy link

github-actions bot commented Apr 8, 2025

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@sacpis sacpis changed the title Cpp examples CPP examples Apr 8, 2025
Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of non-words being added to the English dictionary file. We shouldn't be spelling checking code, URLs, writing acronyms in all lower case, etc. The fixes for these should be in the comments or files that are being spell checked and not adding the residuals to the dictionary.

github-actions bot pushed a commit that referenced this pull request Apr 8, 2025
@github-actions
Copy link

github-actions bot commented Apr 8, 2025

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@sacpis
Copy link
Collaborator Author

sacpis commented Apr 9, 2025

Thank you @schweitzpgi. Have removed those words from the allowed_list.

@github-actions
Copy link

github-actions bot commented Apr 9, 2025

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Apr 9, 2025
@sacpis sacpis requested a review from schweitzpgi April 9, 2025 15:02
@github-actions
Copy link

github-actions bot commented Apr 9, 2025

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Apr 9, 2025
github-actions bot pushed a commit that referenced this pull request Apr 9, 2025
@github-actions
Copy link

github-actions bot commented Apr 9, 2025

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Apr 15, 2025
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Apr 17, 2025
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Apr 17, 2025
github-actions bot pushed a commit that referenced this pull request Apr 17, 2025
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

sacpis added 2 commits July 12, 2025 15:24
…device_id

Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
github-actions bot pushed a commit that referenced this pull request Jul 13, 2025
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

1 similar comment
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Jul 13, 2025
sacpis added 8 commits July 13, 2025 17:10
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
github-actions bot pushed a commit that referenced this pull request Jul 14, 2025
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@sacpis sacpis enabled auto-merge (squash) July 15, 2025 03:14
@sacpis sacpis disabled auto-merge July 15, 2025 04:26
@sacpis sacpis enabled auto-merge (squash) July 15, 2025 04:27
github-actions bot pushed a commit that referenced this pull request Jul 15, 2025
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@sacpis sacpis merged commit 8184411 into NVIDIA:main Jul 15, 2025
199 of 200 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 15, 2025
@bettinaheim bettinaheim added the documentation Improvements or additions to documentation label Jul 22, 2025
@bettinaheim bettinaheim added this to the release 0.12.0 milestone Jul 22, 2025
Measuring Kernels <measuring_kernels.rst>
Visualizing Kernels <../../examples/python/visualization.ipynb>
Executing Kernels <../../examples/python/executing_kernels.ipynb>
Executing Kernels <executing_kernels.rst>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sacpis : Can you confirm that this was intentional?
It has overridden changes to https://github.com/NVIDIA/cuda-quantum/blob/main/docs/sphinx/examples/python/executing_kernels.ipynb from PR #3182

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @khalatepradnya , Yes it was intentional as the requirement was to provide examples (of executing_kernels) for both Python and CPP. When I worked on it last year, the application team wanted all examples to be of Python notebook type. So I had to convert executing_kernels.ipynb to executing_kernels.py at the time.

Wouldn't the above change only display python notebook in a tab? Would you please try to generate documentation locally?

Please let me know if you have any questions.

Copy link
Collaborator

@khalatepradnya khalatepradnya Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks!
See - #3268

atgeller pushed a commit to atgeller/cuda-quantum that referenced this pull request Jul 31, 2025
* Adding pauli_x_gate cpp snippet

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Fixing comments for pauli_x_gate

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding hadamard gate cpp example

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding cnot_gate cpp example

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding measuring_kernels example snippets

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding executing_kernels for Python

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Updating executing_kernels with cpp tab

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding operators cpp examples

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* sorting and formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Fixing spelling

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding building kernel examples

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Formatting, removing multi control synthesis

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Removing spellings

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Making parallization techniques part of executing kernels

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Cleaning up multi_controlled_operations

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* fixing broken link

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Fixing redifinition of kernel

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Fixing cudaq::complex type and specifying type specifier

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* minor fixes

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* uncomment the qubit kernel

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Removing print statements

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* fix for measure

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Fixing operators

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* fixing vector values

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding a new kernel

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Removing passing vector as a paramter to qubit due to a bug in python bridge

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Excluding executing_kernels.cpp

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* correcting exclusion criteria

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* fixing spelling

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Update docs/sphinx/using/examples/operators.rst

Co-authored-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Update docs/sphinx/using/examples/measuring_kernels.rst

Co-authored-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* fix for measure kernel

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* implementing feedback received

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Fixing parameters

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Excluding executing_kernels test in absence of a remote server process

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* fixing bracket

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding missing bracket

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* removing executing_kernels from the skip list

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Adding descriptive message for debugging

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Check for device_id only if there are non-zero qpus available

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* num of qpus should be greater than 0 in order to compare it with the device_id

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* checking nums of qpus directly with the device id

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* separating cpp examples

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* escaping words

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* escape words

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* Setting precision in output format

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

---------

Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Co-authored-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants