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

[bugfix] Make qml.equal work with qml.HilbertSchmidt #5538

Merged
merged 13 commits into from
Apr 22, 2024

Conversation

dwierichs
Copy link
Contributor

@dwierichs dwierichs commented Apr 18, 2024

Context:
qml.HilbertSchmidt has QuantumScript instances as hyperparameters, which are not compared correctly by the default Operator dispatch of qml.equal.

Description of the Change:
This PR adds a custom dispatch branch for qml.HilbertSchmidt to qml.equal, comparing the QuantumScript hyperparameters with additional qml.equal calls.

Benefits:
bug fix

Possible Drawbacks:

Related GitHub Issues:
fixes #5536

[sc-61589]
[sc-49174]

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.67%. Comparing base (d03216e) to head (3278c12).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #5538    +/-   ##
========================================
  Coverage   99.67%   99.67%            
========================================
  Files         407      407            
  Lines       38019    37750   -269     
========================================
- Hits        37895    37628   -267     
+ Misses        124      122     -2     

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

@trbromley trbromley added this to the v0.36 milestone Apr 19, 2024
pennylane/ops/functions/equal.py Show resolved Hide resolved
pennylane/ops/functions/equal.py Show resolved Hide resolved
tests/ops/functions/test_equal.py Show resolved Hide resolved
tests/ops/functions/test_equal.py Show resolved Hide resolved
tests/ops/functions/test_equal.py Show resolved Hide resolved
tests/ops/functions/test_equal.py Show resolved Hide resolved
tests/transforms/test_hamiltonian_expand.py Show resolved Hide resolved
@dwierichs dwierichs enabled auto-merge (squash) April 22, 2024 13:56
@dwierichs dwierichs merged commit e70a43f into master Apr 22, 2024
38 checks passed
@dwierichs dwierichs deleted the equal-hilbertschmidt branch April 22, 2024 14:22
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] qml.equal does not work with qml.HilbertSchmidt
4 participants