Codebook: Deutsch–Jozsa

Ask here about the “Deutsch–Jozsa” Codebook topic from the “Basic Quantum Algorithms” module.

Hi,
I just successfully finished Deutsch-Jozsa.
For this I have to check if I get |000…0> as a result - out of the probability array.

I checked if the first element is close to 1 and the sum of the remaining elements is close to 0. This works.

But is there a better for for checking if the result is a specific vector, e.g. |0011001> or similar?
I browsed through the API but I could not find anything. Any hint may be helpful.

Regards,
Jomu

Hi @jomu ,

Congratulations on solving the challenge! As you mention, for this specific codercise you don’t need to check whether the solution is a specific vector.

I guess the answer would be to check out our new Codebook module on Distance Measures. There are different ways of comparing quantum states and probability distributions, so this question deserves it’s own new module :star2:

1 Like