Wednesday, 3 April 2019

computational physics - Quantum XOR: How do you generalize it?


Consider the classical XOR Gate:


Given a 2 bit system: $G = [u_1, u_2]$


$$XOR(G) = (u_1 + u_2) \ mod \ 2$$


Is the following a good generalizaiton of a Quantum XOR Gate:



Given a 2-qubit system: $Q = a_1|00] + a_2|01] + a_3|10] + a_4|11]$


We now write:


$$XOR(Q) = a_1|0] + a_2|1] + a_3|1] + a_4|0] = (a_1 + a_4)|0] + (a_2 + a_3)|1]$$


Notice that if we set $a_i = 1$ and the rest to $0$ that the quantum XOR behaves exactly like a classical XOR but it also has the ability to generalize to fractional and complex $a_i$



Answer



Usually, a XOR quantum gate is implemented by the function :


$XOR(Q) = a_1|00 \rangle + a_2|01 \rangle + a_4|10\rangle + a_3|11 \rangle$


The first bit is conserved, while the second bit is the result of an XOR operation between the first and second bit.


For instance, if we have the combination $|11\rangle$, this means, after the transformation : $1$ for the first bit (conserved bit) and $1$ XOR $1 = 0$ for the second bit, so $|11\rangle$ transforms in $|10\rangle$


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...