Tutorial Webpage for

Lecture Quantum Computing

Loading...

Is the String periodic

You get an n-dimensional vector of bits. Your oracle should decide if the string has a period. A period p is that for all bits in X: x[i] = x[i+p], where p is in [1..n-1]. You should not output the period. Just detect if there is a period.

Editor

Please use the following editor for your exercise. You can run the content of the editor by clicking on the tab 'Run'...

Output of Editor Content

The result of running the editor content is as follows:

Output of the Solution

The output of the solution is as follows:

Solution

Please have a look at the solution only after you have finished working on your own solution. Otherwise the learn effect is much less.