Skip to main content
deleted 13 characters in body
Source Link
glS
  • 26.9k
  • 6
  • 35
  • 121

This is already partially discussed in this related question, but I'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a querying operation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information the database attaches to $i$.

You can think of $f(x_i)$ as "asking a question about $x_i$". For example, this question may be "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I also gain knowledge which was not used to build the oracle.

However, in many proof of principle implementations of Grover's algorithm, like the one you show, this is not the case. Indeed, in these demonstrationdemonstrations the question that is being asked is "trivial", in the sense that $x_i=i$, and the question is of the form "is $x_i$ equal to 3?".

In such a case, the algorithm is indeed not particularly useful in that the answer has to be hardcoded into the oracle, but this isneeds not be the case in general.

This is already partially discussed in this related question, but I'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a querying operation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information the database attaches to $i$.

You can think of $f(x_i)$ as asking a question about $x_i$". For example, this question may be "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I also gain knowledge which was not used to build the oracle.

However, in many proof of principle implementations of Grover's algorithm, like the one you show, this is not the case. Indeed, in these demonstration the question that is being asked is "trivial", in the sense that $x_i=i$, and the question is of the form "is $x_i$ equal to 3?".

In such a case, the algorithm is indeed not particularly useful in that the answer has to be hardcoded into the oracle, but this is not the case in general.

This is already partially discussed in this related question, but I'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a querying operation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information the database attaches to $i$.

You can think of $f(x_i)$ as "asking a question about $x_i$". For example, "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I also gain knowledge which was not used to build the oracle.

However, in many proof of principle implementations of Grover's algorithm, like the one you show, this is not the case. Indeed, in these demonstrations the question that is being asked is "trivial", in the sense that $x_i=i$, and the question is of the form "is $x_i$ equal to 3?".

In such a case, the algorithm is indeed not particularly useful in that the answer has to be hardcoded into the oracle, but this needs not be the case in general.

added 5 characters in body
Source Link
glS
  • 26.9k
  • 6
  • 35
  • 121

This is already partially discussed in this related question, but I'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a querying operation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information the database attaches to $i$.

You can think of $f(x_i)$ as asking a question about $x_i$". For example, this question may be "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I also gain knowledge which was not used to build the oracle.

However, in many proof of principle implementations of Grover's algorithm, like the one you show, this is not the case. Indeed, in these demonstration the question that is being asked is "trivial", in the sense that $x_i=i$, and the question is of the form "is $x_i$ equal to 3?".

In such a case, the algorithm is indeed not particularly useful in that the answer has to be hardcoded into the oracle, but this is not the case in general.

This is already partially discussed in this related question, but I'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a querying operation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information the database attaches to $i$.

You can think of $f(x_i)$ as asking a question about $x_i$". For example, this question may be "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I gain knowledge which was not used to build the oracle.

However, in many proof of principle implementations of Grover's algorithm, like the one you show, this is not the case. Indeed, in these demonstration the question that is being asked is "trivial", in the sense that $x_i=i$, and the question is of the form "is $x_i$ equal to 3?".

In such a case, the algorithm is indeed not particularly useful in that the answer has to be hardcoded into the oracle, but this is not the case in general.

This is already partially discussed in this related question, but I'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a querying operation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information the database attaches to $i$.

You can think of $f(x_i)$ as asking a question about $x_i$". For example, this question may be "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I also gain knowledge which was not used to build the oracle.

However, in many proof of principle implementations of Grover's algorithm, like the one you show, this is not the case. Indeed, in these demonstration the question that is being asked is "trivial", in the sense that $x_i=i$, and the question is of the form "is $x_i$ equal to 3?".

In such a case, the algorithm is indeed not particularly useful in that the answer has to be hardcoded into the oracle, but this is not the case in general.

Post Undeleted by glS
added 552 characters in body
Source Link
glS
  • 26.9k
  • 6
  • 35
  • 121

as I understand, the oracle actually searches for one of the indices of the dataset (represented by the superposition of the 3 qubits), and furthermore, the oracle is "hardcoded" for which index it should look for.

Not exactly. The oracleThis is hardcoded to look for "red"already partially discussed in this related question, but itI'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a does notquerying have anyoperation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information about the database attaches to $i$.

You can think of $f(x_i)$ as indexasking a question about $x_i$ corresponding". For example, this question may be "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to "red"note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I gain knowledge which was not used to build the oracle.

SureHowever, in many proof of principle implementations of Grover's algorithm, like the one you show, this is still not a very useful scenario, but thinks about the case. Indeed, in whichthese demonstration the "red" instancequestion that is attached to some other useful information (like a phone numberbeing asked is "trivial", or whatever you might be interested in). Then, you can build an oracle the sense that is only hardcoded to look for color=red$x_i=i$, and the solution will be an index inquestion is of the databaseform "is $x_i$ equal to 3?".

In such a case, to which some other useful informationthe algorithm is also attached. You can likely see how this kind of scenario canindeed not particularly useful in that the answer has to be of practical usehardcoded into the oracle, but this is not the case in general.

as I understand, the oracle actually searches for one of the indices of the dataset (represented by the superposition of the 3 qubits), and furthermore, the oracle is "hardcoded" for which index it should look for.

Not exactly. The oracle is hardcoded to look for "red", but it does not have any information about the index corresponding to "red".

Sure, this is still not a very useful scenario, but thinks about the case in which the "red" instance is attached to some other useful information (like a phone number, or whatever you might be interested in). Then, you can build an oracle that is only hardcoded to look for color=red, and the solution will be an index in the database, to which some other useful information is also attached. You can likely see how this kind of scenario can be of practical use.

This is already partially discussed in this related question, but I'll try here to address more specifically some of the issues you rise.

Generally speaking, Grover's algorithm rests upon the assumption that one is able to perform a querying operation of the form $$|i\rangle\mapsto(-1)^{f(x_i)}|i\rangle,$$ where $i$ is the index in the database, and $x_i$ whatever information the database attaches to $i$.

You can think of $f(x_i)$ as asking a question about $x_i$". For example, this question may be "is $x_i$ a prime number?", or "does $x_i$ have property $P$?", where $P$ could mean "being red".

It is important to note that $f$ could be asking a question which does not fully characterize $x_i$. This means that after I run the algorithm and retrieve $i$, and thus $x_i$ with it, I gain knowledge which was not used to build the oracle.

However, in many proof of principle implementations of Grover's algorithm, like the one you show, this is not the case. Indeed, in these demonstration the question that is being asked is "trivial", in the sense that $x_i=i$, and the question is of the form "is $x_i$ equal to 3?".

In such a case, the algorithm is indeed not particularly useful in that the answer has to be hardcoded into the oracle, but this is not the case in general.

Post Deleted by glS
Source Link
glS
  • 26.9k
  • 6
  • 35
  • 121
Loading