A classical solution to the quantum combination lock
One way to figure out the secret 4-digit code is to follow the algorithm given below.
Set all guess qubits to 0, except the first one
Measure result after applying the black box
If the answer qubit is 0, the first digit of the secret code is 1 (because the answer changed); otherwise the first digit is 0
Repeat steps for every digit in the secret code
When we look at the example from the previous page, we will obtain the secret code 110 the following way (use the previous and next step buttons to toggle through the code).
While you can easily try more than 3 combinations, it is not possible to find out the secret code with less than 3 measurements.
-
A
3
-
B
5
-
C
7
-
D
9
Correct! It takes 5 guesses to figure out the secret 5-digit code. Actually, we will always need as many guesses as we have digits in our secret code, i.e. for a 12-digit code, we would need 12 guesses.
Not quite! It takes 5 guesses to figure out the secret 5-digit code. Actually, we will always need as many guesses as we have digits in our secret code, i.e. for a 12-digit code, we would need 12 guesses.