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

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

Build:
DEFAULT BRANCH: main
Ran 10 Dec 2025 10:58AM UTC
Files 881
Run time 38s
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

10 Dec 2025 09:41AM UTC coverage: 88.295% (-0.02%) from 88.31%
20094793387.1

push

github

web-flow
Add refcounting and free-list in control-flow blocks (#15420)

* Add refcounting and free-list in control-flow blocks

This replaces the tracking of the control-flow blocks in `CircuitData`
and `DAGCircuit` with a custom stable-index list of blocks, imbibed with
a free list (implemented as an in-place stack), where each block counts
its number of references.  With the current control-flow setup, we do
not actually expect any valid circuit to increase the refcount of a
given block beyond 1, but since the stable-index and free-list form of
the object already required a custom `Entry` type to distinguish the
cases: present and referenced; present and not referenced; and absent;
the `refcount` field came for free anyway.

This updates `CircuitData` and `DAGCircuit` to keep these refcounts
up-to-date as the circuit is modified, and to immediately free blocks
whose refcount drops to zero (by default).

Automatic freeing of the blocks is necessary to prevent (effective)
memory leaks when calling methods like `DAGCircuit.substitute_node`,
which is a necessary call when a control-flow operation (like `BoxOp`)
is mutated from Python space to update it.

* Fill out more documentation on blocks usage

96334 of 109105 relevant lines covered (88.29%)

1205154.69 hits per line

Source Files on job 20094793387.1
  • Tree
  • List 881
  • Changed 13
  • Source Changed 7
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 20094793387
  • ace6eff1 on github
  • Prev Job for on main (#20080731148.1)
  • Next Job for on main (#20101892139.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