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

Qiskit / qiskit / 17325698704
88%

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

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.

47 of 51 new or added lines in 3 files covered. (92.16%)

61 existing lines in 6 files now uncovered.

91061 of 103009 relevant lines covered (88.4%)

481688.38 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
92.56
0.04% crates/circuit/src/packed_instruction.rs
3
84.43
-0.45% crates/circuit/src/dag_circuit.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
83.88
-0.18% crates/circuit/src/bit.rs
1
82.79
0.0% crates/circuit/src/parameter/parameter_expression.rs
6
92.01
-0.77% crates/qasm2/src/lex.rs
10
72.86
-0.41% crates/circuit/src/parameter/symbol_expr.rs
18
96.15
-1.42% crates/qasm2/src/parse.rs
25
84.43
-0.45% crates/circuit/src/dag_circuit.rs
Jobs
ID Job ID Ran Files Coverage
1 17325698704.1 29 Aug 2025 02:30PM UTC 858
88.4
GitHub Action Run
Source Files on build 17325698704
  • Tree
  • List 858
  • Changed 8
  • Source Changed 3
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17325698704
  • 042561de on github
  • Prev Build on gh-readonly-queue/main/pr-14831-4bf1e26c319c899b2b925a8b80231d880263ce83 (#17320318738)
  • Next Build on main (#17330105778)
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

© 2025 Coveralls, Inc