EMRG v0.5.0
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]usingyaml.safe_load(). - Added CLI commands:
emrg policy init PATH,emrg policy validate PATH, andemrg generate QASM --policy PATH. - Added Python API exports:
DEFAULT_POLICY,RecipePolicy,load_policy,policy_to_dict, andsave_policy. - Added
generate_recipe(..., policy=...),recommend(..., policy=...), andMitigationRecipe.to_dict()for structured recipe serialization. - Preserved forced-technique warning semantics and clean
analyze --jsonoutput.
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 -rapassed: 477 tests.pytest --cov=emrg --cov-report=term-missingpassed: 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.