Generalized quantum Turing machine and its use to find an algorithm solving NP-Complete problem