Talk:Deutsch–Jozsa algorithm: Difference between revisions

Content deleted Content added
Cnotgate (talk | contribs)
Deutsch algorithm with n qubits remake
Cnotgate (talk | contribs)
Line 19:
<math>|x_1 \rang |x_2 \rang |x_3 \rang...|x_n \rang=|x_1,x_2,x_3,..,x_n \rangle </math>.
Then summ last qubits with all firsts qubits except last by MOD 2:
<math>|x_1 \times+ x_n ,x_2 \times+ x_n, x_3 \times+ x_n ,..., x_{n-1}+ x_n, \times x_n \rangle H \times |x_n\rang </math>
If all firsts qubits is zeros, then function is constant, if ''all'' first qubits doesn't zeros, then function is balanced.
Example. We have on input |0>|1>|0>|0>|1>|1>=|0,1,0,0,1,1>. As we see, last qubit is 1. Then plus last qubit by Mod 2: |0+1,1+1,0+1,0+1,1+1,1>=|1,0,1,1,1,1>, all firsts qubits is not zeros, so function is balanced.