Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Adjust unit tests for symengine#1592

Merged
manoelmarques merged 1 commit into
qiskit-community:mainfrom
manoelmarques:sym
May 6, 2021
Merged

Adjust unit tests for symengine#1592
manoelmarques merged 1 commit into
qiskit-community:mainfrom
manoelmarques:sym

Conversation

@manoelmarques
Copy link
Copy Markdown
Collaborator

Summary

Once symengine was enabled in Terra, the migrated unit tests were changed there: Qiskit/qiskit#6270

Details and comments

@manoelmarques manoelmarques requested a review from woodsp-ibm May 6, 2021 13:58
@manoelmarques manoelmarques self-assigned this May 6, 2021
@manoelmarques manoelmarques requested a review from levbishop as a code owner May 6, 2021 13:58
woodsp-ibm
woodsp-ibm previously approved these changes May 6, 2021
@manoelmarques manoelmarques merged commit fcc73ed into qiskit-community:main May 6, 2021
@manoelmarques manoelmarques deleted the sym branch May 6, 2021 15:46
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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants