-
Notifications
You must be signed in to change notification settings - Fork 208
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
First pass of support for C++ operators #2511
Open
anthony-santana
wants to merge
111
commits into
NVIDIA:experimental/operators
Choose a base branch
from
sacpis:dynamics_cpp_operators
base: experimental/operators
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
First pass of support for C++ operators #2511
anthony-santana
wants to merge
111
commits into
NVIDIA:experimental/operators
from
sacpis:dynamics_cpp_operators
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR fixes an LLVM discrepancy in our Docker images vs our Python wheels. This should fix NVIDIA#1421 and NVIDIA#1799 for our Python wheels. (The Docker images were already correct.)
* Docs for trajectory simulation Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Fix spelling and code format Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Update mgpu hash: include fixes for 2434 Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Update docs/sphinx/snippets/cpp/using/backends/trajectory.cpp Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Signed-off-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com> * Update docs/sphinx/snippets/cpp/using/backends/trajectory.cpp Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Signed-off-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com> * Update docs/sphinx/snippets/cpp/using/backends/trajectory_observe.cpp Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Signed-off-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com> * Update docs/sphinx/snippets/cpp/using/backends/trajectory_observe.cpp Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Signed-off-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com> * Update python/cudaq/runtime/observe.py Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Signed-off-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com> --------- Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> Signed-off-by: Thien Nguyen <58006629+1tnguyen@users.noreply.github.com> Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
For small controlled ops, i.e., singly controlled, expand the gate matrix and use cutensornetStateApplyTensorOperator. Add CUDAQ_TENSORNET_CONTROLLED_RANK threshold to determine when cutensornetStateApplyControlledTensorOperator is used. For MPS, this is fixed at 1 as it cannot handle gate ops with more than 2 qubits. Add doc for the setting and also remove some stale notes about random seeds in the docs. Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
sacpis
approved these changes
Jan 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if all tests are running successfully.
sacpis
force-pushed
the
dynamics_cpp_operators
branch
from
January 16, 2025 22:10
2b42628
to
8150d70
Compare
sacpis
requested review from
1tnguyen,
bmhowe23 and
schweitzpgi
as code owners
January 16, 2025 22:10
…de (NVIDIA#2516) * Fix a bug in default init of scratchpad: it must allocate memory after we've set the device Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add test Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add a check to prevent multiple allocate calls Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> --------- Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
…#2519) Signed-off-by: Ben Howe <bhowe@nvidia.com>
sacpis
force-pushed
the
dynamics_cpp_operators
branch
from
January 21, 2025 17:11
752fed1
to
d55814d
Compare
* Fix the behavior of `quera` backend with C++ frontend by showing appropriate error message. (Behavior prior to this change - default simulator was invoked) * Tell nvq++ to generate glue for `quera` * Simplify libraries - combine 'libcudaq-quera-qpu.so' and 'libcudaq-serverhelper-quera.so' into one. Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
Changes: - cuda-quantum/cuquantum-mgpu!36: fix a bug in trajectory simulation - cuda-quantum/cuquantum-mgpu!37: fix a bug in applyExpPauli: invalid value errors when the pauli word is acting on a subset of qubits. Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
sacpis
force-pushed
the
dynamics_cpp_operators
branch
from
January 23, 2025 17:42
0ebeed5
to
b592f8a
Compare
* Upgrading notebook version to 7.3.2 from 7.1.3 Signed-off-by: Sachin Pisal <spisal@nvidia.com> * updating jupyterlab version to 4.3.4 Signed-off-by: Sachin Pisal <spisal@nvidia.com> --------- Signed-off-by: Sachin Pisal <spisal@nvidia.com>
…n conditionally (NVIDIA#2532) Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
* [WIP] dynamics mgmn Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Fix a copy and paste error Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Handle initial state enum Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Update initial state enum example Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add uniform state init Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add uniform state init Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Update examples Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Code format Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Spelling Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add more MPI API to CUDAQ comm plugin interface Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Refactor for dependency isolation Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Code format Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * More isolation Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * connect cuda-q mpi plugin to cudensitymat Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Fix for CI Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Code format: python Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Support initial state enum for non-dynamics case and add test Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Code tidy up and add docs Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add MPI tests Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add a link to the example directory Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Fix a typo Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Address CR: docs and comments edits; refactor to reduce code duplicate Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> --------- Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
* Add non path reuse option Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Add docs and test Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> * Code review: add a note about observe with tensornet and update code comments Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> --------- Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
Signed-off-by: Ben Howe <bhowe@nvidia.com>
sacpis
force-pushed
the
dynamics_cpp_operators
branch
from
January 25, 2025 19:57
97bd0d6
to
3f00f9f
Compare
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
…)" (NVIDIA#2548) This reverts commit 5ee448d. Since nv-gha-runners/vm-images#113 has been merged, we can revert our temporary change. Signed-off-by: Ben Howe <bhowe@nvidia.com>
Signed-off-by: Ben Howe <bhowe@nvidia.com>
sacpis
force-pushed
the
dynamics_cpp_operators
branch
from
January 28, 2025 00:12
bbec3ed
to
5b14fad
Compare
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.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>
sacpis
force-pushed
the
dynamics_cpp_operators
branch
from
February 4, 2025 21:49
3e3909f
to
8c91e88
Compare
…sum in test_cudm_helpers Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is an initial commit to the experimental branch containing a first pass of work towards operator support in C++