Abstract:
A method for performing a Simon's or Shor's quantum algorithm over a function encoded with n qubits is provided. The method includes performing a superposition operation over a set of input vectors for generating a superposition vector, performing an entanglement operation for generating a corresponding entanglement vector, and performing an interference operation for generating a corresponding output vector. The superposition operation is carried out in a comparably fast manner by generating the superposition vector by identifying the non-null components thereof and by calculating, as a function of the n qubits, the value nulln/2 of all the non-null components of the superposition vector, and by calculating indices of these components according to an arithmetic succession. The seed of this calculation is 1 and the common difference is 2n. The method may be implemented in a quantum gate.