forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong argument supplied to _identity_op() (Qiskit#9201)
* Fix wrong argument supplied to _identity_op() Qiskit#9197 * Add test case with large qubit gate This commit adds a test case to ensure we get the correct result with a large number of qubits. This also implicitly tests that we've fixed the excessive memory consumption because the memory requirements for an 8 qubit gate with the bug still present would not be runnable on most current systems. Co-authored-by: Jake Lishman <[email protected]> * Add release note --------- Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6b8d5a9
commit d7e397d
Showing
3 changed files
with
17 additions
and
2 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/fix-memory-commutation-checker-dbb441de68706b6f.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 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue with the :class:`~.CommutationChecker` class where it would | ||
attempt to internally allocate an array for :math:`2^{n}` qubits when it | ||
only needed an array to represent :math:`n` qubits. This could cause | ||
an excessive amount of memory for wide gates, for example a 4 qubit | ||
gate would require 32 gigabytes instead of 2 kilobytes. | ||
Fixed `#9197 <https://github.com/Qiskit/qiskit-terra/issues/9197>`__ |
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