Target.instruction_schedule_map().has_custom_gate()
always returns True
#9595
Labels
bug
Something isn't working
mod: pulse
Related to the Pulse module
performance
stable backport potential
The bug might be minimal and/or import enough to be port to stable
Milestone
Environment
What is happening?
When using the
InstructionScheduleMap
returned from a Target object's (specifically from a FakeBackend object, but I think this occurs generally).instruction_schedule_map()
method the.has_custom_gate()
method is always returning True. This wasn't the case pre-0.23.0 (and I expect means this is related to #8885 ). This leads to a transpiler performance regression because the transpiler thinks we need to evaluate pulse gates despite not having a custom calibration set.How can we reproduce the issue?
What should happen?
The above code snippet should not raise an assertion error because no custom gates are defined in the instruction schedule map.
Any suggestions?
I think this is being caused by a type mismatch and differing expectations between the
Target
/BackendV2
path and theInstructionScheduleMap
class. I originally thought this was just a case of a differing type being used in the target path post-#8885 to represent the default calibration from the defaults file now that we're lazy loading it. But looking at it a bit more closely theInstructionScheduleMap
's entries from the fake backend are allScheduleDef
which would be the same as a manually createdSchedule
object. I"m not sure the best way to resolve this though.The text was updated successfully, but these errors were encountered: