Abstract:
To address the problem that the universality of Grover's algorithm is not ideal, a flexible quantum search algorithm was proposed in this paper. The flexibility of the proposed algorithm was manifested in three aspects. First, by designing quantum equilibrium superposition states containing any number of basis states, the construction method of unordered database of any size was given. Second, by solving the iterative equation of the algorithm, the quantitative relationship between the rotation phase and the success probability and the number of search steps was derived, where the rotation phase could take any value within (0, π. Third, through the statistical analysis of iteration steps and success probability, the optimal value of rotation phase was determined when the number of marked states was unknown, and the search scheme was designed. Finally, the numerical results of the probability of success and the number of iteration steps under different rotation phases and different numbers of marked states were investigated. The theoretical analysis shows that the proposed algorithm leads to a square-root speedup over the corresponding classical algorithm.