This section studies quantum gates. As the basis, we begin with bit and
qubit. We then discuss classical gates, reversible gates and quantum
gates in turn. Last, we introduce the Bell circuit and its two
applications, i.e., superdense coding and quantum teleportation.
A bit is a unit of information describing a two-dimensional
classical system.
Since a two-dimensional classical system has two orthogonal states,
hence the bit 0 and bit 1 can be represented as two 2×1
binary vectors, i.e., bit-0=[10]andbit-1=[01] where bit-0 and
bit-1 equal to ∣0⟩ and ∣1⟩ for the convenience of the
following discussion.
definition
A quantum bit or a qubit is a unit of information describing a
two- dimensional quantum system.
Figure 3.1: Relation between qubit and bit.
The only difference between the above two definitions is the property of
the two-dimensional system. The former is a classic system, while the
latter is a quantum system. This means that the state of a qubit lies in
the complex vector space satisfying the normalization constraint,
i.e., ∣φ⟩=[c0c1] where
∣c0∣2+∣c1∣2=1. Whenever we measure a qubit, it automatically
becomes a bit with corresponding collapse probability of ∣c0∣2 for
bit 0 and ∣c0∣2 for bit 1 as shown in Figure
1.1.
So we shall never "see" a general qubit.
definition
The byte is a unit of digital information that most commonly consists
of eight bits.
For example, given a byte including eight bits 01101011, the vector
representation of these eight bits is: [10]⊤, [01]⊤,
[01]⊤, [10]⊤, [01]⊤, [10]⊤,
[01]⊤, [01]⊤. Recall the tensor product in composite
system, the state of a byte equals to
∣0⟩⊗∣1⟩⊗∣1⟩⊗∣0⟩⊗∣1⟩⊗∣0⟩⊗∣1⟩⊗∣1⟩,
which is a discrete element of the complex vector space
C2⊗C2⊗C2⊗C2⊗C2⊗C2⊗C2⊗C2.
definition
The qubyte is a unit of quantum information that consists of eight
qubits.
Similar, the state of a qubyte is the tensor product of eight qubits,
i.e.,
∣φ0⟩⊗∣φ1⟩⊗∣φ2⟩⊗∣φ3⟩⊗∣φ4⟩⊗∣φ5⟩⊗∣φ6⟩⊗∣φ7⟩,
wihch is a continues element of the complex vector space
C2⊗C2⊗C2⊗C2⊗C2⊗C2⊗C2⊗C2.
Figure 3.2: State vectors of single (qu)bit, double (qu)bits and (qu)byte
The state vectors of single (qu)bit, double (qu)bits and (qu)byte are
shown in Figure 1.2. Let's compare the byte and qubyte, both of
them are represented as a 256-dimensional vector. But the former,
classic byte, contains only 8 binary numbers, while the latter,
quantum byte, contains 28=256 complex numbers. This difference
indicates qubyte is much more informative than the classic byte.
Matrix representation. Classical logical gates are ways of
manipulating bits. This section studies classical gates from the point
of view of matrices. As stated in Section
1.1, we represent n input bits as a
2n×1 vector and m output bits as a 2m×1 vector. How
should we represent our logical gates? When one multiplies a
2m×2n matrix with a 2n×1 vector, the result is a
2m×1 vector. In symbols:
gate(2m×2n)⋅input(2n×1)=output(2m×1)
example
ex:NOT-gate Consider the NOT gate:
NOT gate takes as input one bit, or a 2×1 vector, and outputs
one bit, or a 2×1 vector. NOT of ∣0⟩ equals ∣1⟩ and
NOT of ∣1⟩ equals ∣0⟩. Consider the matrix NOT=[0110] This matrix satisfies [0110][10]=[01]and[0110][01]=[10]
example
ex:AND-gate Consider the AND gate:
The AND gate accepts two bits and outputs one bit, hence we need a
21×22 matrix. Consider the matrix AND=[10101001] This matrix satisfies
AND∣11⟩=∣1⟩ and AND∣01⟩=∣0⟩[10101001]0001=[01]and[0101001]0100=[10]
example
ex:OR-gate Consider the OR gate:
The OR gate similarly accepts two bits and outputs one bit, hence can be
represented by a 21×22 matrix. AND=[10010101] This matrix satisfies
OR∣00⟩=∣0⟩ and AND∣01⟩=∣1⟩[10010101]1000=[10]and[10010101]0100=[01]
example
NAND-gate Consider the NAND gate:
The NAND gate similarly accepts two bits and outputs one bit, hence can be represented by a 21×22 matrix. AND=[01010110] This matrix satisfies
NOT×AND=NANDNOT⋅AND=[0110][10101001]=[01010110]=NAND
Figure 5.3: Sequential, parallel and mixed operations.
Sequential operation. The way of thinking of NAND brings to light a
general situation. When we perform a computation, we often have to carry
out one operation followed by another. We call this procedure performing
sequential operations. Take Figure
5.3 as an example, if A an operation with m
input bits and n output bits, its matrix will be of size
2n×2m. Say, B takes the n outputs of A as input and outputs
p bits, then B is represented by a 2p×2n matrix, and
performing one operation sequentially followed by another operation
corresponds to B×A, which is a
(2p×2n)×(2n×2m)=(2p×2m) matrix.
Parallel operation. Besides sequential operations, there are
parallel operations as shown in Figure
5.3. Here we have A acting on some bits and B
on others. This will be represented by A⊗B.
Let us be exact with the number of inputs and the number of outputs. A
will be of size 2n×2m. B will be of size 2n′×2m′,
A⊗B is of size
2n2n′=2n+n′×2m2m′=2m+m′ .
Mixed operation. Take Figure
5.3 as an example, let A be an operation that
takes n inputs and gives m outputs. Let B take p<m of these
outputs and leave the other m−p outputs alone. B outputs q bits. A
is a 2m×2n matrix. B is a 2q×2p matrix. As nothing
should be done to the m−p bits, we might represent this as the
2m−p×2m