This repository was archived by the owner on Dec 7, 2021. It is now read-only.
Adjust unit tests for symengine#1592
Merged
Merged
Conversation
woodsp-ibm
previously approved these changes
May 6, 2021
woodsp-ibm
approved these changes
May 6, 2021
manoelmarques
added a commit
to manoelmarques/qiskit-aqua
that referenced
this pull request
May 6, 2021
manoelmarques
added a commit
that referenced
this pull request
May 6, 2021
* Handle symengine based parameter expressions (#1586) * Handle symengine based parameter expressions In Qiskit/qiskit#6270 symengine is being added as an optional (but default on common platforms) backend for parameters and parameter expressions. However, the aqua version of the gradient code there is an implicit assumption that parameterexpressions are internally just wrappers of sympy expressions. This assumption about the internals of terra breaks with Qiskit/qiskit#6270 where they might be symengine or sympy expressions. While symengine and sympy expressions are interchangeable this can only be done with an explicit conversion step (for example, `sympy.sympify(symengine.Symbol('x'))`). This commit fixes this by updating the derivative base class as was done for terra's version in Qiskit/qiskit#6270 so that the deprecated aqua copy continues to work wither versions of terra after Qiskit/qiskit#6270 merges. * fix lint * Check for existence of symengine handling in Terra Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com> * Adjust unit tests for symengine (#1592) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Once symengine was enabled in Terra, the migrated unit tests were changed there: Qiskit/qiskit#6270
Details and comments