MLIR Passes v1.0
|
Go to the source code of this file.
Functions | |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
void | mqss::support::transforms::patternSwitch (mlir::Operation *currentOp) |
Detects and rewrites a pattern of four quantum operations. | |
Definition of the switch operation. This function is only valid for two qubit gates. Given a pattern using the template, the function will find the pattern and perform a switch operation.
void mqss::support::transforms::patternSwitch | ( | mlir::Operation * | currentOp | ) |
Detects and rewrites a pattern of four quantum operations.
Finds the pattern composed of T1, T2 and switches them and assigns the types T3, and T4. Targets and controls should be the same on both. This only works at the moment for single qubit gates
T1 | Type of the first operation in the pattern. |
T2 | Type of the second operation in the pattern. |
T3 | Type of the third operation in the pattern. |
T4 | Type of the fourth operation in the pattern. |
currentOp | The MLIR operation from which the pattern search begins. |