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

Expose SWAP gate to c++ and python builder #200

Merged
merged 9 commits into from
Jun 1, 2023

Conversation

anthony-santana
Copy link
Collaborator

@anthony-santana anthony-santana commented May 26, 2023

Description

Closes #199

Changes:

  • Connects the 2 qubit swap gate to builder API in C++ and python
  • Adds tests to NVQIRTester for swap gates and controlled-swap gates at the QIR level
  • Adds a set of tests to BuilderTester for swaps and controlled-swaps at builder level in C++
  • Adds a set of tests to python builder tester for swaps and controlled-swaps
  • Documents swap operations in python API docs

runtime/cudaq/builder/kernel_builder.cpp Outdated Show resolved Hide resolved
runtime/cudaq/builder/kernel_builder.cpp Outdated Show resolved Hide resolved
runtime/cudaq/builder/kernel_builder.h Outdated Show resolved Hide resolved
python/tests/unittests/test_SpinOperator.py Show resolved Hide resolved
python/tests/unittests/test_mqpu.py Show resolved Hide resolved
python/tests/unittests/test_observe.py Show resolved Hide resolved
python/tests/unittests/test_optimizer.py Show resolved Hide resolved
python/tests/unittests/test_sample.py Show resolved Hide resolved
python/tests/unittests/test_vqe.py Show resolved Hide resolved
unittests/integration/builder_tester.cpp Show resolved Hide resolved
unittests/qir/NVQIRTester.cpp Outdated Show resolved Hide resolved
unittests/qir/NVQIRTester.cpp Show resolved Hide resolved
@anthony-santana anthony-santana marked this pull request as ready for review May 30, 2023 23:12
@anthony-santana
Copy link
Collaborator Author

Relevant follow-up issues to this PR: #206 and #207

@anthony-santana anthony-santana force-pushed the add_swap_gate branch 3 times, most recently from a11be39 to cd5b418 Compare May 31, 2023 19:43
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.

LGTM. You'll probably want a 👍 from Alex as well.

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.

LGTM. You'll probably want a 👍 from Alex as well.

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 anthony-santana merged commit a543ae7 into NVIDIA:main Jun 1, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2023
@anthony-santana anthony-santana deleted the add_swap_gate branch June 14, 2023 17:21
@bettinaheim bettinaheim added the enhancement New feature or request label Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bind swap gate to C++ and Python kernel builder
4 participants