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

Qiskit / qiskit / 16153226506

08 Jul 2025 08:04PM UTC coverage: 87.761% (-0.007%) from 87.768%
16153226506

push

github

web-flow
Remove py token from the dag_to_circuit signature (#14707)

This commit remove the py token from the dag_to_circuit signature. This
enables calling this function from a standalone C context. The python
usage in the function only comes into play if there are Python defined
operations and we need to deepcopy them, or if there are any
ParameterExpression for an instruction which needs to clone it. Since
neither ParameterExpression or Python defined objects can exist in C we
can avoid the py usage in those paths. For the ParameterExpression path
since we have the py-clone feature enabled we can simply just replace
the clone_ref() call with a clone() call. This has extra overhead
equivalent to acquiring the gil explicitly but avoids the explicit
python usage. When we have ParameterExpression in Rust this usage
will continue to work because it will clone the rust object instead
of dispatching to Python under the covers.

9 of 9 new or added lines in 3 files covered. (100.0%)

13 existing lines in 2 files now uncovered.

81468 of 92829 relevant lines covered (87.76%)

547774.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.09
/crates/qasm2/src/parse.rs


Source Not Available

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