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

Qiskit / qiskit / 24831329790 / 1
87%
main: 87%

Build:
DEFAULT BRANCH: main
Ran 23 Apr 2026 11:24AM UTC
Files 933
Run time 42s
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.487% (-0.01%) from 87.498%
24831329790.1

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)

104706 of 119682 relevant lines covered (87.49%)

983845.66 hits per line

Source Files on job 24831329790.1
  • Tree
  • List 933
  • Changed 7
  • Source Changed 3
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24831329790
  • 014e7c40 on github
  • Prev Job for on main (#24799547671.1)
  • Next Job for on main (#24835962931.1)
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