C implementation of target detection in PQFT model