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

Qiskit / qiskit / 21713493341
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-15658-98d9105c8b92b425facbb004612479008524f124
DEFAULT BRANCH: main
Ran 05 Feb 2026 02:05PM UTC
Jobs 1
Files 897
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

05 Feb 2026 01:33PM UTC coverage: 87.972% (+0.02%) from 87.949%
21713493341

push

github

web-flow
Add `CircuitData::from_dag_ref` constructor (#15557)

* Add `CircuitData::from_dag_ref` constructor

This logically replaces the separate `dag_to_circuit` function.  Aside
from requiring less code, because there's no need to define new custom
"transfer" data types or document a long option list, this is more
performant because the circuit can more easily pre-allocate space for
its complete expansion.

It is typically more convenient in Rust to have constructor functions
defined on the object to be constructed, since methods defined by the
struct have private access to its internals.  This makes `from_*`
methods typically rather simpler than separated constructors.

`from_dag_ref` and `from_dag_ref_deepcopy` are split for two reasons:

1. it's clear that we must be attached to a Python interpreter to call
   `from_dag_ref_deepcopy`, and caller must ensure this, without us
   needing to re-check the attachment on each instruction.

2. ideally, `CircuitData::from_dag_ref` could be made infallible.  In
   practice, there are still some problems, because one could introduce
   parameters with clashing names while in the `DAGCircuit` form, which
   would cause the tracking to fail on conversion.

* Remove use of `dag_to_circuit` from `cext`

We already make the assumption within all these passes that there are no
Python operations internally, so we can directly use the converter that
does not attempt to access `deepcopy`.

* Add whitespace between functions

78 of 80 new or added lines in 15 files covered. (97.5%)

4 existing lines in 3 files now uncovered.

99970 of 113638 relevant lines covered (87.97%)

1162665.43 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
90.23
-0.03% crates/circuit/src/circuit_data.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.23
-0.03% crates/circuit/src/circuit_data.rs
1
87.17
0.0% crates/circuit/src/parameter/parameter_expression.rs
2
91.52
0.51% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 21713493341.1 05 Feb 2026 02:05PM UTC 897
87.97
GitHub Action Run
Source Files on build 21713493341
  • Tree
  • List 897
  • Changed 19
  • Source Changed 15
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21713493341
  • bef290ec on github
  • Prev Build on gh-readonly-queue/main/pr-15651-cc675b6d3eecbb435a2749939c6f97047a246e09 (#21712964115)
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