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

Qiskit / qiskit / 14274010472 / 1
88%
main: 88%

Build:
DEFAULT BRANCH: main
Ran 04 Apr 2025 09:17PM UTC
Files 789
Run time 24s
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.1

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

72963 of 82841 relevant lines covered (88.08%)

377838.32 hits per line

Source Files on job 14274010472.1
  • Tree
  • List 789
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14274010472
  • fdc3d622 on github
  • Prev Job for on main (#14243059562.1)
  • Next Job for on main (#14305769862.1)
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