Pergunta

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?

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a cs.stackexchange
scroll top