Shenvi et al. have proposed a quantum algorithm based on quantum walking called Shenvi–Kempe–Whaley (SKW) algorithm, but this search algorithm can only search one target state and use a specific search target state vector. Therefore, when there are more than two target nodes in the search space, the algorithm has certain limitations. Even though a multi-objective SKW search algorithm was proposed later, when the number of target nodes is more than two, the SKW search algorithm cannot be mapped to the same quotient graph. In addition, the calculation of the optimal target state depends on the number of target states m. In previous studies, quantum computing and testing algorithms were used to solve this problem. But these solutions require more Oracle calls and cannot get a high accuracy rate. Therefore, to solve the above problems, we improve the multi-target quantum walk search algorithm, and construct a controllable quantum walk search algorithm under the condition of unknown number of target states. By dividing the Hilbert space into multiple subspaces, the accuracy of the search algorithm is improved from p
c = (1/2) – O(1/n) to p
c = 1 – O(1/n). And by adding detection gate phase, the algorithm can stop when the amplitude of the target state becomes the maximum for the first time, and the algorithm can always maintain the optimal number of iterations, so as to reduce the number of unnecessary iterations in the algorithm process and make the number of iterations reach
t
f
=
(
π
/
2
)
2
n
−
2
.