3 ms·
What about the data that is searched? Where would it be stored for a quantum computer to access it without losing all the speedup on IO?
by fauigerzigerk 17y ago
What about the data that is searched? Where would it be stored for a quantum computer to access it without losing all the speedup on IO?
- rdtsc 17y agoIdealy only an index would be searched. For example when a sorting algorithm is presented, typically we assume that items are just integers. So if the database itself is huge, one would take a column and feed that into the quantum computer along with a matching function and a search item and the output would be the position of the item in the column. In general it is assumed that 'items' are integers. That is general enough. But since no practical implementations exist, still we still don't know how it would work in the real world with a real database. Here is a more in depth (and somewhat dramatic) explanation: For N, items to be search, it would take log2(N) qubits (that's enough to represent all N states). The matching function would have to be a quantum gate/operator. In other words, matching is performed in the quantum world. The idea behind quantum algorithms is to encode the input in a set of qubits, then make them interact in a way that creates a superposition of states. A superposition of states can be thought of as sending the input into a 'magic' quantum world, where N qubits simoultaneously represent all 2^N binary states. Then a set of quantum operators (gates) are applied to the state vector, while it is still in this magic quantum world. All is fine and dandy (provided that we can mentain the whole quantum world in a stable/isolated state). Then the 'sad' part is that once we measure the result and bring it into the 'real' world, the whole 'magic' quantum world collapses on itself, and only one particular state out of 2^N emerges. The trick is then to apply the quantum operators such that the probability of the quantum world collapsing to one particular 2^N state is increased. In case of Grover's algorithm that is what happens. The quantum operators increase the probability of the quantum state collapsing to the matched index. It is a probabilistic algorithm in the sense that it might have to be run a couple of times. EDIT: removed stupid spelling errors