Skip to content

Conversation

jakelishman
Copy link
Member

Summary

Using BlueprintCircuit.copy() or .copy_empty_like() would previously erase the global phase as part of the rebuild operation. This overrides BlueprintCircuit.copy_empty_like() to ensure that it is always propagated through.

Details and comments

Using `BlueprintCircuit.copy()` or `.copy_empty_like()` would previously
erase the global phase as part of the rebuild operation.  This overrides
`BlueprintCircuit.copy_empty_like()` to ensure that it is always
propagated through.
@jakelishman jakelishman added stable backport potential The bug might be minimal and/or import enough to be port to stable 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 Dec 21, 2023
@jakelishman jakelishman added this to the 0.45.2 milestone Dec 21, 2023
@jakelishman jakelishman requested a review from a team as a code owner December 21, 2023 20:14
@qiskit-bot
Copy link
Collaborator

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

  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7292776195

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • 17 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.003%) to 87.537%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 5 91.41%
crates/qasm2/src/parse.rs 12 97.13%
Totals Coverage Status
Change from base Build 7287805073: 0.003%
Covered Lines: 59182
Relevant Lines: 67608

💛 - Coveralls

Copy link
Contributor

@kevinhartman kevinhartman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinhartman kevinhartman added this pull request to the merge queue Jan 3, 2024
Merged via the queue into Qiskit:main with commit 19767bc Jan 3, 2024
mergify bot pushed a commit that referenced this pull request Jan 3, 2024
Using `BlueprintCircuit.copy()` or `.copy_empty_like()` would previously
erase the global phase as part of the rebuild operation.  This overrides
`BlueprintCircuit.copy_empty_like()` to ensure that it is always
propagated through.

(cherry picked from commit 19767bc)
@jakelishman jakelishman deleted the fix-blueprintcircuit-copy branch January 3, 2024 17:34
github-merge-queue bot pushed a commit that referenced this pull request Jan 3, 2024
Using `BlueprintCircuit.copy()` or `.copy_empty_like()` would previously
erase the global phase as part of the rebuild operation.  This overrides
`BlueprintCircuit.copy_empty_like()` to ensure that it is always
propagated through.

(cherry picked from commit 19767bc)

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
ShellyGarion pushed a commit to ShellyGarion/qiskit-terra that referenced this pull request Jan 18, 2024
Using `BlueprintCircuit.copy()` or `.copy_empty_like()` would previously
erase the global phase as part of the rebuild operation.  This overrides
`BlueprintCircuit.copy_empty_like()` to ensure that it is always
propagated through.
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 stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants