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.
Invalidate
parameters
cache on circuit copy (Qiskit#12619)
Previously, the caching of the parameter view could persist between copies of the circuit because it was part of the `copy.copy`.
- Loading branch information
1 parent
2ffc4e5
commit f1033e3
Showing
3 changed files
with
32 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
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: | ||
- | | ||
The :attr:`.QuantumCircuit.parameters` attribute will now correctly be empty | ||
when using :meth:`.QuantumCircuit.copy_empty_like` on a parametric circuit. | ||
Previously, an internal cache would be copied over without invalidation. | ||
Fix `#12617 <https://github.com/Qiskit/qiskit/issues/12617>`__. |
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