Skip to content

Invalidate QuantumCircuit.parameters cache on global-phase modification#11641

Merged
Cryoris merged 1 commit into
Qiskit:mainfrom
jakelishman:fix-parameter-cache-global-phase
Jan 25, 2024
Merged

Invalidate QuantumCircuit.parameters cache on global-phase modification#11641
Cryoris merged 1 commit into
Qiskit:mainfrom
jakelishman:fix-parameter-cache-global-phase

Conversation

@jakelishman
Copy link
Copy Markdown
Member

Summary

Previously, replacing a parametric global_phase with a non-parametric global phase would modify the ParameterTable without invalidating the parameters cache that the circuit kept.

Details and comments

Fix #11640. No release note because the bug isn't released (introduced in #11428).

…tion

Previously, replacing a parametric `global_phase` with a non-parametric
global phase would modify the `ParameterTable` without invalidating the
`parameters` cache that the circuit kept.
@jakelishman jakelishman added Changelog: None Do not include in the GitHub Release changelog. mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library labels Jan 25, 2024
@jakelishman jakelishman added this to the 1.0.0 milestone Jan 25, 2024
@jakelishman jakelishman requested a review from a team as a code owner January 25, 2024 16:08
@qiskit-bot
Copy link
Copy Markdown
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 7657261534

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 89.532%

Totals Coverage Status
Change from base Build 7654964150: -0.007%
Covered Lines: 59543
Relevant Lines: 66505

💛 - Coveralls

@Cryoris Cryoris enabled auto-merge January 25, 2024 16:33
@Cryoris Cryoris added this pull request to the merge queue Jan 25, 2024
Merged via the queue into Qiskit:main with commit ec859e1 Jan 25, 2024
@jakelishman jakelishman deleted the fix-parameter-cache-global-phase branch January 25, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: None Do not include in the GitHub Release changelog. mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Circuit parameters are not cleared via global_phase setter

4 participants