[docs]classAsm(Operation):# type: ignore[misc]num_params=2# backend_name and asm_codenum_wires=0# acts as a directive, not on wirespar_domain="A"# "A" for anydef__init__(self,backend_name:str="",asm_code:str="",id:Any|None=None):super().__init__(backend_name,asm_code,wires=[],id=id)
# This is a workaround to enable Asm instructions with the pennylane-quantuminspire plugin.# The plugin only supports operations officially defined in Qiskit, and Asm is not one of them.# Since this is not officially supported, we manually register a custom mapping to make it work.PENNLYLANE_ASM_NAME=Asm().nameQISKIT_OPERATION_MAP[PENNLYLANE_ASM_NAME]=QiskitQIAsm