• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 10150835665
90%
main: 88%

Build:
Build:
LAST BUILD BRANCH: fix-15509-substitute-node-variables
DEFAULT BRANCH: main
Ran 29 Jul 2024 08:09PM UTC
Jobs 1
Files 853
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Jul 2024 06:50PM UTC coverage: 89.951% (+0.01%) from 89.938%
10150835665

push

github

web-flow
 Port `star_preroute` to rust (backport #12761) (#12846)

* Port `star_preroute` to rust (#12761)

* This commit ports the core logic of `star_preroute` from Python to Rust. The changes involve creating a new Rust module for the star prerouting algorithm and updating the corresponding Python code to integrate with this new Rust functionality.

Details:
- New Rust file: Added `star_preroute.rs` to handle the core logic of the function `star_preroute` from the python side. This file defines the type aliases for node and block representations, which matches the current block representation of the `StarBlock` (except that the center is just a bool, as we only need to know if there is a center), and the node representation matches how the nodes used in `SabreDAG`. The `star_preroute` function processes the star blocks witihin the `SabreDAG`  and finds the linear routing equivalent and then returns the result as a `SabreResult`. Thus we can use the same methods we used in Sabre, such as `_build_sabre_dag` and `_apply_sabre_result`.
- Node representation: A key part of this implementation is how it takes advantage of `SabreResult` and `SabreDAG`, so the node representation is a tuple of the node id, list of qubit indices, a set of classical bit indices, and a directive flag. However, once we update the regular DAG to rust, this part may change significantly.
- Updates in the SABRE rust module: To use `sabre_dag.rs` and `swap_map.rs` in `star_prerouting`, I change them to be public in `crates/accelerate/src/sabre/mod.rs`. Not sure if it makes more sense to do it this way or to move `star_prerouting` to `crates/accelerate/src/sabre/` since it mimics the methods used in Sabre to change the dag.
- Python side updates: Imported the necessary modules and only modified the function `star_preroute` so that now the function performs the heavy lifting of transforming the DAG within the Rust space, leveraging `_build_sabre_dag` and `_apply_sabre_result`.
- Possible iss... (continued)

167 of 174 new or added lines in 4 files covered. (95.98%)

8 existing lines in 2 files now uncovered.

66334 of 73745 relevant lines covered (89.95%)

243575.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10150835665.1 29 Jul 2024 08:09PM UTC 0
89.95
GitHub Action Run
Source Files on build 10150835665
Detailed source file information is not available for this build.
  • Back to Repo
  • 0093c652 on github
  • Prev Build on stable/1.2 (#10149647529)
  • Next Build on stable/1.2 (#10151658550)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc