Module 5
Quantum Computing
Pauli matrices
Pauli matrices are a set of three 2 × 2 complex matrices which are Hermitian and Unitary.
There are four extreamly useful Pauli matrices are of the following form
1 0
σ0 = I =
0 1
The above matrix is called an identity matrix.
0 1
σ1 = σx = X =
1 0
0 −i
σ2 = σy = Y =
i 0
1 0
σ3 = σz = Z =
0 −1
Where X, Y and Z are called Pauli gates
Pauli matrices operating on 0 and 1 states
1 0 1 1
1. σ0 |0i = = = |0i
0 1 0 0
1 0 0 0
σ0 |1i = = = |1i
0 1 1 1
When, identity matrix operates on |0i and |1i, it geneates |0i and |1i, respectively.
0 1 1 0
2. σx |0i = = = |1i
1 0 0 1
0 1 0 1
σx |1i = = = |0i
1 0 1 0
When, Pauli X gate operates on |0i and |1i, it geneates |1i and |0i, respectively.
0 −i 1 0
3. σy |0i = = = i |1i
i 0 0 i
0 −i 0 −i
σy |1i = = = −i |0i
i 0 1 0
When, Pauli Y gate operates on |0i and |1i, it geneates i |1i and −i |0i, respectively.
1
1 0 1 1
4. σz = = = |0i
0 −1 0 0
1 0 0 0
σz = = = − |1i
0 −1 1 −1
When, Pauli Z gate operates on |0i and |1i, it geneates |0i and − |1i, respectively.
Quantum gates: Single qubit gates
In quantum computing, quantum logic gate is a basic quantum circuit operating on a small
number of qubits. A qubit is used to carry out a quantum calculation. The quantum calcu-
lations are achieved by performing a series of fundamental operations, known as quantum
logic gates. They are the building blocks of quantum circuits similar to the classical logic
gates in conventional digital circuits.
Quantum gate is an operation, when it operates on quantum state, i.e., |0i and |1i states,
it will transform the states into some other form. A single qubit has two computational
basis states |0i and |1i. The pictorial representation of the single qubit is as follows,
α |0i + β |1i
Quantum N OT gate or Pauli X gate
In Quantum N OT gate or Pauli X gate, for input |0i, the output is |1i and for input |1i,
the output is |0i. It is analogous to the classical N OT gate. The N OT gate or Pauli X
gate is represented is as follows,
0 1
X=
1 0
The matrix representation and the operation of quantum N OT gate on |0i, |1i and |ψi
are given by,
0 1 1 0
X |0i = = = |1i
1 0 0 1
0 1 0 1
X |1i = = = |0i
1 0 1 0
0 1 α β
X |ψi = = = α |1i + β |0i
1 0 β α
2
Thus, the quantum state becomes α |1i + β |0i. Similarly, The input α |1i + β |0i to the
quantum not gates changes the state to α |0i + β |1i. The quantum not gate circuit and the
truth table are as shown below
Input Output
|1i |0i
|0i |1i
α |0i + β |1i α |1i + β |0i
Pauli Z gate
The Z-gate is represented by Pauli matrix σz or Z. In Z-gate, for input |0i the output
remains unchanged and for input |1i the output is − |1i. The Pauli Z gate is represented
is as follows,
1 0
Z |0i =
0 −1
The matrix representation and the operation of Z-Gate on |0i, |1i and |ψi are as follows,
1 0 1 1
Z |0i = = = |0i
0 −1 0 0
1 0 0 0
Z |1i = = = |1i
0 −1 1 −1
1 0 α α
Z |ψi = =
0 −1 β −β
Z |ψi = Z(α |0i + β |1i) = α |0i − β |1i
The circuit symbol and the truth table of Z-Gate are as follows
Input Output
|1i − |1i
|0i |0i
α |0i + β |1i α |0i − β |0i
3
Hadamard gate
The Hadamard Gate is a truly quantum gate and is one of the most important in quantum
computing. It is has similar characteristics of N OT Gate. It is a self inverse gate. It is
used to create the superpositions of |0i and |1i states. The Hadamard Gate is represented
is as follows,
1 1 1
H= 2 √
1 −1
The matrix representation and the operation of H-Gate on |0i, |1i and |ψi are as follows,
√1
1 1 1 √1
1 (|0i+|1i)
H |0i = = = √ or |+i
2 1 −1 0 2 1 2
√1
1 1 0 √1
1 (|0i−|1i)
H |1i = = = √ or |−i
2 1 −1 1 2 −1 2
√1
1 1 α √1
α+β (α+β)|0i+(α−β)|1i
H |ψi = = = √
2 1 −1 β 2 α−β 2
α(|0i+|1i) β(|0i−|1i)
= √
2
+ √
2
or α |+i + β |−i
The circuit symbol and the truth-table for the Hadamard Gate is as follows
Input Output
(|0i+|1i)
|1i √
2
or |+i
(|0i−|1i)
|0i √
2
or |−i
α(|0i+|1i) β(|0i−|1i)
α |0i + β |1i √
2
+ √
2
or α |+i + β |−i
Phase gate (or S gate)
The Phase gate turns a |0i into |0i and |1i into i |1i. The Phase gate is represented by,
1 0
S=
0 i
The matrix representation and operation of S gate on |0i, |1i and |ψi are given by
1 0 1 1
S |0i = = = |0i
0 i 0 0
4
1 0 0 0
S |1i = = = i |1i
0 i 1 i
1 0 α α
S |ψi = =
0 i β iβ
The transformation of state |ψi is given by
S |ψi = S(α |0i + β |1i) = α |0i + iβ |1i
The circuit symbol and the truth-table for the S Gate is as follows
Input Output
|1i i |1i
|0i |0i
α |0i + β |1i α |0i + iβ |1i
T gate
The T Gate is represented by the matrix as follows,
" #
1 0
T = iπ
0 e4
The operation of T gate on |0i, |1i and |ψi are given by
" #
1 0 1 1
T |0i = iπ = = |0i
0 e4 0 0
" # " #
1 0 0 0 iπ 0 iπ
T |1i = iπ = iπ = e 4 = e 4 |1i
0 e 4 1 e 4 1
" # " #
1 0 α α
T |ψi = iπ = iπ
0 e4 β βe 4
The circuit symbol and the truth-table for the T Gate is as follows
Input Output
iπ
|1i e 4 |1i
|0i |0i
iπ
α |0i + β |1i α |0i + βe 4 |1i