MLIR Passes v1.0
|
Go to the source code of this file.
Functions | |
template<typename T1 , typename T2 > | |
void | mqss::support::transforms::patternCancellation (mlir::Operation *currentOp, int nCtrlsOp1, int nTgtsOp1, int nCtrlsOp2, int nTgtsOp2) |
Function that removes (cancel) a pattern of two quantum operations under specific constraints. | |
Definition of the cancellation operation at MLIR level. Given a pattern specified by the template, the function will find the pattern and remove it from a given mlir module.
void mqss::support::transforms::patternCancellation | ( | mlir::Operation * | currentOp, |
int | nCtrlsOp1, | ||
int | nTgtsOp1, | ||
int | nCtrlsOp2, | ||
int | nTgtsOp2 ) |
Function that removes (cancel) a pattern of two quantum operations under specific constraints.
This function examines the current operation and tries to cancel two operations based on the number of control and target qubits they involve.
T1 | is the type of the first operation (e.g., a specific MLIR Op class). |
T2 | is the type of the second operation. |
[in] | currentOp | pointer to the current MLIR operation being analyzed. |
[in] | nCtrlsOp1 | number of control qubits in the first operation. |
[in] | nTgtsOp1 | number of target qubits in the first operation. |
[in] | nCtrlsOp2 | number of control qubits in the second operation. |
[in] | nTgtsOp2 | number of target qubits in the second operation. |