- Create a circuit that implements Deutsch's algorithm for a constant function and verify your results.
- Which algorithm would you use to determine whether an n-bit string is balanced?
- Would phase kickback work if the ancilla qubit was not set to the state |1? Explain your answer.
- Implement the Bernstein-Vazirani algorithm to find the state |11010.
- What would happen if you set the ancilla qubit in either of the algorithms by first placing a Hadamard gate, followed by an X gate? Explain the reason for the results.
- Program and create an automated oracle generator for the Bernstein-Vazirani algorithm that randomly generates the secret state. Can you determine the value by just running the circuit and reviewing the results?