-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure
TemplateOptimization
returns native-symbolic objects (#11107)
`TemplateOptimization` currently uses Sympy internally to get access to solvers that have no equivalent in Symengine. Previously, it then did not convert the solutions to its equations back into Symengine format (if appropriate) before passing them on to `ParameterExpression`, which could lead to different assumptions about the type of the contained objects and bugs if `ParameterExpression` attempted to use Symengine-specific forms of methods on Sympy objects.
- Loading branch information
1 parent
7e73fcf
commit a29d73f
Showing
3 changed files
with
67 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/template-match-symbols-c00786155f101e39.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
fixes: | ||
- | | ||
The :class:`.TemplateOptimization` pass will now return parametric expressions using the native | ||
symbolic expression format of :class:`.ParameterExpression`, rather than always using Sympy. | ||
For most supported platforms, this means that the expressions will be Symengine objects. | ||
Previously, the pass could return mismatched objects, which could lead to later failures in | ||
parameter-handling code. |
This file contains 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