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

[BUG FIX] Add support for adjoint operations in default.qutrit #4348

Merged
merged 8 commits into from
Jul 12, 2023

Conversation

mudit2812
Copy link
Contributor

Context:
Many non-parametric qutrit operations don't have available adjoints in PennyLane, because of which using qml.adjoint with these operations was not working with DefaultQutrit.

Description of the Change:

  • Added Adjoint(op) to list of supported operations in DefaultQutritfor non-parametric qutrit operations.

Benefits:
Adjoint operations work correctly on DefaultQutrit.

Possible Drawbacks:

Related GitHub Issues:
#4347

@mudit2812 mudit2812 requested a review from a team July 11, 2023 15:01
@mudit2812
Copy link
Contributor Author

[sc-41682]

@mudit2812 mudit2812 changed the title Add support for adjoint operations in default.qutrit [BUG FIX] Add support for adjoint operations in default.qutrit Jul 11, 2023
@Gabriel-Bottrill
Copy link
Contributor

Gabriel-Bottrill commented Jul 12, 2023

I tested the changes where I originally found the issue and this PR has fixed what I originally encountered.

Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

could you add an integration test that shows the case from the original bug report to prove with certainty that it works (with a default.qutrit qnode)? otherwise lgtm!

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
Co-authored-by: Matthew Silverman <matthews@xanadu.ai>
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #4348 (d3b798a) into master (18d508a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4348   +/-   ##
=======================================
  Coverage   99.79%   99.79%           
=======================================
  Files         351      351           
  Lines       32109    32112    +3     
=======================================
+ Hits        32042    32045    +3     
  Misses         67       67           
Impacted Files Coverage Δ
pennylane/devices/default_qutrit.py 100.00% <100.00%> (ø)

@mudit2812 mudit2812 requested a review from timmysilv July 12, 2023 16:13
Copy link
Contributor

@lillian542 lillian542 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 :)

@mudit2812 mudit2812 merged commit 712f99c into master Jul 12, 2023
43 checks passed
@mudit2812 mudit2812 deleted the qutrit-adjoint branch July 12, 2023 19:15
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.

None yet

4 participants