Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
4.83k stars 2.29k forks source link

Invalidate `parameters` cache on circuit copy #12619

Closed jakelishman closed 1 week ago

jakelishman commented 1 week ago

Summary

Previously, the caching of the parameter view could persist between copies of the circuit because it was part of the copy.copy.

Details and comments

Fix #12617.

I verified that this is present in 1.1.0 as well.

qiskit-bot commented 1 week ago

One or more of the following people are relevant to this code:

jakelishman commented 1 week ago

@mergifyio backport stable/0.46 stable/1.1

mergify[bot] commented 1 week ago

backport stable/0.46 stable/1.1

✅ Backports have been created

* [#12620 Invalidate `parameters` cache on circuit copy (backport #12619)](https://github.com/Qiskit/qiskit/pull/12620) has been created for branch `stable/0.46` but encountered conflicts * [#12621 Invalidate `parameters` cache on circuit copy (backport #12619)](https://github.com/Qiskit/qiskit/pull/12621) has been created for branch `stable/1.1` but encountered conflicts
coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9600462226

Details


Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 6 92.37%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build 9598580526: 0.003%
Covered Lines: 63573
Relevant Lines: 70841

💛 - Coveralls