-
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 marginal_counts on memory with non-zero indices (#8047)
The marginalisation could previously return the empty string instead of `"0"` if the given indices were too high for a given memory slot, causing a later error in binary-to-hex conversion. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 9374449)
- Loading branch information
1 parent
7bdcd2e
commit dbe1c75
Showing
3 changed files
with
18 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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/fix-marginal_counts-zero-memory-0f6710d6923c8ad7.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,7 @@ | ||
--- | ||
fixes: | ||
- | | ||
:func:`.marginal_counts` will now succeed when asked to marginalise memory | ||
with an ``indices`` parameter containing non-zero elements. Previously, | ||
shots whose hexadecimal result representation was sufficiently small could | ||
raise a ``ValueError``. See `#8044 <https://github.com/Qiskit/qiskit-terra/issues/8044>`__. |
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