Good evening,
I was wondering in which way U was interacting with the first q-bit ? If we follow the wires going from left to right the operation acting on ket{0} are the two operations on the qbit just two Hadammard gates ?
Good evening,
I was wondering in which way U was interacting with the first q-bit ? If we follow the wires going from left to right the operation acting on ket{0} are the two operations on the qbit just two Hadammard gates ?
Answer to first question: Yes. However after the controlled U the first qubit gets entangled with the rest and the application of the second Hadamard is non trivial. You have to write the math to see it clearly. If you did not have the control U you would have H^2|0> = |0>, however because of the controlled op in the middle something different happens...
Answer to second question: well as said above you must write the math to see things clearly. After the first Hadamard the first qubit is left in a superposition of |0> + |1>. So the state of the circuit is
|0>x |rest> + |1>x|rest>
and the control U will act non trivially on the |1>x|rest> part...
The contrary: the first top qubit is the control qubit and U acts on the target qubits. So U acts on the n target qubits and is indeed a 2^nx2^n matrix.
Best
N.M
Follow the pulses of EPFL on social networks
© 2023 EPFL, all rights reserved