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

Qiskit / qiskit / 10774677144
88%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2024 02:17PM UTC
Jobs 1
Files 881
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

09 Sep 2024 01:09PM UTC coverage: 89.175% (+0.03%) from 89.149%
10774677144

push

github

web-flow
Fully port Split2QUnitaries to rust (#13025)

* Fully port Split2QUnitaries to rust

This commit builds off of #13013 and the other data model in Rust
infrastructure and migrates the InverseCancellation pass to
operate fully in Rust. The full path of the transpiler pass now never
leaves Rust until it has finished modifying the DAGCircuit. There is
still some python interaction necessary to handle parts of the data
model that are still in Python, mainly for creating `UnitaryGate`
instances and `ParameterExpression` for global phase. But otherwise
the entirety of the pass operates in rust now.

This is just a first pass at the migration here, it moves the pass to
use loops in rust. The next steps here are to look at operating
the pass in parallel. There is no data dependency between the
optimizations being done for different gates so we should be able to
increase the throughput of the pass by leveraging multithreading to
handle each gate in parallel. This commit does not attempt
this though, because of the Python dependency and also the data
structures around gates and the dag aren't really setup for
multithreading yet and there likely will need to be some work to
support that.

Part of #12208

* Update pass logic with changes from #13095

Some of the logic inside the Split2QUnitaries pass was updated in a
recently merged PR. This commit makes those changes so the rust
implementation matches the current state of the previous python version.

* Use op_nodes() instead of topological_op_nodes()

* Use Fn trait instead of FnMut for callback

We don't need the callback to be mutable currently so relax the trait to
just be `Fn` instead of `FnMut`. If we have a need for a mutable
environment callback in the future we can change this easily enough
without any issues.

* Avoid extra edge operations in replace_on_incoming_qubits

* Rename function

98 of 106 new or added lines in 6 files covered. (92.45%)

4 existing lines in 1 file now uncovered.

73032 of 81897 relevant lines covered (89.18%)

388707.26 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
95.45
crates/accelerate/src/split_2q_unitaries.rs
6
88.92
-0.0% crates/circuit/src/dag_circuit.rs

Uncovered Existing Lines

Lines Coverage ∆ File
4
92.23
-0.5% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 10774677144.1 09 Sep 2024 02:17PM UTC 881
89.18
GitHub Action Run
Source Files on build 10774677144
  • Tree
  • List 881
  • Changed 62
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2ef371ae on github
  • Prev Build on main (#10770445393)
  • Next Build on main (#10794993036)
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

© 2025 Coveralls, Inc