You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
According to Watrous, page 3, the number of iterations (k) should be equal to pi divided by 4 times the square root of N.
Since, for line 104, N equals 2^6, k should be equal to 6.
For line 180, the equation can be found in Nielsen and Chuang's Quantum Computation and Quantum Information, page 254. It's pi divided by 4 times the square root of N divided by M. Therefore, since 256/4 = 64 = 2^6, k should also be equal to 6.
This small mistake has paramount in the probability analysis of the algorithm. It's a really high probability, that seems to be low as it is.
A related issue is the number of Queries. Considering the sources presented above, each iteration performs a single query to the oracle, which is the most demanding part in terms of resources. Therefore, the number of Queries should be equal to the number of Iterations, but it is implemented as twice the number of Iterations plus one.
Also, the number of attempts done in test is incoherent. It is not an issue per se, but it could be improved. 1000 attempts are done in the classical case, 100 are done in the first quantum case and only 10 are done in the second quantum case. These numbers make sense from a running time point of view, but they allow for inconsistent interpretation of the results. For improved consistency, the same number of attempts should be done in all cases. If the number is 1000, the last quantum case should take a bit longer, but the results are more consistent.
The text was updated successfully, but these errors were encountered:
MahatKC
changed the title
DatabaseSearch has an incorrect number of iterations
DatabaseSearch has an incorrect number of iterations and queries
May 22, 2019
The file Program.cs (Samples/src/DatabaseSearch/Program.cs) has the Number of Iterations wrong in lines 104 and 180.
In both cases, it should be 6.
According to Watrous, page 3, the number of iterations (k) should be equal to pi divided by 4 times the square root of N.
Since, for line 104, N equals 2^6, k should be equal to 6.
For line 180, the equation can be found in Nielsen and Chuang's Quantum Computation and Quantum Information, page 254. It's pi divided by 4 times the square root of N divided by M. Therefore, since 256/4 = 64 = 2^6, k should also be equal to 6.
This small mistake has paramount in the probability analysis of the algorithm. It's a really high probability, that seems to be low as it is.
A related issue is the number of Queries. Considering the sources presented above, each iteration performs a single query to the oracle, which is the most demanding part in terms of resources. Therefore, the number of Queries should be equal to the number of Iterations, but it is implemented as twice the number of Iterations plus one.
Also, the number of attempts done in test is incoherent. It is not an issue per se, but it could be improved. 1000 attempts are done in the classical case, 100 are done in the first quantum case and only 10 are done in the second quantum case. These numbers make sense from a running time point of view, but they allow for inconsistent interpretation of the results. For improved consistency, the same number of attempts should be done in all cases. If the number is 1000, the last quantum case should take a bit longer, but the results are more consistent.
The text was updated successfully, but these errors were encountered: