En esta respuesta , se explica el algoritmo de Grover. La explicación indica que el algoritmo depende en gran medida del operador de difusión Grover , pero no proporciona detalles sobre el funcionamiento interno de este operador.
Brevemente, el Operador de Difusión Grover crea una 'inversión sobre la media' para hacer iterativamente las pequeñas diferencias en los pasos anteriores lo suficientemente grandes como para ser medibles.
Las preguntas son ahora:
- ¿Cómo logra esto el operador de difusión Grover?
- ¿Por qué es la O resultante ( √en tiempo total para buscar una base de datos desordenada óptima?
algorithm
grovers-algorithm
Lagarto discreto
fuente
fuente
Respuestas:
Partimos de un estado inicial que es una superposición uniforme de todos los estados, y que son el objetivo de encontrar un estado| x⟩que puede ser reconocida como la respuesta correcta (suponiendo que no es exactamente uno de esos estados, aunque esto se puede generalizar). Para hacer esto, evolucionamos en el tiempo bajo la acción de un Hamiltoniano H=| x⟩⟨x| +| Psi⟩⟨Psi| . La característica realmente hermosa de la búsqueda de Grover es que en este punto, podemos reducir las matemáticas a un subespacio de solo dos estados
fuente
Escribiendo un estado|ψ⟩=α|+⟩+β∣∣+⊥⟩ where ∣∣+⊥⟩ is orthogonal to |+⟩ (i.e. ⟨+⊥∣+⟩=0) gives that D|ψ⟩=α|+⟩−β∣∣+⊥⟩ .
This gives2 that the diffusion operator is a reflection about|+⟩
As the other part of Grover's algorithm is also a reflection, these combine to rotate the current state closer to the 'searched-for' valuex0 . This angle decreases linearly with the number of rotations (until it overshoots the searched-for value), giving that the probability of correctly measuring the correct value increases quadratically.
Bennet et. al. showed that this is optimal. By taking a classical solution to an NP-problem, Grover's algorithm can be used to quadratically speed this up. However, taking a languageLA={y:∃xA(x)=y} for a length preserving function A (here, an oracle), any bounded-error oracle based quantum turing machine cannot accept this language in a time T(n)=o(2n/2) .
This is achieved by taking a set of oracles where|1⟩⊗n has no inverse (so is not contained in the language). However, this is contained in some new language LAy by definition. The difference in probabilities of a machine accepting LA and a different machine accepting LAy in time T(n) is then less than 1/3 and so neither language is accepted and Grover's algorithm is indeed asymptotically optimal.3
Zalka later showed that Grover's algorithm is exactly optimal.
1 In Grover's algorithm, minus signs can be moved round, so where the minus sign is, is somewhat arbitrary and doesn't necessarily have to be in the definition of the diffusion operator
2 alternatively, defining the diffusion operator without the minus sign gives a reflection about∣∣+⊥⟩
3 Defining the machine using the oracleA as MA and the machine using oracle Ay as MAy , this is a due to the fact that there is a set S of bit strings, where the states of MA and MAy at a time t are ϵ -close4, with a cardinality <2T2/ϵ2 . Each oracle where MA correctly decides if |1⟩⊗n is in LA can be mapped to 2n−Card(S) oracles where MA fails to correctly decide if |1⟩⊗n is in that oracle's language. However, it must give one of the other 2n−1 potential answers and so if T(n)=o(2n/2) , la máquina no puede determinar la pertenencia a LUN .
4 Usando la distancia euclidiana, el doble de la distancia de rastreo
fuente