-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add implicit cast of argument types (#1770)
* Add implicit cast of argument types Since 0.12.0, AerConfig is used to configure simulation, which is directly bound to a AER::Config object through pybind. This change requires application to specify strictly correct types of configuration options. This commit allows implicit casting to arguments if application specifies them with wrong types. This commit resolves #1754. * does not warning in cast of numpy classes if they are compatible with expected type * fix lint issue * simplify class checking
- Loading branch information
Showing
3 changed files
with
145 additions
and
0 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
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/implicit_cast_for_arguments-a3c671db2fff6f17.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,9 @@ | ||
--- | ||
deprecations: | ||
- | | ||
Options of meth:`~.AerSimulator.run` need to use correct types. | ||
fixes: | ||
- | | ||
Since 0.12.0, :class:`AerConfig` is used for simulation configuration while | ||
performing strict type checking for arguments of meth:`~.AerSimulator.run`. | ||
This commit adds casting if argument types are not expected. |
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