In dieser Antwort wird der Algorithmus von Grover erklärt. Die Erklärung weist darauf hin, dass der Algorithmus stark vom Grover-Diffusionsoperator abhängt , jedoch keine Details zum Innenleben dieses Operators enthält.
Kurz gesagt, der Grover-Diffusionsoperator erzeugt eine 'Inversion über den Mittelwert', um iterativ die winzigen Unterschiede in früheren Schritten so groß zu machen, dass sie messbar sind.
Die Fragen sind jetzt:
- Wie erreicht der Grover-Diffusionsoperator dies?
- Warum ist das resultierende in der Gesamtzeit, um eine ungeordnete Datenbank optimal zu durchsuchen?
algorithm
grovers-algorithm
Diskrete Eidechse
quelle
quelle
Antworten:
Wir gehen von einem Anfangszustand , die eine gleichmäßige Überlagerung aller Staaten ist, und wir streben einen Zustand finden| x⟩die als die richtige Antwort erkannt werden kann (vorausgesetztes ist genau ein solcher Zustand, obwohl dies verallgemeinert werden kann). Dazu entwickeln wir uns im Laufe der Zeit unter der Wirkung eines Hamiltonschen H=| x⟩⟨x| +| & psgr;⟩⟨& psgr;| . Das wirklich schöne Merkmal von Grovers Suche ist, dass wir zu diesem Zeitpunkt die Mathematik auf einen Unterraum von nur zwei Zuständen reduzieren können
One caveat is the following: you could redefineH~=5H , and evolve using H~ and the evolution time would be 5 times shorter. If you wanted to be really radical, replace the 5 with 2n/2 , and Grover's search runs in constant time! But you're not allowed to do this arbitrarily. Any given experiment would have a fixed maximum coupling strength (i.e. a fixed multiplier). So, different experiments have different running times, but their scaling is the same, 2n/2 . It's just like saying that the gate cost in the circuit model is constant, rather than assuming that if we use a circuit of depth k each gate can be made to run in time 1/k .
The optimality proof essentially involves showing that if you made detection of one possible marked state|x⟩ any quicker, it would make detection of a different marked state, |y⟩ , slower. Since the algorithm should work equally well whichever state is marked, this solution is the best one.
quelle
One way of defining the diffusion operator is1D=−H⊗nU0H⊗n , where U0 is the phase oracle
This shows thatU0 can also be written as U0=I−2|0⊗n⟩⟨0⊗n| , giving
Writing a state|ψ⟩=α|+⟩+β∣∣+⊥⟩ 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) , the machine is unable to determine membership of LA .
4 Using the Euclidean distance, twice the trace distance
quelle