According to the Grover's algorithm section in the IBM Quantum Experience, if I have two qubits in the "one" state (vectors (0,1) and (0,1)), and I apply a Hadamard gate to each of them, and then input the tensor product output to a CZ gate, my resulting amplitudes should be (.5, .5, .5, and -.5). However, no matter how I fiddle with the matrices, my resulting amplitudes are (.5, -.5, -.5, and -.5) Am I screwing up the product of the results of the two Hadamards?
Could you point to the source? Your calculations seem correct, in Dirac notation:
- start with $|1\rangle \otimes |1\rangle$
- apply H to each qubit: $|-\rangle \otimes |-\rangle = \frac12(|00\rangle - |01\rangle - |10\rangle + |11\rangle)$
- Apply CZ: the sign of $|11\rangle$ changes, for the final result $\frac12(|00\rangle - |01\rangle - |10\rangle - |11\rangle)$
Could it be that the source starts with qubits in $|0\rangle \otimes |0\rangle$ state? In that case the resulting amplitudes will indeed be $\frac12(|00\rangle + |01\rangle + |10\rangle - |11\rangle)$.