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

Fix the issue with assigning kernels to ops before registering kernels on macOS #582

Merged
merged 4 commits into from
Jan 2, 2024

Conversation

maliasadi
Copy link
Member

@maliasadi maliasadi commented Dec 20, 2023

The addition of arbitrary controlled operations in lightning.qubit (PR #516) breaks the use of the lightning.qubit C++ API in Catalyst on macOS. This PR fixes the following issue:

libc++abi: terminating due to uncaught exception of type Pennylane::Util::LightningException: [./catalyst/runtime/build/_deps/pennylane_lightning-src/pennylane_lightning/core/src/simulators/lightning_qubit/gates/KernelMap.hpp][Line:326][Method:assignKernelForOp]: Error in PennyLane Lightning: The given kernel is not registered.
Fatal Python error: Aborted

Fixes #583

[sc-52500]

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8101e42) 98.94% compared to head (137777c) 98.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #582      +/-   ##
==========================================
- Coverage   98.94%   98.68%   -0.27%     
==========================================
  Files         167      167              
  Lines       24527    23959     -568     
==========================================
- Hits        24269    23644     -625     
- Misses        258      315      +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maliasadi maliasadi requested review from josh146, dime10, rmoyard and a team December 21, 2023 14:05
maliasadi added a commit to PennyLaneAI/catalyst that referenced this pull request Dec 21, 2023
Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

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

Thanks for the find @maliasadi

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.

Looks good to me! Thanks @maliasadi !

@maliasadi maliasadi merged commit 489cff7 into master Jan 2, 2024
82 of 83 checks passed
@maliasadi maliasadi deleted the maa/fix-unregistered-kernel-issue-mac branch January 2, 2024 15:40
@maliasadi maliasadi restored the maa/fix-unregistered-kernel-issue-mac branch January 2, 2024 16:46
dime10 pushed a commit to PennyLaneAI/catalyst that referenced this pull request Jan 2, 2024
Update Lightning tags to
PennyLaneAI/pennylane-lightning@489cff7
as the fix PennyLaneAI/pennylane-lightning#582
is now merged into the master branch.

PS. This is related to the "temporary" fix in
#412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Method:assignKernelForOp]: The given kernel is not registered on macOS using the C++ StateVectorLQubit API
3 participants