Skip to content

Add LegacyPolicyLoopStrategy and shared legacy patch utilities#18

Merged
Bol-C14 merged 1 commit intodev-feat-interactive-optimizationfrom
codex/add-new-strategy-in-eesizer_core
Jan 30, 2026
Merged

Add LegacyPolicyLoopStrategy and shared legacy patch utilities#18
Bol-C14 merged 1 commit intodev-feat-interactive-optimizationfrom
codex/add-new-strategy-in-eesizer_core

Conversation

@Bol-C14
Copy link
Copy Markdown
Owner

@Bol-C14 Bol-C14 commented Jan 30, 2026

Motivation

  • Support legacy workflows that supply either structured patch plans or full-netlist suggestions by mapping them into safe, param-only patches and running them through the unified attempt pipeline.
  • Keep topology/guard invariants, stop reasons, and sim_runs accounting consistent with existing strategies and legacy reporting formats.

Description

  • Add LegacyPolicyLoopStrategy in src/eesizer_core/strategies/legacy_policy_loop.py to run legacy-mapped CircuitSpecs with either an explicit legacy_patch_plan or a configurable policy, reusing attempt_pipeline.run_attempt and the standard guard chain and measurement flow.
  • Factor legacy parsing/conversion helpers into src/eesizer_core/strategies/legacy_patch_utils.py providing extract_patch_plan, parse_patch_step, netlist_to_patch, and guard_failure_report to convert netlist-style steps into parameter-only Patch ops and to centralize validation logic.
  • Refactor legacy_patch_plan to use the new utilities (extract_patch_plan, parse_patch_step, netlist_to_patch, guard_failure_report) instead of duplicate parsing logic, and export the new strategy from src/eesizer_core/strategies/__init__.py.
  • Add docs: docs/devlog/2026-02-11_0900_legacy_policy_loop_strategy.md describing behavior and usage; preserve legacy-compatible history/report outputs via the existing LegacyReportOperator and manifest entries.

Testing

  • No automated tests were executed as part of this change (no test run requested).

Codex Task

@Bol-C14 Bol-C14 merged commit 89eb575 into dev-feat-interactive-optimization Jan 30, 2026
1 check failed
@Bol-C14 Bol-C14 deleted the codex/add-new-strategy-in-eesizer_core branch January 30, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant