Skip to content

Commit

Permalink
update_from_instruction_schedule_map
Browse files Browse the repository at this point in the history
  • Loading branch information
to24toro committed Aug 17, 2023
1 parent b253d1c commit 609e238
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions qiskit/transpiler/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,8 @@ def update_from_instruction_schedule_map(self, inst_map, inst_name_map=None, err
props = None

entry = get_calibration(inst_name, qargs)
if entry.user_provided and getattr(props, "_calibration", None) != entry:
# It only copies user-provided calibration from the inst map.
# Backend defined entry must already exist in Target.

if getattr(props, "_calibration", None) != entry:
if self.dt is not None:
try:
duration = entry.get_schedule().duration * self.dt
Expand All @@ -516,11 +515,6 @@ def update_from_instruction_schedule_map(self, inst_map, inst_name_map=None, err
duration=duration,
calibration=entry,
)
else:
if props is None:
# Edge case. Calibration is backend defined, but this is not
# registered in the backend target. Ignore this entry.
continue
try:
# Update gate error if provided.
props.error = error_dict[inst_name][qargs]
Expand Down

0 comments on commit 609e238

Please sign in to comment.