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

Qiskit / qiskit / 21143985748
88%

Build:
DEFAULT BRANCH: main
Ran 19 Jan 2026 04:33PM 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

19 Jan 2026 03:34PM UTC coverage: 87.93% (-0.01%) from 87.943%
21143985748

push

github

web-flow
Rewrite default `UnitarySynthesis` to cache decomposers (#15492)

* Rewrite default `UnitarySynthesis` to cache decomposers

This is a complete rewrite of the default `UnitarySynthesis` plugin to
vastly improve the efficiency of 2q decomposition.

This is good for approximately a 2x runtime improvement in the
`UnitarySynthesis` pass, since before this commit, we were
reconstructing each relevant 2q decomposer each time we had a new matrix
to decompose.  However, constructing a 2q KAK decomposer is about as
expensive as using a constructed KAK decomposer on a single matrix.
This commit caches the available decomposers for each encountered pair
of qubits, and allows the cache to be persisted between calls to
`run_unitary_synthesis`.

Before the move of the default unitary synthesis plugin to Rust, we
effectively had decomposer caching for the "loose constraint" (basis
gates + coupling map) hardware description, since we just chose a single
decomposer on initialisation and used it throughout.  The `Target` form
in Python space cached at the `qargs` level, which meant that multiple
unitaries on the same qargs pair would use the same set of decomposers,
but each qargs pair would be calculated separately on first access,
still (generally) leading to multiple constructions of the same
decomposer.  Both of these types of caching were lost in the move to
Rust, but the effects were largely masked by the total runtime still
being drastically better than the Python-space versions.

This new form reinstates all the previous caching, and additionally
caches at the level of individual decomposer construction as well (by
caching the arguments used to construct a decomposer), so that (mostly)
homogeneous `Target`s will re-use the same decomposer whenever it is
valid on more than one 2q link.

* Give synthesis/state structs explicit names

There's lots of types of "synthesis" in Qiskit...

* Correct copyright years

* Avoid magic numbers in `ApproximationDegree::is_app... (continued)

1040 of 1085 new or added lines in 11 files covered. (95.85%)

58 existing lines in 9 files now uncovered.

100108 of 113850 relevant lines covered (87.93%)

1160107.18 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
87.29
0.03% crates/circuit/src/operations.rs
2
93.51
-0.32% crates/circuit/src/packed_instruction.rs
3
94.01
0.62% crates/transpiler/src/transpiler.rs
7
85.29
-0.08% crates/circuit/src/dag_circuit.rs
11
97.2
crates/transpiler/src/passes/unitary_synthesis/mod.rs
21
96.2
crates/transpiler/src/passes/unitary_synthesis/decomposers.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
87.09
0.0% crates/circuit/src/parameter/parameter_expression.rs
1
73.33
0.33% crates/circuit/src/parameter/symbol_expr.rs
1
93.82
-0.24% crates/qasm2/src/expr.rs
2
89.23
-1.54% qiskit/synthesis/two_qubit/xx_decompose/decomposer.py
4
94.01
0.62% crates/transpiler/src/transpiler.rs
6
97.56
-0.47% crates/qasm2/src/parse.rs
7
91.77
-1.03% crates/qasm2/src/lex.rs
10
90.37
-0.46% crates/synthesis/src/two_qubit_decompose.rs
26
82.62
-2.35% crates/transpiler/src/target/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 21143985748.1 19 Jan 2026 04:33PM UTC 897
87.93
GitHub Action Run
Source Files on build 21143985748
  • Tree
  • List 897
  • Changed 17
  • Source Changed 11
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21143985748
  • 0b8bceb0 on github
  • Prev Build on gh-readonly-queue/main/pr-15585-654cb87bd9816410ed190408040eda0bd67d6b78 (#21139050787)
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