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) #12621

Merged
merged 2 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
@mergify mergify bot requested a review from a team as a code owner June 20, 2024 18:06
Copy link
Contributor Author

mergify bot commented Jun 20, 2024

Cherry-pick of b6c6166 has failed:

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

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
	modified:   test/python/circuit/test_parameters.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   qiskit/circuit/quantumcircuit.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
@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
qiskit/circuit/quantumcircuit.py Outdated Show resolved Hide resolved
qiskit/circuit/quantumcircuit.py Outdated Show resolved Hide resolved
@ElePT ElePT enabled auto-merge June 21, 2024 08:36
@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 9610728597

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 18 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 89.913%

Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 2 88.2%
crates/qasm2/src/lex.rs 4 91.86%
crates/qasm2/src/parse.rs 12 96.69%
Totals Coverage Status
Change from base Build 9600627572: -0.02%
Covered Lines: 61815
Relevant Lines: 68750

💛 - Coveralls

@ElePT ElePT added this pull request to the merge queue Jun 21, 2024
@jakelishman jakelishman modified the milestones: 1.1.2, 0.46.3 Jun 21, 2024
Merged via the queue into stable/1.1 with commit 15aa70f Jun 21, 2024
17 checks passed
@mergify mergify bot deleted the mergify/bp/stable/1.1/pr-12619 branch June 21, 2024 10:37
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