Skip to content

EMRG v0.5.0

Choose a tag to compare

@FedorShind FedorShind released this 14 May 08:45
· 25 commits to main since this release

EMRG 0.5.0 adds policy-configurable heuristics while preserving the existing default recommendation behavior.

Highlights

  • Added strict version-1 JSON policy support for heuristic thresholds, technique availability, budgets, ZNE factory profiles, scaling methods, PEC samples/noise level, CDR training counts, and composite limits.
  • Added optional YAML policy support through emrg[config] using yaml.safe_load().
  • Added CLI commands: emrg policy init PATH, emrg policy validate PATH, and emrg generate QASM --policy PATH.
  • Added Python API exports: DEFAULT_POLICY, RecipePolicy, load_policy, policy_to_dict, and save_policy.
  • Added generate_recipe(..., policy=...), recommend(..., policy=...), and MitigationRecipe.to_dict() for structured recipe serialization.
  • Preserved forced-technique warning semantics and clean analyze --json output.

Compatibility

  • Default behavior is unchanged when no policy is supplied.
  • JSON policy files work with the base install.
  • YAML policy files require pip install emrg[config].
  • Policy files configure existing EMRG behavior; they do not execute Python or load dynamic imports.

Validation

  • ruff check . passed.
  • ruff format --check . passed.
  • pytest -ra passed: 477 tests.
  • pytest --cov=emrg --cov-report=term-missing passed: 96% coverage.
  • CLI smoke passed for version, policy init, policy validate, generate with policy, and analyze JSON.
  • Benchmarks ran successfully; README benchmark tables were not updated because the fresh run was not uniformly better than the existing snapshot.