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

Qiskit / qiskit / 27031311489
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: bindgen-add-ctypes-union
DEFAULT BRANCH: main
Ran 05 Jun 2026 06:28PM UTC
Jobs 1
Files 946
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

05 Jun 2026 05:56PM UTC coverage: 87.448% (-0.03%) from 87.479%
27031311489

push

github

web-flow
Make Optimize1qGatesDecomposition multithreaded (#15567)

* Make Optimize1qGatesDecomposition multithreaded

This commit switches to make optimize1qgatesdecomposition a parallel
transpiler pass. After we collect the 1q runs in the dag the step of
computing the unitary matrix for each run and synthesizing it has no
data dependency and can be run in parallel without issue. However
updating the dag with synthesis results is still serial so there are
limits to how much can be parallelized here. Additionally, in the
previous serial version the target euler bases to try were computed
eagerly the first time a qubit with a run was encountered. This would
force a data dependency between the threads which either require
locking or precomputing the target bases, which is what this commit does.
This means that instantiating the pass object is slower and we're
potentially doing more work up front than is strictly necessary. However
this does have the advantage of being amortizable over multiple
executions of the pass which before it was not.

A quick experiment was run to determine that when there are roughly
100,000 runs to process (all runs of 20 gates) is the crossover point for the
parallel version vs the serial version. This was used to set a run count
that is used to select between a serial and parallel version of the algorithm.

* Rework eager pre-initialization to be lazy again

This commit reworks the change in logic from the previous commit to no
longer pre-compute the euler basis set for each qubit regardless of
whether it's used or not. The state object used to store the basis gates
and euler basis sets is kept as this enables more efficient patterns on
multiple runs of the pass. Now the state uses OnceLock to enable each
thread to lazily populate the state on the first run of a qubit. This
saves the construction time overhead if qubits never have runs but
keeps the advantages of reused state.

* Revert 100,000 crossover value and leave as TODO

In ear... (continued)

235 of 308 new or added lines in 5 files covered. (76.3%)

15 existing lines in 4 files now uncovered.

109259 of 124941 relevant lines covered (87.45%)

958338.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
73
76.86
-14.49% crates/transpiler/src/passes/optimize_1q_gates_decomposition.rs

Coverage Regressions

Lines Coverage ∆ File
8
73.93
-0.2% crates/circuit/src/parameter/symbol_expr.rs
3
91.77
-0.26% crates/qasm2/src/lex.rs
3
91.07
-0.39% crates/synthesis/src/euler_one_qubit_decomposer.rs
1
76.86
-14.49% crates/transpiler/src/passes/optimize_1q_gates_decomposition.rs
Jobs
ID Job ID Ran Files Coverage
1 27031311489.1 05 Jun 2026 06:28PM UTC 946
87.45
GitHub Action Run
Source Files on build 27031311489
  • Tree
  • List 946
  • Changed 10
  • Source Changed 5
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27031311489
  • 49eac272 on github
  • Prev Build on gh-readonly-queue/main/pr-16309-7f264660e48dcaa74f477c2f6c73e56adffb1e49 (#27013850133)
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