Content deleted Content added
Deutsch algorithm with n qubits remake |
|||
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
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.
|