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

Support controlled-SWAP's in kernel builder #924

Merged
merged 10 commits into from
Dec 18, 2023

Conversation

anthony-santana
Copy link
Collaborator

@anthony-santana anthony-santana commented Nov 14, 2023

Description

Does the glue work for #918 to perform controlled SWAP's from the python and C++ builder.

  • Adds new cudaq::ctrl overloads to the SWAP operation in the C++ builder
  • New overloads support the following as controls: vector of individual qubits, qubit register, variadic arguments containing a mix of qubits/vecs
  • Writes new C++ builder tests for these SWAP functions
  • Binds the controlled SWAP gates to python as cswap
  • New compiler and unit tests for the python controlled SWAP's
  • Adds the python cswap gate to API documentation

Note: Ignore the random formatting changes to unrelated tests

Copy link

copy-pr-bot bot commented Nov 14, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Nov 15, 2023

/ok to test

Command Bot: Processing...

Copy link
Collaborator

@1tnguyen 1tnguyen left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Only a couple of nits.

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.

🚀

python/tests/compiler/ctrl_gates.py Outdated Show resolved Hide resolved
python/tests/unittests/test_kernel_builder.py Outdated Show resolved Hide resolved
runtime/cudaq/builder/kernel_builder.h Show resolved Hide resolved
runtime/cudaq/builder/kernel_builder.h Show resolved Hide resolved
runtime/cudaq/builder/kernel_builder.h Show resolved Hide resolved
@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Nov 16, 2023

/ok to test

Command Bot: Processing...

@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Nov 16, 2023

/ok to test

Command Bot: Processing...

1 similar comment
@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Nov 17, 2023

/ok to test

Command Bot: Processing...

@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Nov 30, 2023

/ok to test

Command Bot: Processing...

@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Dec 11, 2023

/ok to test

Command Bot: Processing...

@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Dec 18, 2023

/ok to test

Command Bot: Processing...

Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
Signed-off-by: A.M. Santana <anthonys@nvidia.com>
@anthony-santana
Copy link
Collaborator Author

anthony-santana commented Dec 18, 2023

/ok to test

Command Bot: Processing...

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 Dec 18, 2023
@anthony-santana anthony-santana merged commit 4de1441 into NVIDIA:main Dec 18, 2023
108 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2023
@bettinaheim bettinaheim added this to the release 0.6.0 milestone Jan 22, 2024
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Jan 22, 2024
@anthony-santana anthony-santana deleted the c_swap branch March 18, 2024 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release notes Changes need to be captured in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants