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

Qiskit / qiskit / 15206040484

23 May 2025 08:36AM UTC coverage: 88.327% (-0.007%) from 88.334%
15206040484

push

github

web-flow
Remove DT from C API for adding delays (#14374)

* Remove DT from C API for adding delays

The C API for adding delay only handled the case of floating point
values for the delay. However one of the available units was dt. This
isn't actually correct usage because dt is represented by an integer
value not a floating point. While this is expressible in the data model
it violates the expectations of the delay operation and likely would
have caused unexpected behavior when the circuit is used elsewhere.
Right now the rust data model doesn't natively model the integer
duration because it's not a valid variant on the Param enum, so the
delay instruction is modeling it by wrapping it in a PyObject. To
express dt unit delays from the C API we will need to store ints in
Rust before we can add this to the API. After we do this then we'll
probably want to add a new function qk_circuit_delay_dt() to represent
the different typing. This is similar to what will need to happen for
representing stretch durations from C as well.

Also since we haven't released the C API for circuits we didn't need a
dedicated release note because this is all part of the new feature for
exposing circuits to the C API. Having individual release notes for each
new function is a bit redudant. The new function is definitely very
important but we just didn't need a dedicated release note entry for it.

* Remove dt usage from unit tests

78469 of 88839 relevant lines covered (88.33%)

466705.2 hits per line

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

97.61
/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

© 2025 Coveralls, Inc