0% found this document useful (0 votes)
32 views12 pages

Quantum Computing

gg

Uploaded by

sahilseth416
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views12 pages

Quantum Computing

gg

Uploaded by

sahilseth416
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

1 What is Quantum Computing

An Exciting Avenue
Almost 200 years ago an English mathematician envis-
aged a general purpose computer, the technology re-
quired to implement the design was not available at the
time, it took more than a 100 years to develope the
technology and the astronomical development of classi-
cal computers does not need any explanation. It must
be said that Quantum computing is at similar stage.
However development is on a tremendous speed. The
development of Quantum computers is going to trans-
form into a practical and operational technology.

Classical Bits Quantum Bits


Can be into two distinct states 0/1 Can be in state |0⟩ or |1⟩ or any linear
combination of the two.
Can be measured Can be measured partially
not changed by measurement changed by measurements
can be copied can not be copied
can be erased can not be erased

In classical computer any n-bit number represents only one possible state out
2n − 1 possible states. However owing to super-position and entanglement any
n-qubit system can represent all 2n states at the same time. This implies that
adding more qubit increases the number of possible states exponentially.
To double the power of a digital computer 32 bits → 64 bits, however to
double the power of a quantum computer 32 qubits → 33 qubits.
64-bit computer can perform manipulation on 64-bit binary number at a
time. However, a single 64-qubit quantum computer operates in a space of 264
dimensions, or roughly 16, 000, 000, 000, 000, 000, 000 i.e. (16 × 1018 ) number
of states of the quantum system. This makes it much easier to solve complex
problem using quantum computers.

1
A single caffeine molecule is made up of 24 atoms
and it can have 1048 quantum states (there are only
1050 atoms that make up our beloved planet Earth).
Modeling caffeine precisely is simply not possible
with with even the most powerful (classical) super
computers. However this molecule may be simu-
lated with the help of a quantum computer having
as many as 160 qubits.
A Quantum Computer is a device that leverages specific properties described
by quantum mechanics to perform computation.
Every classical (that is non-quantum) computer can be described by quantum
mechanics since quantum mechanics is the basis of the physical universe. How-
ever, a classical computer does not take advantage of the physical properties
and states that quantum mechanics affords us in doing calculation.
We will be using Dirac notation, linear algebra and other tool extensively.
A qubit is quantum bit. A qubit is similar to a classical bit in that it can
take on 0 or 1 as states, but it differs from a bit in that it can also take on a
continuous. In Quantum Mechanics (QM) we represent states as vectors and
operators as matrices, use Dirac notation instead of traditional linear algebra
symbols to represent vectors.
We can represent a qubit as a two dimensional complex Hilbert space C2 . The
state of the qubit at any given time can be represented by a vector in this
complex Hilbert Space.

! !
1 0
|0⟩ = |1⟩ =
0 1

In short-hand notation |0⟩ is called ket zero and |1⟩ is called ket one. similarly,
expressing the vector in row notation
   
⟨0| = 1 0 ⟨1| = 0 1

In short-hand notation ⟨0| is called bra zero and ⟨1| is called bra one. This
Dirac notation is common known as bra-ket notation. A set of mathematical
operations

2
! !
1   0 1
|0⟩⟨1| = 0 1 =
0 0 0
! !
0   0 0
|1⟩⟨0| = 1 0 =
1 1 0
! !
1   0 0
|1⟩⟨1| = 1 0 =
0 0 1
!
0 1
|0⟩⟨1| + |1⟩⟨0| =
1 0

2 Superposition of State
generally speaking

|ψ⟩ = α|0⟩ + β|1⟩

where α and β ∈ C, with scaling factor of α and β the condition is fixed


α + β 2 = 1.
2

x3
|0⟩

⃗a

θ x2
ϕ

x1

|1⟩

We represent a superposition of the states as a linear combination of the


computational bases of the state space. Each term in the superposition has a

3
complex coefficient or amplitude.
1
|+⟩ = √ (|0⟩ + |1⟩)
2
1
|−⟩ = √ (|0⟩ − |1⟩)
2
These two states differ by a minus sign on the |1⟩ state.

3 Quantum Circuits
We use circuits to depict the quantum circuits. We construct and read these
diagrams from left to right. A quantum circuit which specifies operators which
we apply to which qubit or qubits in which order. We begin the construction
of a quantum circuit diagrams with circuit wire which is represented as Initial

prepared state of the circuit is labels on the left

|0⟩

4 Quantum Operators
In this section we discuss the set of commonly used quantum operators. A
quantum operator could be unary, binary or ternary operator.

In the first section we cover the set of one-bit or unary quantum operators.
The first three operators are known as Pauli’s operators. These three matrices
along with the identity matrix and all of their ±1 and ±i multiples constitute
what is known as Pauli group.

4
4.1 Pauli-X
This is the NOT operator (also
known as bit flip operator). X
!
0 1
X :=
1 0

if we apply X to |0⟩ then we have


! ! !
0 1 1 0
= = |1⟩
1 0 0 1

X := |0⟩⟨1| + |1⟩⟨0|

|0⟩ |1⟩
Next we have the Y operator, which rotates the state vector about y-axis
The diagram for the Y operator is

!
0 −i
Y =
i 0

so that if we apply it to the |1⟩ state


we have
! ! !
0 −i 0 −i
= = −i|0⟩
i 0 1 0

And the Z operator, which rotates the state vector about the z−axis (also
called the phase flip operator since it flips it by π-radians or 180◦ degrees)

5
The diagram for the Z operator

! Z
1 0
Z=
0 −1

If we apply Z to the computational


basis state we have

Z|j⟩ = (−1)j |j⟩

! ! !
1 0 0 0
= = −|1⟩
0 −1 1 −1

Note that we can multiply the bit-flip operator X by the phase-flip operator Z
to yield the Y operator with global phase shift of i. i.e. Y = iXZ.
Pauli Z operator is just a special case of Rϕ where ϕ = π. Let’s recall that
eiπ = −1 by Euler’s identity so we can replace eiπ with −1 in the Z matrix.
The circuit diagram for the R operator is

Two additional phase shift operator that are special cases of Rϕ matrix. First,
the S operator, where ϕ = π/2
!
1 0
S :=
0 i

The S operator thus rotates the state about the z−axis by 90◦ . The circuit
diagram for the S operator is

The T operator rotates the state about the z−axis by 45◦ . If we give ϕ the
value of π/4 then
!
1 0
T := π
0 ei 4

6
4.2 Hadamard Operator
The operator is crucial is quantum computing since it enables us to take a qubit
from a definite computational basis state into a superposition of two states. The
Hadamard matrix
The diagram for the H operator is
!
1 1 1 H
H := √
2 1 −1

If we apply Hadamard to state |0⟩


we obtain
! !
1 1 1 1 1
√ = √ (|0⟩ + |1⟩)
2 1 −1 0 2

and to state |1⟩ we have


! !
1 1 1 0 1
√ = √ (|0⟩ − |1⟩)
2 1 −1 1 2

The identity operator is simply the matrix which maintains the current state of
qubits. So for one qubit we can use
!
1 0
I :=
0 1

Having covered the set of unary opertors, we can show the following identities:

HXH = Z
HZH = X
HY H = −Y
H† = H
H2 = I

7
5 Binary Operator
Consider two qubits, or binary operators. In a two-qubit systems, by convention,
we use the following computational basis states:
       
0 0 0 0
0 1 0 0
|00⟩ =  |01⟩ =   |10⟩ =  |11⟩ =   (1)
       
0 0 1 0
0 0 0 1

The swap operator takes the state |01⟩ to |10⟩ and of course |10⟩ to |01⟩. We
can represent this operator with the following matrix.
 
1 0 0 0
0 0 1 0
SWAP := 
 

0 1 0 0
0 0 0 1
When this operator is applied to one of the two-qubit computational basis vec-
tors will have the desired results. For the circuit diagram of the SWAP operator

The most critical operator for quantum computing is the controlled Not Gate
(CNOT) gate. The first qubit is identified as control bit and the second bit
is identified as target qubit. If control qubit is in |0⟩ state we do nothing to
the target qubit. However, the control qubit is in state |1⟩ we apply NOT gate
operator (X) to the target qubit. We use CNOT gate to to entangle two qubits
in QC. In matrix notation CNOT Gate is represented as
 
1 0 0 0
0 1 0 0
CNOT := 
 

0 0 0 1
0 0 1 0

computation of CNOT on |10⟩ would lead to |11⟩


    
1 0 0 0 0 0
0 1 0 0 0 0
   
   =   = |11⟩
 

0 0 0 1 1 0
0 0 1 0 0 1
The circuit diagram for CNOT gate is illustrated as

8
The SWAP and CNOT gates are related as illustrated below

SWAP = CNOTij CNOTji CNOTij

CZ gate has a control bit and target bit just as CNOT, However, here if control
bit is one we apply Z operator to the target bit

 
1 0 0 0
0 1 0 0
CNOT := 
 

0 0 1 0
0 0 0 −1

The CZ operator is also illustrated as

Unlike CNOT operator, the CZ gate is symmetric, w can choose either qubit as
the control or the target and end up with same result. That’s why CZ gate has
dots on both circuit wires.

5.1 Ternary Operator


First Ternary or 3-qubit operator is the Toffoli operator commonly known as
CCNOT gate. Just as with CNOT gate, we have control and target qubits. the
first two bits are control qubits and the third qubit is the target bit. When both
control bits are in state |1⟩ the target qubit is modified. This gates is similar to
Boolean AND function

(x, y, z) → (x, y, (z⊕)xy)

9
 
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 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

The Fredkin gate, also known as CSWAP gate has a control and two other
target gates. If first qubit is in state |0⟩ we do nothing and it is in state |1⟩ we
SWAP the other two qubits with each other. The matrix representation of this
operation is
 
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
CSWAP := 
 

0 0 0 0 1 0 0 0
 
0 0 0 0 0 0 1 0
 
0 0 0 0 0 1 0 0
 
 
0 0 0 0 0 0 0 1

e.g. Fredkin gate applied to |110⟩ gives

    
1 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
    
    
0 0 1 0 0 0 0 0 0 0
   

0 0 0 1 0 0 0 0 0 0
   
CSWAP :=     =   = |101⟩

0 0 0 0 1 0 0 0 0 0
   

0 0 0 0 0 0 1 0 0 1
   

0 0 0 0 0 1 0 0 1 0
    

0 0 0 0 0 0 0 1 0 0

The Fredkin gate is illustrated as

10
6 Comparison with Classical Gates
In classical computing commonly used gates AND, NOT, OR, NAND, XOR,
FANOUT etc. We can construct any complex logic with the combination of
these gates. A classical computer that can run these gates is called Turing
Complete or Universal. It can be shown that NAND gate alone is enough
to construct all other classical gates (so is NOR gate). Neither AND, OR,
XOR, NAND and FANOUT gates can be used in Quantum Computing. These
gates are non-reversible. The Fan-out gate would not be allowed in quantum
computing since it involves duplication or cloning of a state;

6.1 Universality of Quantum Operators


If NAND is universal for classical computing, there are several combination of
unary and binary operators that lead to universality. Not set of unary and
binary operators on their own can lead to universal QC. The two sets of gates
that yield to universality are:

1. The Toffoli gate is universal for QC when paired with basis-changing unary
operator with real coefficients (such as H).

2. Another set of gates which is universal is {CNOT, T and H}.

7 Measurement
Measurement in classical physics is seemingly straightforward process. The act
of measurement is assumed to have no effect on the item that we are measuring.
Furthermore, we have the ability to measure one property and be confident that
the first property measured still retains its observed value. Not so in Quantum
mechanics; in this regime, the act of measurement has a profound effect on the
observation.
Building on the principles of quantum mechanics, we can state the measurement
postulate as

11
7.1 Measurement Postulate
Every measurable physical quantity o is described my corresponding Hermitian
operator O, acting on the state Ψ. According to this postulate there exist an
Hermitian operator, which we can call an observable x̂ is associated with the
position of a particle. We recall that a Hermitian operator is equal to its adjoint.
If O is Hermitian then we can state that O = O† .
Hermitian operators have the desirable property that their eigenvalues are gau-
ranteed to be real numbers. When measuring a physical system for properties
outcome of the measurement.
The measurement in quantum circuit is represented as

A basic quantum circuit

|0⟩ H

|0⟩

Let we have two qubits q0 and q1, each prepare in state |0⟩. Applying Hadamard
operator to q0 which puts it into superposition states
1
|q0⟩ = √ |0⟩ + |1⟩
2
As we apply CNOT across q0 and q1. This entangles the two qubits so we have
the combined non separable state of the two qubits
1
√ |00⟩ + |11⟩
2
This is called the Bell state or EPR pair. Wet then measure q0 with a 50/50
chance of finding a 0 or a 1 value for the real- valued output.

12

You might also like