Repo Added
|
Files
867
|
Badge
README BADGES
|
push
github
Check target gates are parameterized in optimize1qgatesdecomposition (backport #15131) (#15140) * Check target gates are parameterized in optimize1qgatesdecomposition (#15131) * Check target gates are parameterized in optimize1qgatesdecomposition This commit updates the Optimize1qGatesDecomposition transpiler pass to check the defined operation in the target to ensure it's a valid gate to use for the decomposition. Previously the pass would just use the gate name for each qubit and treat that as a basis gate list. However this ignored the extra details that the target provides as a target gate can match the name but not be valid for use in synthesis. This commit fixes that oversight by checking the gates directly and ensuring they're valid for use in the decomposition. Fixes #14743 * Fix release note typos Co-authored-by: Jake Lishman <jake@binhbar.com> * Simplify logic in pass Since this PR is intended to be backported to 2.2.x and 1.4.x we should minimize the diff. The previous version of this PR changed the behavior of the pass to normalize on using standard gates even if there were custom names for gates in the target. Longer term I think this behavior is better for the pass, but there is discussions around exactly the semantics of the Target's data model around names vs operations here and also that this might change the output pretty noticeably in some cases. For a bugfix intended for backport it's better to be conservative here, so this commit reverts the logic to just use the name in the target and only filter operations if the target doesn't actually support arbitrary angles on them. We can revisit the improvements in a follow up PR. --------- Co-authored-by: Jake Lishman <jake@binhbar.com> (cherry picked from commit 83b762d31) # Conflicts: # crates/transpiler/src/passes/optimize_1q_gates_decomposition.rs * Fix conflict --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-b... (continued)
15 of 15 new or added lines in 1 file covered. (100.0%)
11 existing lines in 2 files now uncovered.92307 of 104422 relevant lines covered (88.4%)
549463.74 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|