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

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

Build:
Build:
LAST BUILD BRANCH: dag/to-circuit
DEFAULT BRANCH: main
Ran 10 Dec 2025 10:22AM UTC
Files 881
Run time 39s
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.287% (-0.02%) from 88.31%
20094131654.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

96325 of 109105 relevant lines covered (88.29%)

1207630.21 hits per line

Source Files on job 20094131654.1
  • Tree
  • List 881
  • Changed 15
  • Source Changed 7
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 20094131654
  • ace6eff1 on github
  • Prev Job for on gh-readonly-queue/main/pr-15420-e33feba98b869a0af80aab37b90bbb6a6296b101 (#20080731148.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