This is the documentation for developers of QTPM. The readers are supposed to be familiar with the concepts and the algorithm in [3].