edited tags
luciano
• 3.7k
• 6
• 29
# How does applying Z gate to |0>$|0\rangle$ change the phase of other states during reflection about |s>$|s\rangle$ in Grover algorithm in qiskitQiskit textbook
I am trying to understand the Reflection Gate - Us explained for 2 qubits in the qiskit textbook. In the explanation it is mentioned that first Hadamard gate is applied to change the state |s>$$|s\rangle$$ to |0>$$|0\rangle$$ then a circuit adds negative phase to all the states orthogonal to |s>$$|s\rangle$$ and this is done by applying 2 Z$$Z$$ (one each on both the qubits)gates gates followed by a controlled Z$$Z$$. I am confused about this because once |s>$$|s\rangle$$ goes to |0>$$|0\rangle$$ there won't be any superposition so Z$$Z$$ gates won't do anything at all because the effect of Z$$Z$$ gates on computational basis is to change |1>$$|1\rangle$$ to -|1>$$-|1\rangle$$. Can someone please explain. This question is different from other questions asked so please do not link it to other questions.