3.1.2 Local operations

When you have two or more probabilistic bits, you can act on them in many different ways. In particular, you can act on all of them together with a global operation or only on one or a few at a time with a local operation. Let us consider local operations first.

Recall the NOT operation from Section 1.2 that flips a bit. What happens if we have two bits and apply NOT only on the first one? In that case the first bit should be flipped while the second should remain the same. This means the local NOT operation on the first bit, which we will denote by NOT1\mathrm{NOT}_{1}, acts as follows:

NOT1[00]=[10],NOT1[01]=[11],NOT1[10]=[00],NOT1[11]=[01].\mathrm{NOT}_{1}\,[{\color[rgb]{0,0,1}0}0]=[{\color[rgb]{0,0,1}1}0],\quad% \mathrm{NOT}_{1}\,[{\color[rgb]{0,0,1}0}1]=[{\color[rgb]{0,0,1}1}1],\quad% \mathrm{NOT}_{1}\,[{\color[rgb]{0,0,1}1}0]=[{\color[rgb]{0,0,1}0}0],\quad% \mathrm{NOT}_{1}\,[{\color[rgb]{0,0,1}1}1]=[{\color[rgb]{0,0,1}0}1]. (3.6)

Similarly, if we apply NOT only on the second bit, the resulting NOT2\mathrm{NOT}_{2} operation acts as follows:

NOT2[00]=[01],NOT2[01]=[00],NOT2[10]=[11],NOT2[11]=[10].\mathrm{NOT}_{2}\,[0{\color[rgb]{1,0,0}0}]=[0{\color[rgb]{1,0,0}1}],\quad% \mathrm{NOT}_{2}\,[0{\color[rgb]{1,0,0}1}]=[0{\color[rgb]{1,0,0}0}],\quad% \mathrm{NOT}_{2}\,[1{\color[rgb]{1,0,0}0}]=[1{\color[rgb]{1,0,0}1}],\quad% \mathrm{NOT}_{2}\,[1{\color[rgb]{1,0,0}1}]=[1{\color[rgb]{1,0,0}0}]. (3.7)

What we just described are local NOT operations on deterministic bits. How should we extend them to probabilistic bits? Recall from Section 1.2.1 that any operation that is fully specified on deterministic bits can be extended by linearity to probabilistic bits. For example, NOT2\mathrm{NOT}_{2} acts on two probabilistic bits as follows:

NOT2(\displaystyle\mathrm{NOT}_{2}\,\bigl{(} p00[00]+p01[01]+p10[10]+p11[11])\displaystyle p_{00}[0{\color[rgb]{1,0,0}0}]+p_{01}[0{\color[rgb]{1,0,0}1}]+p_% {10}[1{\color[rgb]{1,0,0}0}]+p_{11}[1{\color[rgb]{1,0,0}1}]\bigr{)}
=\displaystyle={} p00[01]+p01[00]+p10[11]+p11[10]\displaystyle p_{00}[0{\color[rgb]{1,0,0}1}]+p_{01}[0{\color[rgb]{1,0,0}0}]+p_% {10}[1{\color[rgb]{1,0,0}1}]+p_{11}[1{\color[rgb]{1,0,0}0}]
=\displaystyle={} p01[00]+p00[01]+p11[10]+p10[11],\displaystyle p_{01}[0{\color[rgb]{1,0,0}0}]+p_{00}[0{\color[rgb]{1,0,0}1}]+p_% {11}[1{\color[rgb]{1,0,0}0}]+p_{10}[1{\color[rgb]{1,0,0}1}],

where in the first step we used Eq. 3.7 and in the second step we just reordered the terms to sort the binary strings. You can also write this in the 4-vector notation, but it is somewhat less intuitive:

NOT2(p00p01p10p11)=(p01p00p11p10).\mathrm{NOT}_{2}\begin{pmatrix}p_{00}\\ p_{01}\\ p_{10}\\ p_{11}\end{pmatrix}=\begin{pmatrix}p_{01}\\ p_{00}\\ p_{11}\\ p_{10}\end{pmatrix}. (3.8)
Exercise 3.1 ( NOT1\mathrm{NOT}_{1} in the 4-vector notation (optional) ).

Similar to Eq. 3.8, write the action of NOT1\mathrm{NOT}_{1} on two probabilistic bits in the 4-vector notation.

Solution.
NOT1(p00p01p10p11)=(p10p11p00p01).\displaystyle\mathrm{NOT}_{1}\begin{pmatrix}p_{00}\\ p_{01}\\ p_{10}\\ p_{11}\end{pmatrix}=\begin{pmatrix}p_{10}\\ p_{11}\\ p_{00}\\ p_{01}\end{pmatrix}.

To apply a single-bit operation in Quirky, we drop the corresponding box onto eiter the first or the second wire. For example, the following sequence prepares the [10][10] state and shows the outcome probabilities when measuring both bits:

[Uncaptioned image]

This makes sense since the bottom wire in Quirky corresponds to the first bit.

Similarly, if we first flip one bit and then the other, the result is the [11][11] state:

[Uncaptioned image]

Clearly, the order in which we apply the two NOT operations does not matter. This means that we can also apply them in parallel:

[Uncaptioned image]

We can in the same way apply random operations to one of the bits. For example, suppose we subject the first bit to the operation R(r)R(r) that resets a bit with probability rr (Eq. 1.27). Since R(r)[0]=[0]R(r)[0]=[0], we have that

R(r)1[00]=[00],R(r)1[01]=[01].\displaystyle R(r)_{1}[{\color[rgb]{0,0,1}0}0]=[{\color[rgb]{0,0,1}0}0],\qquad R% (r)_{1}[{\color[rgb]{0,0,1}0}1]=[{\color[rgb]{0,0,1}0}1]. (3.9)

And since R(r)[1]=r[0]+(1r)[1]R(r)[1]=r[0]+(1-r)[1], we have that

R(r)1[10]=r[00]+(1r)[10],R(r)1[11]=r[01]+(1r)[11].\displaystyle R(r)_{1}[{\color[rgb]{0,0,1}1}0]=r[{\color[rgb]{0,0,1}0}0]+(1-r)% [{\color[rgb]{0,0,1}1}0],\qquad R(r)_{1}[{\color[rgb]{0,0,1}1}1]=r[{\color[rgb% ]{0,0,1}0}1]+(1-r)[{\color[rgb]{0,0,1}1}1]. (3.10)

For example, if we prepare the state [11][11] and apply R(1/3)R(1/3) to the first bit, we obtain

R(1/3)1[11]=13[01]+23[11],\displaystyle R(1/3)_{1}[11]=\frac{1}{3}[01]+\frac{2}{3}[11], (3.11)

as confirmed by Quirky:

[Uncaptioned image]

Here is an even more interesting example, which you can tackle in the exercise below:

[Uncaptioned image]
\href https://www.quantum-quest.org/quirky/QuirkyQuest3P.html#circuit=%7B%22% cols%22%3A%5B%5B%22NOT%22%2C%22NOT%22%5D%2C%5B%22~d1kc%22%2C%22~d1kc%22%5D%2C%% 5B%22Chance2%22%5D%5D%2C%22gates%22%3A%5B%7B%22id%22%3A%22~d1kc%22%2C%22name%2% 2%3A%22R(1%2F3)%22%2C%22matrix%22%3A%22%7B%7B1%2C0.3333333%7D%2C%7B0%2C0.66666% 67%7D%7D%22%7D%5D%7D
(3.12)
Homework 3.1 (R(r)R(r) on the second bit).
  1. 1.

    Write down formulas for R(r)2R(r)_{2} analogously to Eqs. 3.9 and 3.10.

  2. 2.

    Explain why Quirky gives the correct answer in (3.12).

Hack.
  1. 1.
    R(r)2[00]=[00],\displaystyle R(r)_{2}[0{\color[rgb]{0,0,1}0}]=[0{\color[rgb]{0,0,1}0}],\qquad R(r)2[10]=[10],\displaystyle R(r)_{2}[1{\color[rgb]{0,0,1}0}]=[1{\color[rgb]{0,0,1}0}],
    R(r)2[01]=q[00]+(1q)[01],\displaystyle R(r)_{2}[0{\color[rgb]{0,0,1}1}]=q[0{\color[rgb]{0,0,1}0}]+(1-q)% [0{\color[rgb]{0,0,1}1}],\qquad R(r)2[11]=q[10]+(1q)[11].\displaystyle R(r)_{2}[1{\color[rgb]{0,0,1}1}]=q[1{\color[rgb]{0,0,1}0}]+(1-q)% [1{\color[rgb]{0,0,1}1}]. (3.13)
  2. 2.

    We start out with [00][00] and flip both bits, resulting in [11][11]. Next, we apply the operation R(1/3)R(1/3) to the first bit, say. We already saw in Eq. 3.11 that the result is

    R(1/3)1[11]=13[01]+23[11].\displaystyle R(1/3)_{1}[11]=\frac{1}{3}[01]+\frac{2}{3}[11].

    Finally, we apply R(1/3)R(1/3) to the second bit. By linearity,

    R(1/3)2(13[01]+23[11])\displaystyle R(1/3)_{2}\left(\frac{1}{3}[01]+\frac{2}{3}[11]\right) =13R(1/3)2[01]+23R(1/3)2[11],\displaystyle=\frac{1}{3}R(1/3)_{2}[01]+\frac{2}{3}R(1/3)_{2}[11],
    and now we can use the formulas derived in Eq. 3.13:
    =13(13[00]+23[01])+23(13[10]+23[11])\displaystyle=\frac{1}{3}\left(\frac{1}{3}[00]+\frac{2}{3}[01]\right)+\frac{2}% {3}\left(\frac{1}{3}[10]+\frac{2}{3}[11]\right)
    =19[00]+29[01]+29[10]+49[11]\displaystyle=\frac{1}{9}[00]+\frac{2}{9}[01]+\frac{2}{9}[10]+\frac{4}{9}[11]
    (11.1%22.2%22.2%44.4%),\displaystyle\approx\begin{pmatrix}11.1\%\\ 22.2\%\\ 22.2\%\\ 44.4\%\end{pmatrix},

    which is exactly what Quirky showed.