Repo Added
|
Files
868
|
Badge
README BADGES
|
push
github
Preserve bit locations through pickle (backport #13980) (#14011) * Preserve bit locations through pickle (#13980) * Preserve bit locations through pickle Previously when we were pickling a DAGCircuit the bit locations fields were forgotten about. So when we loaded a DAGCircuit from a pickle the bit locations were empty. This would cause any call to find_bit() to raise an error because there was no entry for any of the bits in the dag. This commit fixes this by reconstructing the bit locations on __setstate__ by iterating over the dag's qubits and clbits. Fixes #13976 * Fix clippy * Update docstrings * Fix name change after rebase (cherry picked from commit 9dcc668e4) * Fix method name for stable/2.0 vs main --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
20 of 20 new or added lines in 1 file covered. (100.0%)
3 existing lines in 2 files now uncovered.72687 of 82473 relevant lines covered (88.13%)
497458.03 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|