Skip to content

fix(#47): 'adaptive' mitigation no longer silently becomes 'zne' - #99

Merged
Manideep3969 merged 1 commit into
mainfrom
fix/issue-47-adaptive-mitigation
Aug 20, 2026
Merged

fix(#47): 'adaptive' mitigation no longer silently becomes 'zne'#99
Manideep3969 merged 1 commit into
mainfrom
fix/issue-47-adaptive-mitigation

Conversation

@Manideep3969

Copy link
Copy Markdown
Owner

Fixes the silent conversion of mitigation='adaptive' to 'zne' in QCompiler.optimize(). Now AdaptiveErrorMitigation accepts 'adaptive' as a first-class method that resolves to ZNE with adaptive shot allocation. MitigationPlan and MitigationResult preserve the original method string. 3 regression tests added. All 344 tests pass.

OptimizerConfig defaults mitigation='adaptive' but QCompiler.optimize()
converted it to 'zne' before passing to AdaptiveErrorMitigation, making
the 'adaptive' option unreachable from the pipeline.

Fix: Make AdaptiveErrorMitigation.create_plan() accept 'adaptive' as
a method. Internally, 'adaptive' resolves to ZNE with adaptive shot
allocation. The MitigationPlan.method field preserves 'adaptive',
and MitigationResult.method reflects the original method. Remove the
silent conversion in transpiler.py.
@Manideep3969
Manideep3969 merged commit dbcfc98 into main Aug 20, 2026
4 checks passed
@Manideep3969
Manideep3969 deleted the fix/issue-47-adaptive-mitigation branch August 20, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant