Simulating More Complicated Quantum Circuits
(10 pts.) An algorithm with the same end result as the Bernstein-Varirani algorithm can be created using an oracle made only of NOT gates. Create this oracle and prove it works by decoding a secret string of length 3, a secret string of length 5, and a secret string of length 7.
(15 pts.; 3 pts. each) Using the quantum Fourier transform algorithm developed in class, create a quantum circuit that will perform a QFT on the following data points. Show the results in terms of Bloch sphere representations. Remember you can use the
bin
function in Python to convert a number to its binary representation.
- x = 5
- x = 10
- x = 21
- x = 35
- x = 2
- (25 pts.) Without using the quantum Fourier transform algorithm we created in class (i.e. without using the recursive formalism), create a quantum circuit that will perform a quantum Fourier transform algorithm on a four-qubit state. Compare the results to relevant examples in Problem #2.