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

Qiskit / qiskit / 21432054889
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: pbc_transformation
DEFAULT BRANCH: main
Ran 28 Jan 2026 09:49AM UTC
Jobs 1
Files 897
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

28 Jan 2026 09:10AM UTC coverage: 87.96% (-0.01%) from 87.973%
21432054889

push

github

web-flow
Combine Python types in PackedInstructions (#15277)

* Combine Python types in PackedInstructions

This commit migrates the 3 python variants in PackedOperation to be a
single variant. The 3 types PyGate, PyInstruction, and PyOperation are
very similar and are only separate for typing reasons. This commit moves
to only having a single struct and adding the typing information as an
enum that wraps that struct representation. This is then propogated to
the PackedInstruction type and move us from 3 separate fields in the
struct to just a single one. This frees up more space for other
operation types in the future. OperationRef keeps the distinct variants
for Gate, Instruction, and Operation. This simplifies the required
changes as most places interact with OperationRef instead of the owned
types.

The other motivation for this is as an early step towards fixing #14240.
This commit simplifies and consolidates the places that explicitly wrap
python usage in the circuit crate. This will make it easier to
conditionally compile things when we start to do that.

The other option considered was also moving to a single struct and setting
a `py_op_type` field inside the struct that was an enum to differentiate
the Python type. However, doing this inside the struct would require
significant changes to the usage of Python types in a circuit. Instead of
matching on the type off of OperationRef it would need to be a double
mapping first on OperationRef then on `py_op_type` field. Using the
outer enum prevents this and makes it a bit easier to match in places.

* Add missing alignment on PyOperationTypes

As we insert PyOperationTypes in the PackedInstruction we need to ensure
the alignment so that there are free bits to put the discriminant of the
PackedOperation in the u64. This was overlooked in earlier versions of
this PR branch and would have caused issues on other platforms
potentially.

* Fix typo in rebase

132 of 180 new or added lines in 22 files covered. (73.33%)

19 existing lines in 7 files now uncovered.

100003 of 113691 relevant lines covered (87.96%)

1163050.45 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
81.63
0.0% crates/circuit/src/circuit_instruction.rs
1
90.37
0.0% crates/synthesis/src/two_qubit_decompose.rs
2
93.3
-0.21% crates/circuit/src/packed_instruction.rs
2
93.91
-0.09% crates/qpy/src/circuit_writer.rs
7
85.39
-0.02% crates/circuit/src/dag_circuit.rs
12
69.6
-1.0% crates/circuit/src/dag_node.rs
23
81.47
-1.42% crates/transpiler/src/passes/basis_translator/mod.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
85.39
-0.02% crates/circuit/src/dag_circuit.rs
1
87.17
0.0% crates/circuit/src/parameter/parameter_expression.rs
1
72.95
-0.04% crates/circuit/src/parameter/symbol_expr.rs
1
93.91
-0.09% crates/qpy/src/circuit_writer.rs
4
81.47
-1.42% crates/transpiler/src/passes/basis_translator/mod.rs
5
91.52
-0.77% crates/qasm2/src/lex.rs
6
97.63
0.47% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 21432054889.1 28 Jan 2026 09:49AM UTC 897
87.96
GitHub Action Run
Source Files on build 21432054889
  • Tree
  • List 897
  • Changed 27
  • Source Changed 23
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21432054889
  • 7deafbfc on github
  • Prev Build on gh-readonly-queue/main/pr-15617-5a6fbbbca86b9f6c5b3d37f3008e133ba13373bc (#21427669842)
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