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

Qiskit / qiskit / 30011031078
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: peter/fix-16430-stateprep-inverse-width
DEFAULT BRANCH: main
Ran 23 Jul 2026 01:54PM UTC
Jobs 1
Files 953
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

23 Jul 2026 01:23PM UTC coverage: 87.582% (+0.02%) from 87.565%
30011031078

push

github

web-flow
Fix deadlock in Optimize1qGatesDecomposition (#16592)

* Fix deadlock in Optimize1qGatesDecomposition

This commit fixes an oversight in the new multithreaded
Optimize1qGatesDecomposition pass introduced in #15667 that could cause
a deadlock with the Python GIL when using custom 1q gates.
If there are custom gates defined in Python then we need Python
to get the matrix of that custom gate. However, when running in a
multithreaded context Python only allows one thread to interact with the
interpreter at a time via the GIL. When operating in parallel the pass
was not releasing the GIL from the parent thread running the pass. This
meant that the children threads would wait to acquire the GIL to call
Python but never be able to get the lock because the parent thread that
spawned it never released the GIL.

This commit fixes that issue by adding a dedicate entrypoint for calling
the pass via Python and having that entrypoint release the GIL prior to
launching an parallel threads. It then reacquires the GIL before
modifying the output DAG which might need Python for working with the
custom gates. This mirrors the pattern used in the other parallel passes
that work in a similar way such as `UnitarySynthesis` and
`TwoQubitPeepholeOptimization`.

Fixes #16591

* Fix clippy warning

58 of 71 new or added lines in 1 file covered. (81.69%)

9 existing lines in 3 files now uncovered.

113230 of 129285 relevant lines covered (87.58%)

997389.91 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
75.45
-1.47% crates/transpiler/src/passes/optimize_1q_gates_decomposition.rs

Coverage Regressions

Lines Coverage ∆ File
5
75.45
-1.47% crates/transpiler/src/passes/optimize_1q_gates_decomposition.rs
3
93.32
1.03% crates/qasm2/src/lex.rs
1
90.32
0.0% crates/circuit/src/parameter/parameter_expression.rs
Jobs
ID Job ID Ran Files Coverage
1 30011031078.1 23 Jul 2026 01:54PM UTC 953
87.58
GitHub Action Run
Source Files on build 30011031078
  • Tree
  • List 953
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30011031078
  • 2440bbb9 on github
  • Prev Build on gh-readonly-queue/main/pr-16637-9eacb5427cc51e9d479c2354d2c4a37e17689bbe (#30010113349)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc