forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix global-phase of copied
BlueprintCircuit
s
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.
- Loading branch information
1 parent
4b30598
commit a27b6bf
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
releasenotes/notes/fix-blueprintcircuit-phase-7102043cf2e47e33.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
fixes: | ||
- | | ||
Calling :meth:`~.QuantumCircuit.copy` or :meth:`~.QuantumCircuit.copy_empty_like` on a | ||
:class:¬.BlueprintCircuit` will now correctly propagate the | ||
:attr:`~.QuantumCircuit.global_phase` to the copy. Previously, the global phase would always be zero after the copy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters