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

Qiskit / qiskit / 30016770968
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: patch-lcov-errors
DEFAULT BRANCH: main
Ran 23 Jul 2026 03:11PM UTC
Jobs 1
Files 950
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 02:13PM UTC coverage: 87.622% (-0.01%) from 87.636%
30016770968

push

github

web-flow
Fix deadlock in Optimize1qGatesDecomposition (#16592) (#16645)

* 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

(cherry picked from commit 2440bbb99)

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

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

27 existing lines in 5 files now uncovered.

112826 of 128764 relevant lines covered (87.62%)

995464.79 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
74.65
-1.4% crates/transpiler/src/passes/optimize_1q_gates_decomposition.rs

Coverage Regressions

Lines Coverage ∆ File
8
74.02
-0.29% crates/circuit/src/parameter/symbol_expr.rs
7
91.26
-1.29% crates/qasm2/src/lex.rs
6
97.63
0.47% crates/qasm2/src/parse.rs
5
74.65
-1.4% crates/transpiler/src/passes/optimize_1q_gates_decomposition.rs
1
90.36
0.0% crates/circuit/src/parameter/parameter_expression.rs
Jobs
ID Job ID Ran Files Coverage
1 30016770968.1 23 Jul 2026 03:11PM UTC 950
87.62
GitHub Action Run
Source Files on build 30016770968
  • Tree
  • List 950
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30016770968
  • c1cdd3f3 on github
  • Prev Build on gh-readonly-queue/stable/2.5/pr-16635-4f899498a002b7f717c44a48b99c7f8e9ce1804d (#29876559943)
  • Next Build on stable/2.5 (#30019206697)
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