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

Update gradient logic for Qiskit Rust circuit data implementation (backport #188) #198

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 9, 2024

Summary

Fixes #181

This updates internals of the gradients which more directly manipulated circuit data the way it was when it was managed in Python. The Rust implementation is changing things to be more performant but things are also different so this changes the logic to try accommodate as things are currently done, which is what is in Qiskit stable releases at present, and the new Rust implementation which is presently in main branch of Qsikit repo. #181 notes the aspect of CI which is failing is when we test against main which was done to monitor for any problems here due to changes.

This has partially fixed things but there is another aspect, that I failed to notice/note in #181 that also occurs

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/circuit/parameterexpression.py", line 418, in __float__
    raise TypeError(

    TypeError: ParameterExpression with unbound parameters (dict_keys([Parameter(__gθ0)])) cannot be cast to a float.

which has not been addressed at present.

Details and comments


This is an automatic backport of pull request #188 done by [Mergify](https://mergify.com).

Co-authored-by: Julien Gacon <jules.gacon@googlemail.com>
(cherry picked from commit 23f3b85)
@mergify mergify bot requested review from Cryoris, woodsp-ibm and ElePT as code owners August 9, 2024 12:15
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10319035735

Details

  • 20 of 23 (86.96%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 90.485%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_algorithms/gradients/reverse/derive_circuit.py 16 19 84.21%
Totals Coverage Status
Change from base Build 10020949524: 0.02%
Covered Lines: 6362
Relevant Lines: 7031

💛 - Coveralls

@mergify mergify bot merged commit de6a85e into stable/0.3 Aug 9, 2024
19 checks passed
@mergify mergify bot deleted the mergify/bp/stable/0.3/pr-188 branch August 9, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants