The Qiskit qasm2.load parser supports specifying a list of overrides for gates, which can be used to have custom classes represent OpenQASM-defined gates (rather than the parser's default constructor) or to specify built-in gates as extensions that are not seen in header files.
The OpenQASM 3 capabilities in Qiskit should have the same ability, so backends can tell us about their basis gates manually. Longer term, we will likely want more complete mechanisms for backends to supply us with specific header files that describe themselves, but that requires more synchronisation.
The Qiskit
qasm2.load
parser supports specifying a list of overrides for gates, which can be used to have custom classes represent OpenQASM-defined gates (rather than the parser's default constructor) or to specify built-in gates as extensions that are not seen in header files.The OpenQASM 3 capabilities in Qiskit should have the same ability, so backends can tell us about their basis gates manually. Longer term, we will likely want more complete mechanisms for backends to supply us with specific header files that describe themselves, but that requires more synchronisation.