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

Qiskit / qiskit / 14274010472
88%

Build:
DEFAULT BRANCH: main
Ran 04 Apr 2025 09:17PM UTC
Jobs 1
Files 789
Run time 5min
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 Apr 2025 08:13PM UTC coverage: 88.076% (+0.01%) from 88.065%
14274010472

push

github

web-flow
Split DAGCircuit::compose() into Rust and python (#14164)

* Split DAGCircuit::compose() into Rust and python

The DAGCircuit::compose() method was previously implemented using most
of the logic via python. Basically it was all python just implemented
via PyO3 calls. This limited the performance of the function, but also
potentially more importantly meant that we didn't have an internal
Rust mechanism for running dag circuit composition. This commit seeks to
address this by splitting out the Python interface from the rust
implementation and rewriting the internals to operate on the Rust data
model directly instead of going through python. The `DAGCircuit::compose()`
method becomes the rust function for doing composition, and
`DAGCircuit::py_compose()` is the python interface.

Ideally we'd be able to drop the Python token argument from the new
`DAGCircuit::compose()` too, but because of
`DAGCircuit::apply_operation_back()` and handling of Vars this wasn't
worth the effort of using `Python::with_gil()` since we'd
unconditionally need the gil. Once `apply_operation_back()` no longer
needs the GIL, we should be able to drop the py argument from compose
too.

* Fix failing control flow tests

The control flow var handling was assuming that the underlying
instruction objects were copied during a compose() instead of mutated in
place with the updates. This commit corrects the oversight to fix the
failing tests.

* Remove pointless front argument from rust interface

* Lazily instantiate PyVariableMapper

* Update crates/circuit/src/dag_circuit.rs

* Fixes from code review

210 of 251 new or added lines in 1 file covered. (83.67%)

3 existing lines in 2 files now uncovered.

72963 of 82841 relevant lines covered (88.08%)

377838.32 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
41
85.76
-0.1% crates/circuit/src/dag_circuit.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.23
-0.23% crates/qasm2/src/expr.rs
2
92.73
0.5% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 14274010472.1 04 Apr 2025 09:17PM UTC 789
88.08
GitHub Action Run
Source Files on build 14274010472
  • Tree
  • List 789
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14274010472
  • fdc3d622 on github
  • Prev Build on gh-readonly-queue/main/pr-13916-24038aa2aaee6391917a5e157e6f7df00c7a26e7 (#14243059562)
  • Next Build on main (#14305769862)
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