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

Qiskit / qiskit / 16324119569
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: substitute_pi4_rotations
DEFAULT BRANCH: main
Ran 16 Jul 2025 04:16PM UTC
Jobs 1
Files 830
Run time 3min
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

16 Jul 2025 03:46PM UTC coverage: 87.767% (+0.003%) from 87.764%
16324119569

push

github

web-flow
Directly use PackedOperation for two qubit decomposers (#14650)

* Directly use PackedOperation for two qubit decomposers

This commit reworks the rust code for the two qubit decomposers to
natively work with PackedOperation instead of doing
`Option<StandardGate>` to represent either a StadandardGate::CX gate
for cx based decomposition and `None` for any other gate used for the 2q
target. Prior to having a more complete circuit data model defined in
rust the two qubit decomposers were written using string identifiers
where 1q gates were represented by their names and 2q gates were either CX
or a sentinel value USER_GATE. This was because the
TwoQubitBasisDecomposer has a custom code path that is CX only, but the
other KAK gates used in the decomposer are generic. The USER_GATE string
was used to tell the python code which was constructing the circuit from
a gate sequence to use the gate instance stored in the python class
instead of something hard coded. This enabled standard gates and custom
gates.

However, since the two qubit decomposers were originally ported to Rust
the Rust side of Qiskit has grown significantly and we can now natively
build the circuit fully in Rust and represent all the operations. The
model used in the decomposers was then expanded to work with Rust native
gate representations but the same pattern using the sentinel value and
custom operation reconstruction in Python was still used. This mismatch
has caused confusion like as reported in #14418 but also hinders the
usage of the decomposers in other rust callers. For example, looking at
implementing #12213 we will need to work with the two qubit decomposer
directly in rust for the qsd implementation and working with gates
natively in rust will be necessary.

This commit migrates the custom sequene type used for the two qubit
decomposer to work natively with a PackedOperation and store all
operations used in the sequence. We can consider removing the custom
sequence type once th... (continued)

251 of 274 new or added lines in 5 files covered. (91.61%)

20 existing lines in 5 files now uncovered.

81477 of 92833 relevant lines covered (87.77%)

547711.19 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
93.23
-0.15% crates/transpiler/src/passes/unitary_synthesis.rs
20
91.1
0.6% crates/synthesis/src/two_qubit_decompose.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
91.1
0.6% crates/synthesis/src/two_qubit_decompose.rs
2
73.77
-0.08% crates/circuit/src/symbol_expr.rs
2
93.23
-0.15% crates/transpiler/src/passes/unitary_synthesis.rs
3
93.04
1.29% crates/qasm2/src/lex.rs
12
97.09
-0.47% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 16324119569.1 16 Jul 2025 04:16PM UTC 830
87.77
GitHub Action Run
Source Files on build 16324119569
  • Tree
  • List 830
  • Changed 9
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16324119569
  • e9c4b475 on github
  • Prev Build on gh-readonly-queue/main/pr-14736-d33ef5335e05523e35a29530dbc389c52c8e7bc7 (#16296905664)
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