-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
replace_block_with_op
on operations with wrong number of qubits (…
…#12637) (#12699) * fix illegal op insertion * rm dangling print * fix PauliEvolution * Update qiskit/dagcircuit/dagcircuit.py Co-authored-by: John Lapeyre <[email protected]> --------- Co-authored-by: John Lapeyre <[email protected]> (cherry picked from commit 67fd35a) Co-authored-by: Julien Gacon <[email protected]>
- Loading branch information
1 parent
5def925
commit 39e2dac
Showing
4 changed files
with
35 additions
and
1 deletion.
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
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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/raise-on-illegal-replace-block-50cef8da757a580a.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,7 @@ | ||
--- | ||
fixes: | ||
- | | ||
Previously, :meth:`.DAGCircuit.replace_block_with_op` allowed to place an | ||
``n``-qubit operation onto a block of ``m`` qubits, leaving the DAG in an | ||
invalid state. This behavior has been fixed, and the attempt will raise | ||
a :class:`.DAGCircuitError`. |
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