-
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 1q matrix bug in Quantum Shannon Decomposer (#10126)
* fix 1q bug * formatting * restrict 2q gates from apply_a2 * Add check that decomposition includes qsd2q gates before optimizing them Co-authored-by: jsmallz333 <[email protected]> * Apply suggestions from code review Co-authored-by: Matthew Treinish <[email protected]> * Add release note for fix to issue 10036 * avoid creating unitary gate if initial gate is 2q * remove debug code * Change "certain" to "trivial" This was requested in a review comment. --------- Co-authored-by: John Lapeyre <[email protected]> Co-authored-by: jsmallz333 <[email protected]> Co-authored-by: Matthew Treinish <[email protected]> (cherry picked from commit b831bcf)
- Loading branch information
1 parent
9ac4e8a
commit a0f5bd3
Showing
3 changed files
with
21 additions
and
6 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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/fix-1q-matrix-bug-in-quantum-shannon-decomposer-c99ce6509f03715b.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: | ||
- | | ||
When :func:`~qiskit.quantum_info.synthesis.qs_decomposition`, which does quantum Shannon | ||
decomposition, was called on trivial numeric unitaries that do not benefit from this | ||
decomposition, an unexpected error was raised. With this fix, such unitaries are detected and | ||
the equivalent circuit is returned without performing Shannon decomposition. |
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