Introduction to quantum computer
October 7, 2003
Outline
• Quantum bits – single qubit – multiple qubit
• Quantum computation – Single qubit gates – Multiple qubit gates – Quantum circuits
Quantum bits – Single qubit
What is a Qubit ?
• a qubit is a vector in 2D complex vector space
• a classicl bit has a state - either 0 or 1
• a qubit can in a state other |0i or |1i
it can in a linear combination of state : superposition
|ψi = α|0i + β|1i
• |0i and |1i are two orthenormal basis of the 2D vector space (|0i, |1i) = h0|1i = 0
• matrix representation:
|0i =
"
1 0
#
|1i =
"
0 1
#
|ψi = α|0i + β|1i =
"
α 0
#
+
"
0 β
#
=
"
α β
#
Measurement
• A measurement on the qubit
|ψi = α|0i + β|1i would give EITHER
|0i with the probability |α|2 ,or
|1i with the probability |β|2 .
• normalization : |α|2 + |β|2 = 1
• the state becomes what you measured after measurement
multiple qubit
How about 2 Qubits ?
• classically, 4 possible states 00, 01, 10, and 11
• QM: a superposition of 4 states |00i, |01i, |10i, and |11i
• assuming the state vector describing 2 qubits is
|ψi = α00|00i + α01|01i + α10|10i + α11|11i
• normalization: Px∈{0,1}2 |αx|2 = 1
• measuring the 1st qubit give 0 with the probability
|α00|2 + |α01|2
• the post-measurement state
|ψ0i = α00|00i + α01|01i
q
|α00|2 + |α01|2
Bell state or EPR pair
An important two qubit state
|00i + |11i
√2
• measuring 1st qubit gives 2 possible results
– 0 with the probability 1/2, and the post-measurement state |00i
– 1 with the probability 1/2, and the post-measurement state |11i
• measuring 2nd qubit ALWAYS gives the same result with the 1st measuement
N qubits
A superposition of the 2n states
|ψi = X
xn=0,or1
α···|x1x2 · · · xni
Quantum computation
Single qubit gates
• classical NOT gate:
0 → 1 , and 1 → 0
• quantum NOT gate:
|0i → |1i , |1i → |0i
• how about superposition state ?
α|0i + β|1i → β|0i + α|1i
Matrix representation
• the matrix representation of quantum NOT gate is:
X ≡
"
0 1 1 0
#
•
X|0i =
"
0 1 1 0
# "
1 0
#
=
"
0 1
#
= |1i
•
X(α|0i + β|1i) =
"
0 1 1 0
# "
α β
#
=
"
β α
#
= β|0i + α|1i
What kinds of matrix can be a quantum gate ?
• We requires the normalization condition
|α|2 + |β|2 = 1 , for |ψi = α|0i + β|1i
• This will be hold after acting of the quantum.
|ψ0i = α0|0i + β0|1i
• It turns out the matrix repersenting the gate is the unitary matrix U
U†U = I
Another single qubit gates
• Z gate
Z ≡
"
1 0 0 −1
#
• Hadamard gate
H ≡ √1 2
"
1 1 1 −1
#
•
H(|0i) = |0i + |1i√ 2 H(|1i) = |0i − |1i√
2
•
H(H|ψi) = (HH)|ψi = I|ψi = |ψi
multiple gubit gates
the controlled-NOT(CNOT) gate
• if the control qubit is set to 0, then the target qubit left alone.
• if the control qubit is set to 1, then the target qubit is flipped.
• |00i → |00i ; |01i → |01i ; |10i → |11i ; |11i → |10i .
• |A, Bi → |A, B ⊕ Ai, where ⊕ is addition modulo two
Controlled-NOT gate
matrix representation
UCN =
1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
UCN† UCN = I
Measurement gate
• a measurement gate performs the measurement
• measurement of a sigle qubit in the state α|0i + β|1i yields the result 0 or 1
• the state after measurement becomes |0i or |1i
• the respective probabilities is |α|2 and |β|2
Quantum circuits
• swap circuit
|a, bi → |a, a ⊕ bi
→ |a ⊕ (a ⊕ b), a ⊕ bi = |b, a ⊕ bi
→ |b, (a ⊕ b) ⊕ bi = |b, ai
Quantum circuits
• no clone theory
– if gate U could clone any quantum state |αi U (|αi|0i) = |αi|αi
– U did not depend on |αi alone
U (|βi|0i) = |βi|βi
– what will happen if we want to clone |γi = |αi + |βi ? U (|γi|0i) = U(|αi + |βi)|0i = |αi|αi + |βi|βi 6= |γi|γi
Quantum circuits
• example: circuit to creat Bell state
• target state
|β00i = |00i + |11i
√2
|β01i = |01i + |10i
√2
|β10i = |00i − |11i
√2
|β11i = |01i − |10i
√2