Qiskit / qiskit-qasm3-import

Importer from OpenQASM 3 to Qiskit's QuantumCircuit
https://qiskit.github.io/qiskit-qasm3-import
Apache License 2.0
15 stars 7 forks source link

Allow custom built-in gate specification #15

Open jakelishman opened 1 year ago

jakelishman commented 1 year ago

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.