Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Fix the issue with linking against both Lightning-Kokkos and Lightning #49

Merged
merged 20 commits into from
Apr 27, 2023

Conversation

maliasadi
Copy link
Member

@maliasadi maliasadi commented Apr 11, 2023

Currently, we cannot build and link both Lightning and Lightning-Kokkos in a single translation unit due to conflicts in the name of files, functions, classes, and namespaces. This PR addresses this issue. A direct use case of this patch would be in getting support for both lightning.qubit and lightning.kokkos simulators in Catalyst.

[sc-37004]

Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

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

Looks good to me. I have a few questions, essentially about formatting. I'm guessing that Kokkos:: was replaced by ::Kokkos:: with sed or a similar command without much discrimination. I'm wondering if any issue could arise from that in the long run, or if it shows poor style (e.g. in the docstrings). I'd be OK merging as is, but I wonder what are people's thoughts.

pennylane_lightning_kokkos/src/bindings/Bindings.cpp Outdated Show resolved Hide resolved
pennylane_lightning_kokkos/src/simulator/GateFunctors.hpp Outdated Show resolved Hide resolved
@maliasadi maliasadi changed the base branch from main to v0.30.0_rc April 26, 2023 18:24
@maliasadi
Copy link
Member Author

Note
Those broken Python tests aren't related to the changes in this PR and they'll be fixed in PR #60.

Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

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

Nice work @maliasadi! Thanks for putting this together!

…ng-kokkos into multidev/fix_buildw_lightning_new
Copy link
Contributor

@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.

Thank you, @maliasadi. On a curious note, changing ::Kokkos back to Kokkos decreased the changes introduced by this PR from +1180 -1116 to +176 -145. A reduction of more than one thousand lines. 😱

@mlxd mlxd merged commit 8d20ea4 into v0.30.0_rc Apr 27, 2023
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.

5 participants