I am trying to implement the Deutsch algorithm. My steps were:
- Write down $|01\rangle$ in a matrix form $A$;
- Apply $H^{\oplus2}$ gate to $A$ matrix;
- Multiply it with $U_f$ matrix;
- Apply $H$ to the first qubit;
After the above steps, I got a matrix:
array([[ 0. ],
[ 0. ],
[-0.70710678],
[ 0.70710678]])
How should I perform a measurent step on the first qubit to get the answer?