Closed 1tnguyen closed 3 years ago
When applying ctrl @ on elementary gates, we can directly look up the corresponding two-qubit gate.
ctrl @
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.
qir-qrt.hpp
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.