I would like to know if there is a functionality in qiskit to simplify a sequence of gates in a QASM file. For example, say we have a sequence of two expensive (in fault-tolerant context) gates $TT$. Instead of executing an operation $TT$, it is preferable to re-express $TT$ with a single Clifford gate $S$, i.e., $TT=S$.
Is there a qiskit function that allows the mapping $TT \rightarrow S$ in a QASM file? Also, sequences like $HH$ etc could be simplified as well.