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

Qiskit / qiskit / 13503185103
88%

Build:
DEFAULT BRANCH: main
Ran 24 Feb 2025 05:08PM UTC
Jobs 1
Files 892
Run time 5min
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

24 Feb 2025 03:33PM UTC coverage: 87.959% (-0.2%) from 88.112%
13503185103

push

github

web-flow
Remove condition/c_if, duration, and unit from instructions (#13506)

* Remove condition/c_if, duration, and unit from instructions

This commit removes the per instruction attributes for condition,
duration, and unit. These attributes were deprecated in 1.3.0. Besides
the label these attributes were the only mutable state for singleton
instructions and removing them simplifies what needs to be tracked for
instructions in both Python and rust. The associated methods and classes
that were previously dependent on these attributes are also removed as
they no longer serve a purpose. The removal of condition in particular
removes a lot of logic from Qiskit especially from the transpiler
because it was a something that needed to be checked outside of the
normal data model for every operation.

This PR simplifies the representation of this extra mutable state in
Rust by removing the `ExtraInstructionAttributes` struct and replacing
it with a `Option<Box<String>>`. The `Option<Box<String>>` is used
instead of the simpler `Option<String>` because this this reduces the
size of the label field from 24 bytes for `Option<String>` to 8 bytes
for `Option<Box<String>>` with an extra layer of pointer indirection
and a second heap allocation. This will have runtime overhead when
labels are set, but because the vast majority of operations don't set
labels the tradeoff for optimizing for the None case makes more sense.
Another option would have been to use `Box<str>` here which is the
equivalent of `Box<[u8]>` (where `String` is the equivalent to
`Vec<u8>`) and from a runtime memory tradeoff would be a better
choice for this application if labels were commonly used as labels
aren't growable. But that requires 16 bytes instead of 8 and we'd be
wasting an additional 8 bytes for each instruction in the circuit which
isn't worth the cost.

* Update random_circuit

* Update more tests

* Fix new scheduling pass implementation

* Fix clippy::redundant_closure

* Add release no... (continued)

382 of 439 new or added lines in 80 files covered. (87.02%)

189 existing lines in 27 files now uncovered.

77738 of 88380 relevant lines covered (87.96%)

358570.45 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
77.34
-0.12% crates/circuit/src/dag_node.rs
1
94.21
-0.03% crates/circuit/src/packed_instruction.rs
1
74.05
0.0% qiskit/transpiler/passes/synthesis/unitary_synthesis.py
2
21.28
-1.64% qiskit/visualization/timeline/interface.py
3
81.91
0.21% crates/accelerate/src/target_transpiler/mod.rs
3
94.85
-2.3% qiskit/transpiler/passes/scheduling/padding/base_padding.py
3
84.72
2.57% qiskit/visualization/timeline/core.py
5
77.65
-0.4% qiskit/transpiler/passes/scheduling/alignments/reschedule.py
9
90.18
-1.31% qiskit/qpy/binary_io/circuits.py
29
86.31
-1.28% crates/circuit/src/dag_circuit.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.21
-0.03% crates/circuit/src/packed_instruction.rs
1
94.32
-0.5% qiskit/circuit/controlflow/builder.py
1
89.66
-0.49% qiskit/dagcircuit/dagdependency.py
1
96.55
-1.15% qiskit/primitives/base/validation.py
1
87.96
-0.46% qiskit/quantum_info/operators/symplectic/clifford_circuits.py
1
88.0
-4.0% qiskit/transpiler/passes/optimization/collect_cliffords.py
1
97.41
-0.86% qiskit/transpiler/passes/optimization/collect_multiqubit_blocks.py
1
95.24
-1.59% qiskit/transpiler/passes/optimization/commutative_inverse_cancellation.py
1
96.77
-3.23% qiskit/transpiler/passes/optimization/optimize_swap_before_measure.py
1
93.94
-0.28% qiskit/visualization/circuit/_utils.py
1
84.72
2.57% qiskit/visualization/timeline/core.py
2
83.53
-1.66% qiskit/dagcircuit/dagnode.py
2
96.51
-2.33% qiskit/primitives/backend_sampler.py
2
96.24
-0.75% qiskit/providers/basic_provider/basic_simulator.py
2
90.18
-1.31% qiskit/qpy/binary_io/circuits.py
2
90.3
-0.75% qiskit/transpiler/instruction_durations.py
4
91.98
0.0% crates/qasm2/src/lex.rs
4
96.07
-2.28% qiskit/dagcircuit/collect_blocks.py
5
50.0
-50.0% qiskit/transpiler/passes/scheduling/scheduling/set_io_latency.py
6
96.68
-0.46% crates/qasm2/src/parse.rs
6
73.47
-15.59% qiskit/circuit/instructionset.py
7
93.3
-0.49% qiskit/circuit/quantumcircuit.py
10
77.33
-13.33% qiskit/circuit/_classical_resource_map.py
14
93.66
-1.41% qiskit/visualization/circuit/text.py
17
93.18
-1.78% crates/circuit/src/circuit_data.rs
43
86.31
-1.28% crates/circuit/src/dag_circuit.rs
52
77.38
-15.48% qiskit/visualization/circuit/latex.py
Jobs
ID Job ID Ran Files Coverage
1 13503185103.1 24 Feb 2025 05:08PM UTC 892
87.96
GitHub Action Run
Source Files on build 13503185103
  • Tree
  • List 892
  • Changed 175
  • Source Changed 104
  • Coverage Changed 105
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13503185103
  • 6c7ee8fb on github
  • Prev Build on gh-readonly-queue/main/pr-13914-e4048320db76dcd738a36f5376628855d20e97b3 (#13497948212)
  • Next Build on main (#13503270954)
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