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 qml.Controlled.has_sparse_matrix #7025

Merged
merged 4 commits into from
Feb 28, 2025
Merged

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Feb 28, 2025

Context:

Controlled.has_sparse_matrix was always true

Description of the Change:

Fix Controlled.has_sparse_matrix.

Benefits:'

Controlled.has_sparse_matrix is accurate.

Unblock #6883

Possible Drawbacks:

Related GitHub Issues:

Fixes #7024 [sc-85452]

@albi3ro albi3ro requested a review from JerryChen97 February 28, 2025 16:44
@albi3ro albi3ro changed the title fix Controlled.sparse_matrix fix Controlled.has_sparse_matrix Feb 28, 2025
@albi3ro albi3ro requested a review from andrijapau February 28, 2025 16:51
Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

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

LGTM! 🙂 🚀

@andrijapau andrijapau changed the title fix Controlled.has_sparse_matrix fix qml.Controlled.has_sparse_matrix Feb 28, 2025
@JerryChen97
Copy link
Contributor

Still wondering why was it alwasy true before?....

@albi3ro
Copy link
Contributor Author

albi3ro commented Feb 28, 2025

Still wondering why was it alwasy true before?....

The sparse_matrix method was overwritten.

Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

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

Thanks a lot! LGTM

@albi3ro albi3ro enabled auto-merge (squash) February 28, 2025 16:58
@albi3ro albi3ro merged commit deaf390 into master Feb 28, 2025
46 checks passed
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.60%. Comparing base (9260c26) to head (82b324c).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7025   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files         484      484           
  Lines       46249    46252    +3     
=======================================
+ Hits        46065    46068    +3     
  Misses        184      184           

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

@albi3ro albi3ro deleted the fix-controlled-has-sparse-mat branch February 28, 2025 17:21
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.

[BUG] Controlled.has_sparse_matrix is incorrect for ops without matrices or sparse matrices
3 participants