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

Qiskit / qiskit / 11221302818
89%
main: 88%

Build:
Build:
LAST BUILD BRANCH: substitute_pi4_rotations
DEFAULT BRANCH: main
Ran 07 Oct 2024 06:26PM UTC
Jobs 1
Files 895
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

07 Oct 2024 06:04PM UTC coverage: 88.868% (-0.03%) from 88.899%
11221302818

push

github

web-flow
Improve deprecation of unit and duration (#13247)

* Improve deprecation of unit and duration

The unit and duration attributes of QuantumCircuit and Instruction were
introduced in #13224 however the way the PR went about this was a bit to
abbreviated and it had several downsides. The most noticable was that it
introduced a significant runtime regression as the rust internals were
accessing the deprecated getter. This is fixed so that the rust code
doesn't try to access any deprecated attributes. However, more
importantly there were several edge cases not accoutned for in the PR.
Mainly, DAGCircuit's matching attribute were not deprecated, but then
also specific use cases of the attributes were not addressed. The
primary driver of the per instruction duration and unit were the
timeline visualization which didn't have a method to function without
these data attributes. This commit addresses this by adding a new
target argument that is used to provide a backend's target which is
the source of truth for durations in a post unit/duration `Instruction`.
The other notable edge case is the `Delay` instruction which will need
to retain the duration and unit attributes as the fields are integral
for that instruction. The `Delay` is updated to handle them explicitly
outside of the `Instrution` data model to avoid complications around the
deprecation.

* Apply suggestions from code review

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

* Fix lint

* Mention the target in constructor deprecation message

---------

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

73 of 92 new or added lines in 9 files covered. (79.35%)

25 existing lines in 5 files now uncovered.

74523 of 83858 relevant lines covered (88.87%)

372906.69 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
74.24
2.31% qiskit/circuit/delay.py
2
94.66
-0.64% qiskit/circuit/instruction.py
2
24.49
2.27% qiskit/visualization/timeline/interface.py
5
89.05
-0.22% crates/circuit/src/operations.rs
9
82.3
-3.21% qiskit/visualization/timeline/core.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.02
-0.24% crates/qasm2/src/expr.rs
2
88.26
-0.36% qiskit/transpiler/passes/synthesis/unitary_synthesis.py
5
92.48
-0.25% crates/qasm2/src/lex.rs
6
90.91
-4.55% qiskit/synthesis/two_qubit/xx_decompose/decomposer.py
11
75.94
-2.16% crates/circuit/src/circuit_instruction.rs
Jobs
ID Job ID Ran Files Coverage
1 11221302818.1 07 Oct 2024 06:26PM UTC 895
88.87
GitHub Action Run
Source Files on build 11221302818
  • Tree
  • List 895
  • Changed 72
  • Source Changed 9
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11221302818
  • ec3f8015 on github
  • Prev Build on gh-readonly-queue/main/pr-13282-42ff77b7ef46649e8491104778d573bd6b0f53fa (#11218290900)
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