Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Kokkos/sv gates #26

Merged
merged 9 commits into from
Aug 14, 2023
Merged

Kokkos/sv gates #26

merged 9 commits into from
Aug 14, 2023

Conversation

vincentmr
Copy link
Contributor

@vincentmr vincentmr commented Aug 8, 2023

In StateVectorKokkos, replace gates_ and generators_ attributes by maps generated from the base GateOperation and GeneratorOperation enums. This improves the readability of the main StateVectorKokkos constructor and removes about 700 lines of specialized methods.

@vincentmr vincentmr changed the base branch from main to feature/native_spmv August 8, 2023 13:45
@vincentmr vincentmr changed the base branch from feature/native_spmv to bugfix/multiqubitop August 8, 2023 13:46
@vincentmr vincentmr marked this pull request as ready for review August 8, 2023 14:05
@@ -75,7 +75,7 @@ TEMPLATE_TEST_CASE("StateVectorKokkos::applyHadamard",
SECTION("Apply directly") {
Copy link
Member

Choose a reason for hiding this comment

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

These are no longer falling under the Apply directly signature, since we dynamically look them up. Same with above changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, we can remove a lot of fat here.

Copy link
Member

Choose a reason for hiding this comment

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

Once all of these are updated to reflect that we no longer do direct applications, or the gate kernels are directly called in place, I am happy to accept.

Copy link
Collaborator

@AmintorDusko AmintorDusko left a comment

Choose a reason for hiding this comment

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

Good job here! Thank you for that.

@vincentmr vincentmr merged commit 768f66f into bugfix/multiqubitop Aug 14, 2023
41 checks passed
@vincentmr vincentmr deleted the kokkos/sv_gates branch August 14, 2023 19:24
vincentmr added a commit that referenced this pull request Aug 15, 2023
* Fix bug where functor attributes are used as local variables, causing issues in parallel for loop.

* Bring LKokkos AdjJac in line with LQubit's. (#27)

* Bring LKokkos AdjJac in line with LQubit's.

* Remove obsolete comment.

---------

Co-authored-by: Amintor Dusko <[email protected]>

* Kokkos/sv gates (#26)

* Replace gates_ in LKokkos.

* Replace generators_ attribute in LKokkos.

* Remove all (except multiRZ) specialized methods from SV-LKokkos.

* Refactor LKokkos C++ tests not to use specialized apply methods.

* Reorganize StateVectorKokkos.hpp. Use base class getNumQubits and getLength.

* Add docstring for gate registering methods and map => unordered_map.

* Remove duplicate/obsolete apply-directly tests.

* Use std::size_t in LKokkos files.

---------

Co-authored-by: Amintor Dusko <[email protected]>

* Modify multiQubitOp to handle device kernels correclty.

---------

Co-authored-by: Amintor Dusko <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants