From 9b4f56c0d9e954fbe2b8036a6d69ec48b6c49e5b Mon Sep 17 00:00:00 2001 From: to24toro Date: Tue, 22 Aug 2023 16:23:57 +0900 Subject: [PATCH] fixup! update_from_instruction_schedule_map --- qiskit/transpiler/target.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qiskit/transpiler/target.py b/qiskit/transpiler/target.py index e2d573a46efe..4ca5d0dc20a6 100644 --- a/qiskit/transpiler/target.py +++ b/qiskit/transpiler/target.py @@ -486,7 +486,6 @@ def update_from_instruction_schedule_map(self, inst_map, inst_name_map=None, err qiskit_inst_name_map = get_standard_gate_name_mapping() if inst_name_map is not None: qiskit_inst_name_map.update(inst_name_map) - for inst_name in inst_map.instructions: # Prepare dictionary of instruction properties out_props = {} @@ -501,8 +500,9 @@ def update_from_instruction_schedule_map(self, inst_map, inst_name_map=None, err props = None entry = get_calibration(inst_name, qargs) - if getattr(props, "_calibration", None) != entry: + if not entry.user_provided: + continue if self.dt is not None: try: duration = entry.get_schedule().duration * self.dt