We present a novel quantum storage algorithm for k binary vectors of dimension m into a superposition of a m-qubit quantum state based on a permutation technique. We compare this algorithm to the storage algorithm proposed by Ventura and Martinez. The permutation technique is simpler and can lead to an additional reduction through the reduce algorithm. To retrieve a binary vector from the superposition of k vectors represented by a m-qubit quantum state, we must use a modified version of Grover’s algorithm, as Grover’s algorithm does not function correctly for non-uniform distributions. We introduce the permutation trick that enables an exhaustive search by Grover’s algorithm in O(k) steps for k patterns, independent of n=2m. We compare this trick to the Ventura and Martinez trick, which requires O(n) steps for k patterns
The problem of Grover's and Ventura's algorithms are not effective in any arbitrary amplitude distribution are studied.First,combining with the characteristics of quantum computing,a new algorithm is proposed and its amplitude dynamics with recursive function are analyzed.Further,a simulation with Matlab to compare the performance of three algorithms are made.Finally,the conclusion that the proposed algorithm can make up for Grover's and Ventura's deficiencies.If the value of m in advance is known,the appropriate algorithm to increase the probability of success can be seected.