Repo Added
|
Files
868
|
Badge
README BADGES
|
push
github
Revert "Port star_preroute to rust" (#14381) * Revert "Port star_preroute to rust" This commit reverts the move of star prerouting to run in Rust. At the time of this commit it was before the majority of the transpiler infrastructure was ported to rust. At that time the pass was ported we had a few one off passes that were ported to rust and we had to manage the Python rust boundary carefully. The pattern was typically to define custom rust data types that provided an alternate view of the DAGCircuit and the target for compilation that was built out of the Python space dag and target. The star prerouting pass was ported to Rust and leveraged the existing infrastructure used by SabreSwap and SabreLayout as the function of the pass on a DAG was very similar to Sabre (finding where to insert swaps and rebuilding the dag where swaps are needed). At the time this was a pragmatic choice to accelerate the pass and not need to wait for the needed infrastructure to be written in Rust. However in practice the performance gains the Rust porting of the algorithm provided were not as large as was originally hoped and now the code of the pass is tied directly to the current implementation of sabre. As the sabre interface layer is being re-written in #14317 this is proving to be a blocker for that effort. This commit reverts the current rust implementation to unblock the sabre refactoring effort. It's still definitely worth porting this pass to Rust but we now have sufficient infrastructure in Rust to write full transpiler passes without Python. We should follow up this PR and rewrite the star prerouting pass so that full pass operates completely in rust and directly leverages the native data structures that exist in Rust now instead of the hybrid approach that ties the is tightly coupled to the internals of the sabre pass. This reverts commit b23c54523. * Add back reverted alt text for plot in docs
49 of 50 new or added lines in 1 file covered. (98.0%)
24 existing lines in 3 files now uncovered.78326 of 88710 relevant lines covered (88.29%)
427402.33 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|