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

Qiskit / qiskit / 25445566101
88%

Build:
DEFAULT BRANCH: main
Ran 06 May 2026 04:12PM UTC
Jobs 1
Files 938
Run time 3min
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

06 May 2026 03:11PM UTC coverage: 87.621% (+0.01%) from 87.61%
25445566101

push

github

web-flow
Add a rust iterator implementation for a dag's nodes_on_wire (#15999)

* Add a rust iterator implementation for a dag's nodes_on_wire

The nodes_on_wire DAGCircuit rust method was needlessly allocating the
result into an intermediate vector. This was mostly an artifact of the
python interface which was needs to return a list to produce an iterator
(assuming the api doesn't actually return a list). But, in a rust context
we don't want to eagerly create a vector. The only current rust space
consumer is a pass that is just iterating over the nodes and the vector
is just adding extra overhead. This commit adds a new iterator method
that does the iteration over the nodes without any allocation. The
current method is left in place because it is used by the python
interface and also it doesn't panic if given an invalid wire and has an
option to only include op nodes. While this new method just returns the
iterator or panics.

This also updates the sole use of the DAGCircuit::nodes_on_wire() method
from rust since this method is being added for rust consumers to avoid
an unnecessary allocation.

* Replace the rust inner method with new iterator

This commit replaces the previously left intact rust method that built
an inner vec and replaces it with the new iterator returning method.
There wasn't really a need to keep the old method around as what was
really needed was just to preserve the python interface which was
trivial to do using the iterator in the python interface methods.

* Simplify iterator implementation

* Update size hint to be valid at all points in iteration

This commit updates the iterator's size_hint implementation to correctly
provide a hint at all points in iteration. Previously this incorrectly
only returned a hint for the start of the iterator.

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>

---------

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>

30 of 34 new or added lines in 2 files covered. (88.24%)

10 existing lines in 3 files now uncovered.

106947 of 122056 relevant lines covered (87.62%)

963467.26 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
84.69
-0.02% crates/circuit/src/dag_circuit.rs

Coverage Regressions

Lines Coverage ∆ File
8
73.84
-0.33% crates/circuit/src/parameter/symbol_expr.rs
1
92.8
1.54% crates/qasm2/src/lex.rs
1
94.71
-0.18% crates/transpiler/src/passes/unitary_synthesis/decomposers.rs
Jobs
ID Job ID Ran Files Coverage
1 25445566101.1 06 May 2026 04:12PM UTC 938
87.62
GitHub Action Run
Source Files on build 25445566101
  • Tree
  • List 938
  • Changed 6
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25445566101
  • e195f45c on github
  • Prev Build on gh-readonly-queue/main/pr-15948-4a4043d013c128280a4ae52a4cb61852f2c2ee4f (#25428517529)
  • Next Build on main (#25496719840)
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