I am trying to implement the Deutsch algorithm. My steps were:

  1. Write down $|01\rangle$ in a matrix form $A$;
  2. Apply $H^{\oplus2}$ gate to $A$ matrix;
  3. Multiply it with $U_f$ matrix;
  4. 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?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 cs.stackexchange
scroll top