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

Qiskit / qiskit / 25057111621
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: revert-15783-basis_translator_dag
DEFAULT BRANCH: main
Ran 28 Apr 2026 02:26PM UTC
Jobs 1
Files 933
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

28 Apr 2026 01:55PM UTC coverage: 87.581% (-0.001%) from 87.582%
25057111621

push

github

web-flow
Skip decomposer construction in consolidate blocks with force_consolidate (#16081)

* Skip decomposer construction in consolidate blocks with force_consolidate

In the recently merged #16075 a default decomposer was added to the
consolidate block pass if the `force_consolidate` flag was set. This was
intended to enable running the pass in the absence of the options
required to configure a decomposer. If the force consolidate flag is set
we don't need a two qubit decomposer configured since we're always going
to consolidate a 2q block of > 1 gate. However, that fix was incomplete
because we don't want to use a decomposer if force_consolidate is set to
True. The 2q decomposer is used to compute the number of basis gates for
a 2q decomposition of the unitary based on the unitary's coordinates in
the weyl chamber. This basis gate count is then used as a heuristic in
the pass on whether to consolidate the block to a UnitaryGate or not.
Specifically, if the number of basis gates for the weyl coordinates is
less than the number of basis gates in the block then we consolidate
the block into a `UnitaryGate`. With `force_consolidate=True` all of this
work, including the initialization of the decomposers (which isn't
free), is wasted since we know we're going to consolidate.

This commit adjusts the logic in the pass so that the decomposer is
set to None when `force_consolidate=True` and the pass skips all usage
of the decomposer internally when force_consolidate is set to True.

Internally the rust code of the pass isn't handling the interface as
ideally as I would like. The rust interface I'd like is to define
the decomposer interface as something like:

```rust
enum DecomposerInput {
    ForceConsolidate,
    Decomposer(DecomposerType),
}
```

and removing the dedicated force_consolidate argument to make the use
of a decomposer and force consolidate mutally exclusive.
However, this isn't compatible with the pyo3 boundary layer. Since the
inner function of con... (continued)

39 of 53 new or added lines in 2 files covered. (73.58%)

7 existing lines in 3 files now uncovered.

105025 of 119917 relevant lines covered (87.58%)

978401.01 hits per line

Uncovered Changes

Lines Coverage ∆ File
14
87.75
-2.16% crates/transpiler/src/passes/consolidate_blocks.rs

Coverage Regressions

Lines Coverage ∆ File
3
93.06
0.77% crates/qasm2/src/lex.rs
2
73.93
0.04% crates/circuit/src/parameter/symbol_expr.rs
2
96.88
-0.48% crates/transpiler/src/passes/unitary_synthesis/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 25057111621.1 28 Apr 2026 02:26PM UTC 933
87.58
GitHub Action Run
Source Files on build 25057111621
  • Tree
  • List 933
  • Changed 6
  • Source Changed 2
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25057111621
  • f29a504c on github
  • Prev Build on gh-readonly-queue/main/pr-15832-ac20c332726d734156d504d7b96ca44f30dc82a2 (#25038868248)
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