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

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

Build:
DEFAULT BRANCH: main
Ran 29 Aug 2025 02:30PM UTC
Files 858
Run time 34s
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

29 Aug 2025 01:23PM UTC coverage: 88.401% (-0.05%) from 88.455%
17325698704.1

push

github

web-flow
Add custom `DAGCircuit.__deepcopy__` implementation (#14965)

Previously we were relying on the pickling behaviour.  This was
desperately slow, and gets slower over time as more of our data is Rust
native and need to be serialised to and from Python in order to interact
with pickle.

Instead, we can use the `Clone` implementation of `StableGraph`, which
preserves node and edge ids (including holes), then only thread through
the deepcopy nature to the few parts of the data model where we still
store Python objects.  In casual testing, this sped up a microbenchmark:

```python
import copy
from qiskit.converters import circuit_to_dag
from qiskit.circuit.library import quantum_volume

qv = quantum_volume(100, 100, seed=1).decompose()
dag = circuit_to_dag(qv)
%timeit copy.deepcopy(dag)
```

from about 1.05s to 6ms on my machine.

This is directly relevant for the performance of `optimization_level=3`,
which needs to deepcopy as part of its `MinimumPoint` check in the
optimisation loop.

91061 of 103009 relevant lines covered (88.4%)

481688.38 hits per line

Source Files on job 17325698704.1
  • Tree
  • List 858
  • Changed 8
  • Source Changed 3
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 17325698704
  • 042561de on github
  • Prev Job for on main (#17320318738.1)
  • Next Job for on main (#17330105778.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