|
Ran
|
Jobs
1
|
Files
950
|
Run time
2min
|
Badge
README BADGES
|
push
github
Fix `Initialize.gates_to_uncompute` for integer inputs (#16492) (#16519) * fix: Initialize.gates_to_uncompute preserves num_qubits for integer-bitmap inputs Initialize.gates_to_uncompute() was rebuilding the uncomputation circuit via Isometry(self.params, 0, 0). For amplitude-vector inputs this works correctly, but for integer-bitmap inputs (e.g. Initialize(1, num_qubits=2)) self.params only contains the stored integer, so Isometry sees a length-1 vector and returns a 0-qubit circuit. The fix delegates to self._stateprep.definition.inverse(), which is the same StatePreparation path already used for the forward direction and correctly handles all documented input forms including integer-bitmap. Fixes #16413 * address review: move test to test_initializer.py and simplify release note * address review: simplify test and fix release note link Per @Cryoris's review on PR #16492: - Removed the redundant amplitude-vector comparison in the regression test; that input form is already covered elsewhere. - Removed unnecessary local import of Statevector, which is already imported at module level. - Fixed the release note to use the proper issue-link RST syntax. * fix: remove extra blank line (black formatting) (cherry picked from commit df3079520) Co-authored-by: Lojy Elkady <elkadylojain@gmail.com>
1 of 1 new or added line in 1 file covered. (100.0%)
6 existing lines in 2 files now uncovered.112778 of 128684 relevant lines covered (87.64%)
999130.42 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 4 |
74.18 |
-0.12% | crates/circuit/src/parameter/symbol_expr.rs |
| 2 |
92.29 |
0.51% | crates/qasm2/src/lex.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 28574097334.1 | 950 |
87.64 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|