Repo Added
|
Files
871
|
Badge
README BADGES
|
github
Fix incorrect mapping of ControlFlow block qargs in `BasisTranslator` (#15143) * Fix: `ControlFlowOP`/`BasisTranslator` mismatch - When extracting the basis of the target and applying the translations onto the dag, the `BasisTranslator` would not use the absolute indices of the operating qubits when a control flow operation block was processed during recursion. The following commit adds a mapping to the following `BasisTranslator` methods: - `extract_target_basis_circuit` which only gets called during a recursion step. - `apply_translation` in which it is always `None` unless a recursion step happens. The provided mapping will correctly direct local block qubit indices into the absolute ones stored by the original circuit from which the operation comes from. This should help fix #13728. * Fix: Add check for unique qargs. - Map the unique qargs during `apply_translation` in `BasisTranslator`. * Test: Add simplified reproducer. * Revert: Error message in `apply_translation` * Fix: Add release note (cherry picked from commit 21a8dec17)
42 of 42 new or added lines in 1 file covered. (100.0%)
26 existing lines in 4 files now uncovered.92341 of 104456 relevant lines covered (88.4%)
556608.14 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|