🐛 Make RL sampling and Qiskit actions user-seedable - #797
Draft
flowerthrower wants to merge 2 commits into
Draft
flowerthrower wants to merge 2 commits into
flowerthrower wants to merge 2 commits into
Conversation
12 tasks
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
from
August 27, 2026 14:46
161f01b to
af74f07
Compare
flowerthrower
force-pushed
the
v3/paper-tket-passes
branch
from
August 27, 2026 14:46
da0271e to
629877d
Compare
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
from
August 27, 2026 15:02
af74f07 to
261f5b6
Compare
flowerthrower
force-pushed
the
v3/paper-tket-passes
branch
2 times, most recently
from
August 27, 2026 15:07
1ce6b4f to
65c9d98
Compare
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
from
August 27, 2026 15:07
261f5b6 to
d37a988
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
12 tasks
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
from
August 28, 2026 07:29
d37a988 to
71115b6
Compare
12 tasks
flowerthrower
force-pushed
the
v3/paper-tket-passes
branch
from
August 28, 2026 07:51
65c9d98 to
7c4a965
Compare
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
2 times, most recently
from
August 28, 2026 08:13
5a8e054 to
bb645a9
Compare
flowerthrower
force-pushed
the
v3/paper-tket-passes
branch
2 times, most recently
from
August 28, 2026 08:30
3853b60 to
2ba8e5a
Compare
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
from
August 28, 2026 08:30
bb645a9 to
7fe4c45
Compare
flowerthrower
force-pushed
the
v3/paper-tket-passes
branch
from
August 28, 2026 08:45
2ba8e5a to
7126f5c
Compare
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
from
August 28, 2026 09:57
7fe4c45 to
47f02c1
Compare
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com> Assisted-by: GPT 5.6 via Codex
flowerthrower
force-pushed
the
v3/paper-tket-passes
branch
from
August 28, 2026 10:18
7126f5c to
eba24fd
Compare
flowerthrower
force-pushed
the
v3/reproducible-rl-seeding
branch
from
August 28, 2026 10:18
47f02c1 to
144229c
Compare
Assisted-by: GPT-5.6 via Codex Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com> Assisted-by: GPT 5.6 via Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Description
Makes RL training-circuit sampling, seeded inference, and Qiskit's randomized
passes reproducible only when the user supplies a seed.
On a fresh environment,
reset()uses Gymnasium's entropy-seeded generator forcircuit sampling and passes no seed to Qiskit. Native pass settings therefore
remain unchanged, including SABRE's CPU-dependent trial defaults.
Predictor.train_model(seed=...)andPredictorEnv.reset(seed=...)opt intoreproducible mode: they control circuit selection and supply derived native
seeds to
QiskitSabreMapping,SabreSwap,VF2Layout, andVF2PostLayout.Later seedless resets continue the initialized Gymnasium RNG stream, matching
Gymnasium and Stable-Baselines3.
Seeded SABRE execution uses one native layout and swap trial so results do not
depend on CPU-count-based defaults. Candidate QASM paths are sorted before
indexed selection.
compile_as_predictedretains stochastic policy and nativepass behavior by default; supplying
seed=...selects deterministic maskedargmax inference and reproducibly seeds randomized Qiskit actions.
This does not add the repeated figure-of-merit-aware wrapper tracked in #667,
change BQSKit's established fixed pass seed, or alter unrelated ML estimators.
This is position 6 of the stack. It depends on #796 and is followed by #798. No
new package dependencies are introduced.
Part of #664
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).