Skip to content

✨ Evaluate stochastic RL pass candidates - #757

Closed
flowerthrower wants to merge 24 commits into
v3/674-normalized-featuresfrom
v3/667-stochastic-actions
Closed

flowerthrower wants to merge 24 commits into
v3/674-normalized-featuresfrom
v3/667-stochastic-actions

Conversation

@flowerthrower

@flowerthrower flowerthrower commented Aug 12, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Evaluates repeated candidates for Qiskit RL actions marked as stochastic and retains the candidate with the best configured figure of merit. Candidates are translated to the target basis before scoring; supported scoring failures fall back to minimizing inserted SWAPs.

PredictorEnv.stochastic_action_trials configures the number of attempts and defaults to 20. QiskitSabreMapping and the SabreSwap action introduced by #785 use this path. A failed candidate does not abort the episode: the remaining attempts continue, and an all-failed run leaves the circuit unchanged. Pass and scoring timeouts are re-raised so the timeout layer can truncate immediately rather than continuing unbounded trials. Set the trial count to 1 to retain single-attempt selection.

This is position 9 of the stack. It depends on the timeout PR #789 and is followed by the GNN PR #788.

Validated with repository lint, focused RL checks, and direct pass- and scoring-timeout smokes.

Fixes #667

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for noteworthy behavior changes.
  • I have added migration instructions to the upgrade guide.
  • The changes follow the project's style guidelines and introduce no new warnings.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 59.57447% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mqt/predictor/rl/actions/qiskit_actions.py 64.2% 10 Missing ⚠️
src/mqt/predictor/rl/predictorenv.py 50.0% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@flowerthrower
flowerthrower force-pushed the v3/667-stochastic-actions branch 3 times, most recently from cb1e427 to fae3016 Compare August 21, 2026 15:55
@flowerthrower flowerthrower added enhancement New feature or request refactor PR or issues that refactor code major Part of a major release labels Aug 26, 2026
@flowerthrower flowerthrower self-assigned this Aug 26, 2026
@flowerthrower
flowerthrower force-pushed the v3/667-stochastic-actions branch from 5f9194f to aa8e530 Compare August 27, 2026 10:29
@flowerthrower
flowerthrower changed the base branch from v3/666-hybrid-mdp to v3/674-normalized-features August 27, 2026 10:29
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
@flowerthrower
flowerthrower force-pushed the v3/667-stochastic-actions branch from 303bb1e to b5e29bd Compare August 27, 2026 13:09
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
@flowerthrower
flowerthrower force-pushed the v3/667-stochastic-actions branch from b5e29bd to 3f75c42 Compare August 27, 2026 13:18
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Co-authored-by: Antonio Tudisco <anto.tu98@hotmail.it>

Assisted-by: GPT-5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-5.6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-5.6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
flowerthrower and others added 9 commits August 27, 2026 15:19
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-5 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-5 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
@flowerthrower
flowerthrower force-pushed the v3/667-stochastic-actions branch from 3f75c42 to b78feea Compare August 27, 2026 13:21
@flowerthrower flowerthrower changed the title 🎨 Add wrapper for stochastic passes ✨ Evaluate stochastic RL pass candidates Aug 27, 2026
@flowerthrower

Copy link
Copy Markdown
Member Author

🤖 AI text below 🤖

Superseded by #791 after reordering the stack; the implementation remains on the same head branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request major Part of a major release refactor PR or issues that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🎨 add wrapper for stochastic passes

1 participant