-
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.
Fix the calculation for identity operator's expectation value (#13345)
* Fix the calculation for identity operator's expectation value * Add release note and test * reformatted `test_statevector.py` with black * Update releasenotes/notes/fix_identity_operator_9e2ec9770ac046a6.yaml Co-authored-by: Julien Gacon <gaconju@gmail.com> * add a docstring to pass the pylint test * Fix leading `.` --------- Co-authored-by: Julien Gacon <gaconju@gmail.com>
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
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
5 changes: 5 additions & 0 deletions
5
releasenotes/notes/fix_identity_operator_9e2ec9770ac046a6.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,5 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed a bug that caused :meth:`.Statevector.expectation_value` to yield incorrect results | ||
for the identity operator when the statevector was not normalized. |
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