Skip to content

⚡ Use compact scalar RL observations - #784

Closed
flowerthrower wants to merge 3 commits into
v3/674-normalized-featuresfrom
v3/compact-observation-encoding
Closed

flowerthrower wants to merge 3 commits into
v3/674-normalized-featuresfrom
v3/compact-observation-encoding

Conversation

@flowerthrower

@flowerthrower flowerthrower commented Aug 27, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Moves the compact scalar portion of #758 into its own stacked PR.

The num_qubits and depth RL observations become one-element float32 arrays in [0, 1]. Qubit count is scaled by the target device's qubit count; depth is log1p-scaled and capped at 999,999. Existing RL models must be retrained, and direct PredictorEnv observation consumers must handle the array values.

This PR is stacked on #758 and contains only the compact scalar encoding, its existing focused tests, and the corresponding changelog and upgrade-guide text.

Validated with uvx nox -s lint and the focused helper, environment-reset, and tracer tests (3 passed).

Related to #674

Part of #664

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the relevant local checks.
  • 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.

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
@flowerthrower
flowerthrower force-pushed the v3/compact-observation-encoding branch from a608bc9 to f514c31 Compare August 27, 2026 13:28
@flowerthrower flowerthrower added enhancement New feature or request major Part of a major release refactor PR or issues that refactor code labels Aug 27, 2026
@flowerthrower flowerthrower self-assigned this Aug 27, 2026
@flowerthrower

Copy link
Copy Markdown
Member Author

🤖 AI text below 🤖\n\nFolded back into the already-reviewed #758 observation PR.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mqt/predictor/rl/predictorenv.py 66.6% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant