dftlib.transformer.rewrite_rules.try_using_specialized_gate

try_using_specialized_gate(dft: Dft, gate: DftElement) bool

Try to replace general gates by a more specialized version: - VOT-gate with threshold 1 is replaced by OR-gate - VOT-gate with threshold n is replaced by AND-gate - PDEP with probability 1 is replaced by FDEP - PDEP with probability 0 is removed :param dft: DFT. :param gate: Gate which can possibly be replaced. :return: True iff gate has been replaced.