fix(#41): Cost model uses per-qubit error rates when layout is provided - #92
Merged
Merged
Conversation
…ovided The _get_gate_fidelity method accepted a layout parameter but never used it, always returning average error rates regardless of which physical qubit a gate was mapped to. This meant per-qubit calibration data from the backend was effectively ignored for fidelity estimation. Fix: Add _get_gate_fidelity_for_qubit and _get_gate_fidelity_for_pair methods that look up specific error rates from device calibration data when available. Update estimate_gate_error to iterate over circuit instructions (not just count_ops) when layout-aware or per-qubit data is available, using the correct per-qubit/per-link rates. All 313 tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Fix
The
_get_gate_fidelitymethod accepted alayoutparameter but never used it, always returning average error rates regardless of which physical qubit a gate was mapped to. Per-qubit calibration data from the backend was effectively ignored.Fix:
_get_gate_fidelity_for_qubitand_get_gate_fidelity_for_pairmethods that look up specific error rates from device calibration dataestimate_gate_errorto iterate over circuit instructions (not just count_ops) when layout-aware or per-qubit data is availableAll 313 tests pass.