Issue
cost_model.py:207-212 — For a circuit with N gates, _get_gate_fidelity is called N times, each time computing averages from the device dictionaries. These averages should be computed once and cached.
Fix
Cache the average error rates in DeviceCharacterization or compute them once in CostModel.__init__.
Issue
cost_model.py:207-212— For a circuit with N gates,_get_gate_fidelityis called N times, each time computing averages from the device dictionaries. These averages should be computed once and cached.Fix
Cache the average error rates in
DeviceCharacterizationor compute them once inCostModel.__init__.