|
Repo Added
|
Files
875
|
Badge
README BADGES
|
push
github
Fix edge-order non-determinism when adding DAG nodes (backport #15040) (#15057) * Fix edge-order non-determinism when adding DAG nodes (#15040) All of `DAGCircuit::push_back`, `DAGCircuit::push_front` and `DAGCircuitBuilder::push_back` had non-determinisms in the precise order that edges were added. The two `DAGCircuit` methods had diverged, so exhibited _different_ behaviour. Most of the effects were limited to nodes with multiple classical in edges, though `DAGCircuit::push_back` did have some problems with high-degree quantum nodes (like barriers) as well. This commit unifies the code handled the two `DAGCircuit` methods to try and prevent divergences (especially since `apply_operation_front` is currently little used and little tested). As a side effect, this fixed a bug in `apply_operation_front` around handling multiple references to the same clbit or var in classical expressions that was fixed in `apply_operation_back` some time prior. (cherry picked from commit 25c3206f0) # Conflicts: # crates/circuit/src/dag_circuit.rs * Fix merge conflict --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
34 of 34 new or added lines in 1 file covered. (100.0%)
13 existing lines in 3 files now uncovered.92252 of 104362 relevant lines covered (88.4%)
559979.51 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|