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

Qiskit / qiskit / 10707349892
89%
main: 88%

Build:
Build:
LAST BUILD BRANCH: unitary-synthesis
DEFAULT BRANCH: main
Ran 04 Sep 2024 06:45PM UTC
Jobs 1
Files 875
Run time 4min
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

04 Sep 2024 06:21PM UTC coverage: 89.173% (+0.02%) from 89.153%
10707349892

push

github

web-flow
Oxidize Commutation Analysis (#12995)

* init

* up

* lint

* .

* up

* before cache

* with cache

* correct

* cleaned up

* lint reno

* Update Cargo.lock

* .

* up

* .

* revert op

* .

* .

* .

* .

* Delete Cargo.lock

* .

* corrected string comparison

* removed Operator class from operation.rs

* .

* Apply suggestions from code review

Co-authored-by: Raynel Sanchez <87539502+raynelfss@users.noreply.github.com>

* comments from code review

* Port DAGCircuit to Rust

This commit migrates the entirety of the `DAGCircuit` class to Rust. It
fully replaces the Python version of the class. The primary advantage
of this migration is moving from a Python space rustworkx directed graph
representation to a Rust space petgraph (the upstream library for
rustworkx) directed graph. Moving the graph data structure to rust
enables us to directly interact with the DAG directly from transpiler
passes in Rust in the future. This will enable a significant speed-up in
those transpiler passes. Additionally, this should also improve the
memory footprint as the DAGCircuit no longer stores `DAGNode`
instances, and instead stores a lighter enum NodeType, which simply
contains a `PackedInstruction` or the wire objects directly.

Internally, the new Rust-based `DAGCircuit` uses a `petgraph::StableGraph`
with node weights of type `NodeType` and edge weights of type `Wire`. The
NodeType enum contains variants for `QubitIn`, `QubitOut`, `ClbitIn`,
`ClbitOut`, and `Operation`, which should save us from all of the
`isinstance` checking previously needed when working with `DAGNode` Python
instances. The `Wire` enum contains variants `Qubit`, `Clbit`, and `Var`.

As the full Qiskit data model is not rust-native at this point while
all the class code in the `DAGCircuit` exists in Rust now, there are
still sections that rely on Python or actively run Python code via Rust
to function. These typically involve anything that uses `condition`,
control flow, classical vars, ca... (continued)

107 of 110 new or added lines in 6 files covered. (97.27%)

21 existing lines in 6 files now uncovered.

72599 of 81414 relevant lines covered (89.17%)

387637.33 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
97.12
crates/accelerate/src/commutation_analysis.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
81.93
-0.24% crates/circuit/src/dag_node.rs
1
90.84
-0.06% crates/accelerate/src/two_qubit_decompose.rs
2
88.43
-0.36% qiskit/transpiler/passes/synthesis/unitary_synthesis.py
4
91.98
-0.25% crates/qasm2/src/lex.rs
6
97.61
1.39% crates/qasm2/src/parse.rs
7
90.84
-5.34% qiskit/synthesis/two_qubit/xx_decompose/decomposer.py
Jobs
ID Job ID Ran Files Coverage
1 10707349892.1 04 Sep 2024 06:45PM UTC 875
89.17
GitHub Action Run
Source Files on build 10707349892
  • Tree
  • List 875
  • Changed 58
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 05f64295 on github
  • Prev Build on gh-readonly-queue/main/pr-13083-dff9e8121729d8273963eaf3a7d718c44f4cb31c (#10704892104)
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