Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
image.png Here we implement the hidden shift algorithm for the family of Boolean bent functions using the Classiq platform. Make sure we have all necessary packages:
We assume we know how to implement the dual of ff and get ss according to the algorithm in [1]:Screen Shot 2023-06-27 at 18.05.48.png
Output:
Output:
Output:

More Complex Functions

We take a Maiorana-McFarland function with random permutation on the y and h function is the and operation between all the y-variables.

Creating the Circuit

Output:
Output:
Output:
And indeed we got the correct shift!

Hidden Shift Without the Dual Function

We now use the second algorithm described in [2]. This algorithm only requires implementing ff and not its dual; however, it requires O(n)O(n) samples from the circuit. Screen Shot 2023-06-27 at 18.08.23.png
Output:
Output:
Output:
Out of the sampled results, we look for nn independent samples, from which we can extract s. One thousand samples should be enough with a very high probability.
We now solve the equation and extract ss:
Output:
And we successfully received the same shift.

References

[1]: Quantum algorithms for highly non-linear Boolean functions [2]: Quantum algorithm for the Boolean hidden shift problem