-
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.
Browse files
Browse the repository at this point in the history
* Enable proper iteration over Statevector * Add Statevector.__len__ and add a release note * Simplify release note * Update test_statevctor_iter Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit da9ae54) Co-authored-by: Hristo Georgiev <[email protected]>
- Loading branch information
1 parent
ff7cc70
commit 8827c55
Showing
3 changed files
with
37 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
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/statevector-enable-iter-4652d7ce87f4d459.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: | ||
- | | ||
:class:`.Statevector` will now allow direct iteration through its values | ||
(such as ``for coefficient in statevector``) and | ||
correctly report its length under ``len``. Previously it would try and | ||
and access out-of-bounds data and raise a :class:`.QiskitError`. See | ||
`#8039 <https://github.com/Qiskit/qiskit-terra/issues/8039>`__. |
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