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

Qiskit / qiskit / 24830209277
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: mergify/bp/stable/2.4/pr-16214
DEFAULT BRANCH: main
Ran 23 Apr 2026 10:56AM UTC
Jobs 1
Files 933
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

23 Apr 2026 10:27AM UTC coverage: 87.491% (-0.007%) from 87.498%
24830209277

push

github

web-flow
Add option to set the seed_transpiler from environment (#16001)

* Add option to set the seed_transpiler from environment

There are some use cases where being able to set the seed for
transpilation from the local environment is desireable. For example,
when a larger program is internally invoking the transpiler but that
program doesn't expose option for seeding the transpilation. However,
there was no simple mechanism to enable this previously. This commit
solves this by adding two options to enable this, the first is adding a
new field to the user configuration file ``transpiler_seed`` which when
set is used to set an alternative default seed (rather than the current
default of seeding from system entropy). This can be useful in
environments where you always want reproducible compilation by default.
Additionally, a new environment option ``QISKIT_TRANSPILER_SEED`` is
added in this PR which will enable users to set this environment
variable and when the transpiler is invoked it will use the set value
for the value of ``seed_transpiler``. Both of these are lower priority
mechanisms than setting the argument explicitly on transpiler() or
generate_preset_pass_manager(), but provide a mechanism for setting
alternative defaults from the environment using Qiskit rather than via
direct API calls to Qiskit.

At the same time this commit fixes a small oversight in the
generate_preset_pass_manager function where the
``transpile_optimization_level`` user configuration file option was not
respected by the generate_preset_pass_manager() function. Technically
this probably should have been a standalone commit but since it was only
2 lines ontop of the new feature in this PR I integrated it into this
PR. I can split it out if desired, especially if we want to backport
this to a stable release.

* Apply suggestions from code review

Co-authored-by: Luciano Bello <766693+1ucian0@users.noreply.github.com>

* Simplify the default logic for optimization_level

Co-author... (continued)

23 of 25 new or added lines in 3 files covered. (92.0%)

20 existing lines in 4 files now uncovered.

104711 of 119682 relevant lines covered (87.49%)

983926.1 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
97.47
-1.16% qiskit/compiler/transpiler.py
1
96.05
-0.5% qiskit/transpiler/preset_passmanagers/generate_preset_pass_manager.py

Coverage Regressions

Lines Coverage ∆ File
12
97.15
-0.47% crates/qasm2/src/parse.rs
6
92.29
-0.51% crates/qasm2/src/lex.rs
1
90.53
0.0% crates/circuit/src/parameter/parameter_expression.rs
1
94.71
-0.18% crates/transpiler/src/passes/unitary_synthesis/decomposers.rs
Jobs
ID Job ID Ran Files Coverage
1 24830209277.1 23 Apr 2026 10:56AM UTC 933
87.49
GitHub Action Run
Source Files on build 24830209277
  • Tree
  • List 933
  • Changed 7
  • Source Changed 3
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24830209277
  • 014e7c40 on github
  • Prev Build on gh-readonly-queue/main/pr-16066-424558164822382e5a7fe5ae5beae32bc31d1f48 (#24799547671)
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