Analogously to the qco.if operation, we require a qco.index_switch op to represent switch-case statements. Because the QC dialect doesn't enforce linear typing, programs in the QC dialect can still use the scf.index_switch operation.
Resolving this issue includes tackling the following tasks:
- Define the operation in
QCOOps.td.
- Implement helper methods, analogously to the
qco.if operation.
- Implement the Conversion from QC to QCO.
- Implement the Conversion from QCO to QIR.
- Adapt the
WireIterator to support the newly added switch-op.
Each of these tasks may be a separate pull request.
Analogously to the
qco.ifoperation, we require aqco.index_switchop to represent switch-case statements. Because the QC dialect doesn't enforce linear typing, programs in the QC dialect can still use thescf.index_switchoperation.Resolving this issue includes tackling the following tasks:
QCOOps.td.qco.ifoperation.WireIteratorto support the newly added switch-op.Each of these tasks may be a separate pull request.