Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidate parameters cache on circuit copy (backport #12619) #12620

Merged
merged 4 commits into from
Jun 21, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 20, 2024

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.


This is an automatic backport of pull request #12619 done by Mergify.

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

(cherry picked from commit b6c6166)

# Conflicts:
#	qiskit/circuit/quantumcircuit.py
#	test/python/circuit/test_parameters.py
Copy link
Contributor Author

mergify bot commented Jun 20, 2024

Cherry-pick of b6c6166 has failed:

On branch mergify/bp/stable/0.46/pr-12619
Your branch is up to date with 'origin/stable/0.46'.

You are currently cherry-picking commit b6c616612.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   releasenotes/notes/fix-parameter-cache-05eac2f24477ccb8.yaml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   qiskit/circuit/quantumcircuit.py
	both modified:   test/python/circuit/test_parameters.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts used by mergify when there are conflicts in a port label Jun 20, 2024
@mergify mergify bot requested a review from a team as a code owner June 20, 2024 18:06
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@github-actions github-actions bot added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library labels Jun 20, 2024
@github-actions github-actions bot added this to the 1.1.2 milestone Jun 20, 2024
@ElePT ElePT removed the conflicts used by mergify when there are conflicts in a port label Jun 21, 2024
@coveralls
Copy link

coveralls commented Jun 21, 2024

Pull Request Test Coverage Report for Build 9610945559

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 87.198%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 3 92.88%
Totals Coverage Status
Change from base Build 9601393015: 0.02%
Covered Lines: 74509
Relevant Lines: 85448

💛 - Coveralls

@ElePT ElePT added this pull request to the merge queue Jun 21, 2024
Merged via the queue into stable/0.46 with commit 35a4c12 Jun 21, 2024
11 checks passed
@mergify mergify bot deleted the mergify/bp/stable/0.46/pr-12619 branch June 21, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the 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.

4 participants