Hi,
I am currently trying to solve the P.1.1. Codercise but I am having trouble getting to the correct answer. If I understood correctly, the “guess_the_unitary(unitary)” function should output [1,0] or [0,1] depending on whether U is equal to Z or -Z. My circuit follows the circuit in the picture:
And I get the expected output according to my understanding. However, I am getting an error that says “Incorrect: the extracted state does not match the input state.” Are those the expected outputs of the function according to the input? Or did I understood wrong what we need to output? I could post the code but that would be probably giving away the answer to the Codercise. I could provide the code if it helps to determine what might be wrong.
Cheers,
Erick