1.2 Operations on a probabilistic bit

Once we have represented bits of information by vectors, we can represent operations on these bits by linear transformations and use tools from linear algebra. For example, consider the operation that exchanges “heads” and “tails” of a donkey coin:

We will denote this operation by NOT\mathrm{NOT} and write it down mathematically as follows:

NOT
[Uncaptioned image]
=
[Uncaptioned image]
,NOT
[Uncaptioned image]
=
[Uncaptioned image]
.
\mathrm{NOT}\;\vbox{\hbox{\includegraphics[width=30.0pt]{figs/0.png}}}=\vbox{% \hbox{\includegraphics[width=30.0pt]{figs/1.png}}},\qquad\mathrm{NOT}\;\vbox{% \hbox{\includegraphics[width=30.0pt]{figs/1.png}}}=\vbox{\hbox{% \includegraphics[width=30.0pt]{figs/0.png}}}.
(1.16)

Using the conventions from Eq. 1.6, we can also write

NOT[0]=[1],NOT[1]=[0].\mathrm{NOT}\,[0]=[1],\qquad\mathrm{NOT}\,[1]=[0]. (1.17)

Note that we are writing NOTp\mathrm{NOT}\,p as an abbreviation to NOT(p)\mathrm{NOT}(p) – both simply mean that the operation NOT\mathrm{NOT} acts on a vector pp.11 1 We could also write NOTp\mathrm{NOT}\cdot p since this action actually corresponds to matrix-vector multiplication. We will generally write operations with capital letters to distinguish them from numbers and vectors.

Recall from Eq. 1.6 that the vectors [0][0] and [1][1] represent the deterministic states 0 and 11 of a probabilistic bit. Since the NOT\mathrm{NOT} operation exchanges these two vectors, it negates the value of the bit. This is precisely why we called it “NOT” – it represents the logical negation! One simple application of NOT\mathrm{NOT} is to enter some data in your computer. If all bits of your computer are initially set to 0, you can change some of them to 11 to enter data – this is often the first step of a computation.

How should we define the NOT operation on a probabilistic bit p=(p0p1)p=\bigl{(}\begin{smallmatrix}p_{0}\\ p_{1}\end{smallmatrix}\bigr{)}? With probability p0p_{0}, the bit is zero and will get flipped to a one. With probability p1p_{1}, the bit is one and will get flipped to a zero. Thus, the effect of the NOT operation on a probabilistic bit is simply

NOT(p0p1)=(p1p0).\displaystyle\mathrm{NOT}\begin{pmatrix}p_{0}\\ p_{1}\end{pmatrix}=\begin{pmatrix}p_{1}\\ p_{0}\end{pmatrix}. (1.22)

In particular, this recovers Eq. 1.17 when p0=1p_{0}=1 (and p1=0p_{1}=0) or p0=0p_{0}=0 (and p1=1p_{1}=1). You can intuitively think of the NOT operation and Eq. 1.22 as follows: if you imagine a probabilistic bit as a coin that you have tossed but have not looked at yet, then the NOT operation corresponds to turning the coin around (again, without looking at it).

Exercise 1.4 (Visualizing the NOT operation).

Recall from Fig. 1.2 that all possible states of a probabilistic bit correspond to a line segment. Let us try to visualize how the NOT\mathrm{NOT} operation transforms this line segment.

  1. 1.

    Take an arbitrary22 2 When we say ‘arbitrary’, we mean that your calculation must work for any choice of p0p_{0} and p1p_{1}. It is often best to write all the steps, including your final answer, in terms of p0p_{0} and p1p_{1}, treating them as unknown numbers. point with coordinates (p0,p1)(p_{0},p_{1}) on this segment. Where is it sent to by the NOT\mathrm{NOT} operation?

  2. 2.

    Where are the two endpoints of the line segment sent to?

  3. 3.

    Is there any point on the line segment that is sent to itself?

Solution.
  1. 1.

    Note from Eq. 1.22 that the point (p0,p1)(p_{0},p_{1}) is sent to (p1,p0)(p_{1},p_{0}). In other words, the two coordinates of the point are exchanged. Here is an example of how this looks like:

    [Uncaptioned image]

    You can thus think of the NOT\mathrm{NOT} operation as the reflection around the dashed line that goes right in the middle between the two coordinate axes.

  2. 2.

    According to Eq. 1.6, the two end-points (1,0)(1,0) and (0,1)(0,1) of the line segment correspond to the two deterministic states [0][0] and [1][1]. Recall from Eq. 1.17 that the NOT\mathrm{NOT} operation exchanges them.

  3. 3.

    A point with coordinates (p0,p1)(p_{0},p_{1}) remains fixed by the NOT\mathrm{NOT} operation if (p0,p1)=(p1,p0)(p_{0},p_{1})=(p_{1},p_{0}), meaning that p0=p1p_{0}=p_{1}. Since p0+p1=1p_{0}+p_{1}=1, we find that p0=p1=1/2p_{0}=p_{1}=1/2 which corresponds to the point (1/2,1/2)(1/2,1/2). This is the only point that remains fixed.