The performance of all-optical AND, OR, and NAND gates based on quantum dot semiconductor optical amplifiers (QDSOAs), which are either incorporated in properly configured Mach-Zehnder interferometer or combined with a delayed interferometer, is theoretically investigated at a data rate of 2 Tb/s when the nonlinear effect of two-photon absorption (TPA) is exploited in these active devices. The impact of the input signal and QDSOA key parameters on the quality factor (QF) is assessed. The obtained results indicate that these Boolean functions can be executed at 2 Tb/s with almost as twice as high QF than without TPA.