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.
Detect duplicates in
QuantumCircuit.compose
Previously, `QuantumCircuit.compose` would silently attempt to compose multiple qubits onto the same state, which would fail in weird ways if any multi-qubit instructions were acting on these collapsed qubits.
- Loading branch information
1 parent
70901b2
commit 98f7ebb
Showing
3 changed files
with
24 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
5 changes: 5 additions & 0 deletions
5
releasenotes/notes/fix-circuit-compose-duplicate-59de6c1c51f58e54.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,5 @@ | ||
--- | ||
fixes: | ||
- | | ||
:meth:`.QuantumCircuit.compose` will now correctly raise a :exc:`.CircuitError` when there are | ||
duplicates in the ``qubits`` or ``clbits`` arguments. |
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