[OpenQASM3] Support auto-gen of ctrl-modifed gates
1tnguyen opened this issue · 0 comments
1tnguyen commented
When applying ctrl @
on elementary gates, we can directly look up the corresponding two-qubit gate.
See the code comment here:
https://github.com/ORNL-QCI/qcor/blob/e0a66e1bbd500e1a788cfff49edbf9a3d0bb73ca/mlir/parsers/qasm3/visitor_handlers/quantum_instruction_handler.cpp#L477
Note: currently, we only expose CNOT, SWAP, and CPHASE in the QIR runtime (see qir-qrt.hpp
). We may need to add other controlled gates, such as CZ, CH, etc.