AbstractInstruction has a metaclass that helps group quil Instruction types under the AbstractInstruction umbrella for compatibility. However, this metaclass is causing any Instruction to be recognized as any subclass of AbstractInstruction. This can be misleading, since it's possible the Instruction's inner type doesn't match the subclass it's being checked against:
AbstractInstruction has a metaclass that helps group quil Instruction types under the AbstractInstruction umbrella for compatibility. However, this metaclass is causing any Instruction to be recognized as any subclass of AbstractInstruction. This can be misleading, since it's possible the Instruction's inner type doesn't match the subclass it's being checked against: