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

Qiskit / qiskit / 11052142606

26 Sep 2024 11:29AM UTC coverage: 88.74% (-0.03%) from 88.765%
11052142606

push

github

web-flow
Deprecate the unit and duration attributes (#13224)

* Deprecate the unit and duration attributes

This commit deprecates the unit and duration attributes for
QuantumCircuit and Instruction. These attributes will be removed in
Qiskit 2.0 as they're not needed anymore and are adding a lot of
complexity to the circuit data model as they're mutable state and extra
memory slots that we need to keep around. The better model for tracking
instruction duration is in the Target as it's inherently a property of
the backend running the instructions.

For the unittests this commit globally ignores the deprecation warning
raised by this commit because internally we access the now deprecated
access quite frequently as we need to check it when adding instructions
to circuits to populate the rust data model.

* Apply suggestions from code review

Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>

---------

Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>

18 of 18 new or added lines in 2 files covered. (100.0%)

26 existing lines in 3 files now uncovered.

73819 of 83186 relevant lines covered (88.74%)

361914.13 hits per line

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

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