Module 5 - Quantum Computing
Module 5 - Quantum Computing
MODULE V
QUANTUM COMPUTING
Quantum computing is a fascinating and growing field at the intersection of Physics &
Computer science which focuses on developing computing methods based on principles of
Quantum Mechanics.
The key principles which govern the quantum computing are superposition, quantum
measurement and entanglement. Even the Nobel Laureate like Richard Feynman, struggled
with the implications of quantum mechanics which led to his famous quote, “I think I can safely
say that nobody understands quantum mechanics.”
Although the applications of Quantum mechanics are not straight forward, this branch
of Physics opens an entirely new world of possibilities in Science, Technology, and
Information processing. One of the most promising fields is quantum computers. The
significant applications of quantum computing are Quantum simulation, Cryptography,
Optimization, and quantum machine learning. Quantum computing contributes to military
affairs, Finance Industry, Aerospace and Drug designing. Many tech giants like IBM,
Microsoft, Google are currently working in quantum computing field. Since quantum
computers are fragile, even slight vibration will affect the computer and causes decoherency as
the working process of quantum computers is based on the “quantum states”.
A state of a quantum system defined by a wave function can be represented by certain type
of vector known as ket vector. In Quantum mechanics, Dirac Bra-Ket notation is a standard
notation for describing the quantum states. The notation uses angle brackets “< >” and a
vertical line in between “|”. Here ket is denoted by the symbol | ⟩ and Bra is denoted by the
symbol ⟨ | .
Note: In quantum mechanics, the physical state of a system is given by a vector in a Hilbert
space and the possible results of measures of physical quantities correspond to the eigenvalues
of self-adjoint operators.
Hilbert Space is infinite-dimensional vector space that has a natural inner product, or dot
product. where the dimensions represent the energy states of a quantum system.
Page 1 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Ket Vector:
The standard quantum mechanical notation for a quantum state 𝜓𝜓 in vector space is |𝜓𝜓⟩
pronounced as Ket-Psi.
Ex: Let us consider two kets |𝑎𝑎⟩ & |𝑏𝑏⟩ and two arbitrary complex numbers C1 and C2. The
linear combination can now be written as |𝑉𝑉⟩ = 𝐶𝐶1 |𝑎𝑎⟩ + 𝐶𝐶2 |𝑏𝑏⟩
Bra Vector:
The complex conjugate of the vector |𝑉𝑉⟩ = 𝐶𝐶1 |𝑎𝑎⟩ + 𝐶𝐶2 |𝑏𝑏⟩ is ⟨𝑉𝑉| = 𝐶𝐶1∗ ⟨𝑎𝑎| + 𝐶𝐶2∗ ⟨𝑏𝑏| where
⟨𝑎𝑎| , ⟨𝑏𝑏| are Bra Vectors and 𝐶𝐶1∗ , 𝐶𝐶2∗ are Complex conjugate of 𝐶𝐶1 & 𝐶𝐶2 .
For ex:
1. |𝜓𝜓⟩ =2+ib then ⟨𝜓𝜓| = 2-ib
2. |𝜓𝜓⟩ = 𝑎𝑎1 |𝜑𝜑1 ⟩ + 𝑖𝑖𝑎𝑎2 |𝜑𝜑2 ⟩ then ⟨𝜓𝜓| = 𝑎𝑎1 ⟨𝜑𝜑1 | − 𝑖𝑖𝑎𝑎2 ⟨𝜑𝜑2 |
3. |𝜓𝜓⟩ = 2|𝜑𝜑1 ⟩ + 3|𝜑𝜑2 ⟩ then ⟨𝜓𝜓| = 2⟨𝜑𝜑1 | + 3⟨𝜑𝜑2 |
Now using Dirac Bra-Ket notation 𝜓𝜓𝜓𝜓 ∗ can be written as ⟨𝜓𝜓|𝜓𝜓⟩ where⟨𝜓𝜓| is termed as “Bra”
𝜓𝜓 and |𝜓𝜓⟩is termed as “Ket” 𝜓𝜓.
To make the computation easier, the wavefunctions and operators are represented in matrix
form which is simplified by Dirac notations.
Note: If a matrix has only one row or only one column it is called a vector.
If a stat of a physical system is represented by 𝜓𝜓 then the state of the system in terms of its
eigen functions can be written as
Where 𝜑𝜑1 , 𝜑𝜑2 , 𝜑𝜑3 … … … 𝜑𝜑𝑛𝑛 are eigen functions and 𝐶𝐶1 , 𝐶𝐶2 , 𝐶𝐶3 … … … 𝜑𝜑𝑛𝑛 are the coefficients of
eigen functions which could be real or complex.
Page 2 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Where 𝜑𝜑1∗ , 𝜑𝜑2∗ , 𝜑𝜑3∗ … … … 𝜑𝜑𝑛𝑛∗ are the complex conjugates of 𝜑𝜑1 , 𝜑𝜑2 , 𝜑𝜑3 … … … 𝜑𝜑𝑛𝑛 &
𝑐𝑐1∗ , 𝑐𝑐2∗ , 𝑐𝑐3∗ … … … 𝑐𝑐𝑛𝑛∗ are the complex conjugate of 𝐶𝐶1 , 𝐶𝐶2 , 𝐶𝐶3 … … … 𝜑𝜑𝑛𝑛 .
In matrix formulation of quantum mechanics, the above “Ket” can now be written as “column
vector”.
Similarly
In matrix formulation of quantum mechanics, the “Bra” is written as “Row vector” which is
a Hermitian conjugate (conjugate transpose) of Ket matrix i.e ⟨𝜓𝜓| = |𝜓𝜓⟩ † = |𝜓𝜓⟩ ∗𝑇𝑇
Or
⟨𝜓𝜓| = [⟨𝜑𝜑1 |𝜓𝜓⟩∗ ⟨𝜑𝜑2 |𝜓𝜓⟩∗ ⟨𝜑𝜑3 |𝜓𝜓⟩∗ … … ⟨𝜑𝜑𝑛𝑛 |𝜓𝜓⟩∗ ] = [𝐶𝐶1∗ 𝐶𝐶2∗ 𝐶𝐶3∗ … … 𝐶𝐶𝑛𝑛∗ ]
Page 3 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Note:
If |𝜓𝜓𝑖𝑖 ⟩ & |𝜓𝜓𝑗𝑗 �are any to Ket functions then �𝜓𝜓𝑖𝑖 �𝜓𝜓𝑗𝑗 � is the scalar product of the two vectors
∞
defined as �𝜓𝜓𝑖𝑖 �𝜓𝜓𝑗𝑗 � = ∫−∞ 𝜓𝜓𝑖𝑖∗ (𝑥𝑥)𝜓𝜓𝑗𝑗 (𝑥𝑥)𝑑𝑑𝑑𝑑
1. Orthogonal condition:
2. Normalization condition:
Operators
Operators are the mathematical functions which acts on the wavefunction vectors and causes
transformation. For example, If |𝜓𝜓𝑖𝑖 ⟩ & |𝜓𝜓𝑗𝑗 � are any to Ket functions and an operator 𝐴𝐴� , then
the operation of 𝐴𝐴� is as follows
�𝜓𝜓𝑖𝑖 � 𝐴𝐴� �𝜓𝜓𝑗𝑗 � = ⟨ѱ𝑖𝑖 | 𝐴𝐴� ѱ𝑗𝑗 � = �𝐴𝐴� ѱ𝑖𝑖 | ѱ𝑗𝑗 �
It is the operator which operates on a qubit states/vectors and leaves the qubit states/vectors
unchanged.
i.e., 𝐼𝐼� |𝑎𝑎⟩ = |𝑎𝑎⟩
Where 𝐼𝐼� is called the Identity operator.
1 0 0
1 0
Matrix form of Identity operator for order 2 and 3 is given by 𝐼𝐼� = � � & 𝐼𝐼� = �0 1 0�.
0 1
0 0 1
Page 4 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Moore’s law states, “Number of transistors in a dense integrated chip doubles every two
years.”
To keep up with Moore’s law, number of transistors must keep increasing which in turn means
the size of the transistor must reduce. But there is a limit in size reduction, as the source and
drain regions of the transistor come closer and closer, Quantum effects like quantum
tunnelling cascades into the micro scale realm causing problems for current micro-electronics
as it is difficult to make a barrier high enough to stop the electrons from tunnelling. This is
the limitation of Moore’s law.
In classical computers, information is represented as the binary digits “0” or ”1”. These are
called Bits. For example, the number 1 in an 8-bit binary representation is written as 0000
0001 and the number 2 is represented as 0000 0010 and so on. Every number is represented
as 8 bits, which is called Byte. The document, we read or the video, we watch is encoded in
the computer binary language in terms of these 1’s and 0’s. The hardware understands the
Bit’1’ as an electrical current flowing through the wire while the ‘0’ bit is the absence of an
electrical current in a wire. These electrical signals can be thought of as “ON” (the 1 bit) or
“OFF” (the O bit). Then computer decodes the classical 1 or 0 bits into words or videos.
Page 5 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Concept of Qubit:
A Quantum bit or qubit is the basic unit of information in quantum computing. Qubits are the
counter parts of classical bits in quantum computing.
In a qubit there are two measurable states called the ‘0’ and ‘1’ states and in addition, the
qubits can also be in a superposition state of these ‘0’ and ‘1’ states.
The fundamental quantum principles that define a qubit are Superposition, Entanglement and
Tunnelling. Taken together these qualities enormously enhance computing power.
Certain computations that normally need to be performed on ‘0’ or ‘1’ separately on a
classical computer, can be completed in a single operation using a qubit on a quantum
computer which makes the computations much faster.
Properties of Qubits:
1. Superposition:
A qubit can also exist in the superposed states of the two states ‘0 and ‘1’. A superposition
is a weighted sum or difference of two or more states or it is the linear combination of
states.
2. Quantum entanglement:
Quantum entanglement is the state where two systems are so strongly correlated that
gaining information about one system will give immediate information about the other no
matter how far apart these systems are.
In quantum computers, changing the state of an entangled qubit will change the state of
the paired qubit immediately. Therefore, entanglement improves the processing speed of
quantum computers.
3. Tunnelling:
Tunnelling is a quantum mechanical phenomenon in which a particle penetrates through a
potential energy barrier that is higher in energy than the particle's kinetic energy.
Quantum Tunnelling is what gives quantum computers the potential to not only complete
tasks faster but also to potentially complete tasks that a classical computer simply cannot
do.
4. No Cloning Principle:
Owing to the quantum nature, the qubit changes its state at once when subjected to
measurement. This means, one cannot copy information from qubits as in the classical
computers, as there will be no similarity between the copy and the original. This is known
as “no cloning principle”
Page 6 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Note: A classical bit can either be ‘0’ or ‘1’ but a quantum bit can also be in a superposition of
both ‘0’ and ‘1’
To work with qubits, it is useful to express quantum mechanical states in Dirac’s “Bra- Ket”
notation. A qubit for a state, |ѱ⟩ could be in a |0⟩ and |1⟩ state which in turn is a superposition
of both |0⟩ and |1⟩. This is written as
where α and β are called the amplitudes of the states and the amplitudes are generally complex
numbers. This allows us to mathematically represent all the possible superposition states.
Amplitudes are very important as it implies the probability of finding the particle in state |0⟩
is |𝛼𝛼|2 and the probability of measuring the particle in the state |1⟩ is |𝛽𝛽|2 . Squaring α and β,
to find the probability, is like squaring a wave amplitude to find the energy of the wave.
Since the total probability of observing all the states of the quantum system must add up to
100%, the amplitude must follow the normalization rule: |𝛼𝛼|2 + |𝛽𝛽|2 =1. The coefficients of
α and β can always be rescaled by some factor to normalize the quantum state.
Matrix representation:
To represent one qubit in matrix representation which is a superposition of |ѱ⟩ = 𝛼𝛼|0⟩+β |1⟩,
is written as a two-dimensional vector where the amplitudes are the components of the vector:
𝛼𝛼
|ѱ⟩ = � �
𝛽𝛽
The states |0⟩ and |1⟩are represented as
Page 7 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Unitary matrix U can only act on the qubit in such a way that |𝛼𝛼|2 + |𝛽𝛽|2 does not change.
This is significant, as in all the mathematical construction of quantum mechanics, one
fundamental assumption is that each (matrix) operator must be unitary. This ensures that after
changing the state through some action, the total probability to observe all possible states still
adds up to 100%. This physical action of interaction with the state corresponds
mathematically to applying a unitary operator.
We know that,
1 0
𝐼𝐼̂ = � �, |0⟩ = �10� and |1⟩ = �01�
0 1
1 0 1 1
Now, 𝐼𝐼� |0⟩ = � � � � = � � = |0⟩.
0 1 0 0
1 0 0 0
Similarly, 𝐼𝐼� |1⟩ = � � � � = � � = |1⟩
0 1 1 1
Bloch Sphere is a visual tool that is used in quantum computing which helps in understanding
the state of qubits. Bloch Sphere is the geometrical representation of quantum states of two-
level quantum system. Any two-level quantum system can form a qubit. Bloch Sphere has a
unit radius.
• The Arrow on the sphere represents the state of the Qubit. The north and south poles are
used to represent the basis states |0⟩ and |1⟩ is called the computational basis.
• The other locations are the superpositions of |0⟩ and |1⟩ respectively therefore the general
pure state of the qubit in this basis is |ѱ⟩ = 𝛼𝛼|0⟩+β |1⟩. Thus, a Qubit can be any point on
the Bloch Sphere.
Page 8 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
• Each qubit is a vector on Bloch’s sphere. Each vector on Bloch sphere can be understood
as in two basis θ and Φ, where θ is the angle between the vector and the Z axis and Φ is
angle between the vector and positive X axis measuring the counter clockwise.
• All possible states can be achieved on the Bloch sphere using these two angles with
limitations on them. The limitations are θ is always between 0 and π inclusive and Φ is
always between 0 and 2π inclusive.
• Now all the states can be represented on the sphere using the vector
𝜃𝜃 𝜃𝜃
|ѱ⟩ = cos � � |0⟩ + 𝑒𝑒 𝑖𝑖𝑖𝑖 sin � � |1⟩
2 2
where 0 ≤ θ ≤ π and 0 ≤ Φ ≤ 2π
The general state of a two- qubit is = 𝛼𝛼00 |00⟩ + 𝛼𝛼01 |01⟩ + 𝛼𝛼10 |10⟩ + 𝛼𝛼11 |11⟩
Page 9 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
When the basis matrices are written as the columns of a matrix, then the matrix will be an
identity matrix
1 0 0 0
Basis as column of the matrix is �0 1 0 0� which is an identity matrix of order 4
0 0 1 0
0 0 0 1
Three Qubits system:
A three-qubit system has eight basis states denoted as |000⟩, |001⟩, |010⟩, |011⟩, |100⟩,
|101⟩, |110⟩ 𝑎𝑎𝑎𝑎𝑎𝑎 |111⟩ which can be represented as
|000⟩, |001⟩, |010⟩, |011⟩, |100⟩, |101⟩, |110⟩, |111⟩
⎧ 1 0 0 0 0 0 0 0 ⎫
⎪ ⎡0⎤ ⎡1⎤ ⎡1⎤ ⎡0⎤ ⎡0⎤ ⎡0⎤ ⎡0⎤ ⎡0⎤ ⎪
⎪ ⎪
⎪ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎪
0 0 0 0 0
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ 0 0 0
Basis = 0 0 0 1 0 0 0 0
⎨ ⎢0⎥ , ⎢0⎥ , ⎢0⎥ , ⎢0⎥ , ⎢1⎥ , ⎢0⎥ , ⎢0⎥ , ⎢0⎥ ⎬
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎪ ⎢0⎥ ⎢0⎥ ⎢0⎥ ⎢0⎥ ⎢0⎥ ⎢1⎥ ⎢0⎥ ⎢0⎥ ⎪
⎪ ⎪
⎪ ⎢0⎥ ⎢0⎥ ⎢0⎥ ⎢0⎥ ⎢0⎥ ⎢0⎥ ⎢1⎥ ⎢0⎥ ⎪
⎩ ⎣0⎦ ⎣0⎦ ⎣0⎦ ⎣0⎦ ⎣0⎦ ⎣0⎦ ⎣0⎦ ⎣1⎦ ⎭
The general state of a two- qubit is = 𝛼𝛼000 |000⟩ + 𝛼𝛼001 |001⟩ + 𝛼𝛼010 |010⟩ + 𝛼𝛼011 |011⟩ +
𝛼𝛼100 |100⟩ + 𝛼𝛼110 |110⟩+𝛼𝛼111 |111⟩
When the basis matrices are written as the columns of a matrix, then the matrix will be an
identity matrix. Basis as column of the matrix is given by
10000000
⎡ 0 1 1 0 0 0 0 0⎤
⎢ ⎥
⎢ 0 0 0 0 0 0 0 0⎥
⎢ 0 0 0 1 0 0 0 0⎥ which is an identity matrix of order 8
⎢ 0 0 0 0 1 0 0 0⎥
⎢ 0 0 0 0 0 1 0 0⎥
⎢ 0 0 0 0 0 0 1 0⎥
⎣ 0 0 0 0 0 0 0 1⎦
Extension to N qubits:
A multi qubit system of N qubits has 2n basis states. Thus, for N qubit states the computational
basis states are denoted as |00 … 00⟩, |00 … 01⟩, |00 … 10⟩, |00 … 11⟩, … … |11 … 11⟩ .
Classical Information:
Page 10 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
• The device computes by manipulating those bits with the help of logical gates (AND,
OR, NOT etc.) which are not materials but the electrical effects that follows the physical
laws which are classical in nature.
• The information is obtained through High and Low state in an electrical circuit.
• Bits are slow.
• Classical information can be easily cloned.
Quantum Information:
Quantum Gates:
Classical computers manipulate bits using classical logic gates, such as OR, AND, NOT,
NAND etc. Similarly, quantum computers manipulate qubits using quantum gates. The gates
are applied to qubits and the state of the qubit changes depending on the gate applied.
In Quantum computing, a quantum logic gate is a basic quantum circuit operating on a small
number of qubits. They are the building blocks of quantum circuits. Quantum gates are unitary
operators and are described as unitary matrices relative to some basis. A gate which acts on
“n” qubits is represented by a 2𝑛𝑛 x2𝑛𝑛 unitary matrix. As the Quantum gates are unitary
operators, we need the basis states to construct the unitary operator.
Page 11 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Pauli’s X gate is also known as “Bit flip” gate. It rotates the quantum state around the X
axis by π radian.
X 0 1
Schematic representation: Matrix form: � �
1 0
0 1 0 1
X |1⟩ = � � � � = � � = |0⟩
1 0 1 0
Truth Table:
Input Output
|𝟎𝟎⟩ |1⟩
|𝟏𝟏⟩ |0⟩
If Pauli’s X gate operates on qubit state, it flips the state of the qubit. Pauli’s X gate in
quantum computer plays the role of NOT gate in classical computer.
Y 0 −𝑖𝑖
Schematic representation: Matrix form: � �
𝑖𝑖 0
0 −𝑖𝑖 1 0
Y |0⟩ = � � � � = � � = 𝑖𝑖 |1⟩
𝑖𝑖 0 0 𝑖𝑖
0 −𝑖𝑖 0 −𝑖𝑖
Y |1⟩ = � � � � = � � = −𝑖𝑖|0⟩
𝑖𝑖 0 1 0
Page 12 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
|0⟩ Y 𝑖𝑖|1⟩
|1⟩ Y −𝑖𝑖|0⟩
Truth Table:
Input Output
|𝟎𝟎⟩ i|1⟩
|𝟏𝟏⟩ -i|0⟩
Z 1 0
Schematic representation: Matrix form : � �
0 −1
1 0 1 1
Z |0⟩ = � � � � = � � = |0⟩
0 −1 0 0
1 0 0 0
Z |1⟩ = � � � � = � � = −|1⟩
0 −1 1 −1
Representation of gate operation:
|0⟩ Z |0⟩
|1⟩ Z −|1⟩
Truth Table:
Input Output
|𝟎𝟎⟩ |0⟩
|𝟏𝟏⟩ −|1⟩
If Pauli’s Z gate operates on qubit state |0⟩, it leaves the state unchanged. If Pauli’s Z gate
operates on qubit state |1⟩,it causes phase change in the qubit state.
H
1 1 1
Schematic representation: Matrix form: � �
√2 1 −1
Page 13 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
1 1 1 1 1 1 1
H |0⟩ = � �� � = � � = (|0⟩ + |1⟩
√2 1 −1 0 √2 1 √2
1 1 1 0 1 1 1
H |1⟩ = � � � � = � � = (|0⟩ - |1⟩)
√2 1 −1 1 √2 −1 √2
1
|0⟩ H (|0⟩ + |1⟩)
√2
1
|1⟩ H (|0⟩ - |1⟩)
√2
Truth Table:
Input Output
1
|𝟎𝟎⟩ (|0⟩ + |1⟩)
√2
1
|𝟏𝟏⟩ (|0⟩ - |1⟩)
√2
CNOT gate:
It is called as Controlled NOT gate which contain a control bit and a target bit. The target
qubit state flips only if the control qubit is 1.
Schematic representation:
Control gate
Target gate
1 0 0 0
Transformation matrix: �0 1 0 0�
0 0 0 1
0 0 1 0
1 0 0 0 1 1
CNOT |00⟩ = �0 1 0 0� �0� = �0� = |00⟩
0 0 0 1 0 0
0 0 1 0 0 0
Page 14 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
1 0 0 0 0 0
CNOT |01⟩ = �0 1 0 0� �1� = �1� = |01⟩
0 0 0 1 0 0
0 0 1 0 0 0
1 0 0 0 0 0
CNOT |10⟩ = �0 1 0 0� �0� = �0� = |11⟩
0 0 0 1 1 0
0 0 1 0 0 1
1 0 0 0 0 0
CNOT |11⟩ = �0 1 0 0� �0� = �0� = |10⟩
0 0 0 1 0 1
0 0 1 0 1 0
Truth Table:
Input Output
Control Target Control Target
|0⟩ |0⟩ |0⟩ |0⟩
|0⟩ |1⟩ |0⟩ |1⟩
|1⟩ |0⟩ |1⟩ |1⟩
|1⟩ |1⟩ |1⟩ |0⟩
Toffoli Gate:
• The Toffoli gate is a three-qubit gate, also known as CCNOT gate with 2 control bits and 1
target bit
• The first two bits are control bits which remains unaffected by the action of Toffoli gate and
third bit is the Target bit which gets inverted if both the control bits are '1’
• It performs ‘X’ on target if and only if both controls are in the state |1⟩. i.e., Toffoli gate
flips target depending on C1 and C2 .
• It is a universal reversible logic gate.
Control gate 2
Target gate
Page 15 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Truth Table:
Inputs Output
𝑪𝑪𝟏𝟏 𝑪𝑪𝟐𝟐 T 𝑪𝑪𝟏𝟏 𝑪𝑪𝟐𝟐 T
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
⎛0 0 1 0 0 0 0 0⎞
⎜0 0 0 1 0 0 0 0⎟
Toffoli gate = ⎜ ⎟
⎜0 0 0 0 1 0 0 0⎟
⎜0 0 0 0 0 1 0 0⎟
0 0 0 0 0 0 0 1
⎝0 0 0 0 0 0 1 0⎠
It can be verified that this matrix is unitary and thus the Toffoli gate is a legitimate
quantum gate. The quantum Toffoli gate can be used to simulate irreversible classical logic
gates and ensures that the quantum gate is capable of performing any computation that a
classical computer can do.
Page 16 of 17
BNMIT, Bangalore Applied Physics (22PHC112/122) Study Material
Page 17 of 17