Chapter 4 Quantum circuits - University of Minnesota...

7
Chapter 4 Quantum circuits 4.1 Single q-bit gates A single q-bit in matrix notations is given by |ψ= α|0+ β |1= α 1 0 + β 0 1 = α β (4.1) And the single q-bit gates are given by unitary 2x2 matrices such as Pauli X matrix: X 0 1 1 0 Pauli Y matrix: Y 0 i i 0 Pauli Z matrix: Z 1 0 0 1 Hadamard gate: H 1 2 1 1 1 1 Phase gate: S 1 0 0 i = e iπ/4 e iπ/4 0 0 e iπ/4 π/8 gate : T 1 0 0 e iπ/4 = e iπ/8 e iπ/8 0 0 e iπ/8 (4.2) 4.2 Bloch sphere Consider the following parametrization of the state of a single q-bit |ψ= e iγ cos θ 2 |0+ e iϕ sin θ 2 |1 (4.3) 44

Transcript of Chapter 4 Quantum circuits - University of Minnesota...

Chapter 4

Quantum circuits

4.1 Single q-bit gates

A single q-bit in matrix notations is given by

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

(

10

)

+ β

(

01

)

=

(

αβ

)

(4.1)

And the single q-bit gates are given by unitary 2x2 matrices such as

Pauli Xmatrix: X ≡(

0 11 0

)

Pauli Y matrix: Y ≡(

0 −ii 0

)

Pauli Zmatrix: Z ≡(

1 00 −1

)

Hadamard gate: H ≡1√2

(

1 11 −1

)

Phase gate: S ≡(

1 00 i

)

= eiπ/4(

e−iπ/4 00 eiπ/4

)

π/8 gate : T ≡(

1 00 eiπ/4

)

= eiπ/8(

e−iπ/8 00 eiπ/8

)

(4.2)

4.2 Bloch sphere

Consider the following parametrization of the state of a single q-bit

|ψ⟩ = eiγ(

cosθ

2|0⟩+ eiϕ sin

θ

2|1⟩)

(4.3)

44

CHAPTER 4. QUANTUM CIRCUITS 45

with γ ∈ [0, 2π),ϕ ∈ [0, 2π) and θ ∈ (0, π], where WLOG we can set γ = 0since the overall phase in unobservable

|ψ⟩ = cosθ

2|0⟩+ eiϕ sin

θ

2|1⟩. (4.4)

Then the states of the q-bit are described by longitudinal ϕ and azimuthal θangles on the so called Bloch sphere.

The Bloch sphere is S2 which can be embedded in R3 using the following

CHAPTER 4. QUANTUM CIRCUITS 46

mapf : (φ, θ) → (cos φ sin θ, sinϕ sin θ, cos θ). (4.5)

Then rotations of vectors on the Bloch sphere can be generated by Paulimatrices

Rx(θ) ≡ e−iθX/2 = cosθ

2I − i sin

θ

2X =

(

cos θ2 −i sin θ

2−i sin θ

2 cos θ2

)

(4.6)

Ry(θ) ≡ e−iθY/2 = cosθ

2I − i sin

θ

2Y =

(

cos θ2 − sin θ

2sin θ

2 cos θ2

)

(4.7)

Rz(θ) ≡ e−iθZ/2 = cosθ

2I − i sin

θ

2Z =

(

exp(

−iθ2)

00 exp

(

iθ2)

)

(4.8)

4.3 Decomposition of q-bit.

An arbitrary unitary operation on a single q-bit can be expressed as

U = eiαRz(β)Ry(γ)Rz(δ) (4.9)

If we denote

A ≡ Rz(β)Ry(γ/2) (4.10)

B ≡ Ry(−γ/2)Rz(−(δ + β)/2) (4.11)

C ≡ Rz((δ − β)/2) (4.12)

then

ABC = Rz(β)Ry(γ/2)Ry(−γ/2)Rz(−(δ + β)/2)Rz((δ − β)/2) = I (4.13)

But since

X2 =

(

0 11 0

)(

0 11 0

)

=

(

1 00 1

)

= I (4.14)

XYX =

(

0 11 0

)(

0 −ii 0

)(

0 11 0

)

=

(

0 i−i 0

)

= −Y (4.15)

XZX =

(

0 11 0

)(

1 00 −1

)(

0 11 0

)

=

(

−1 00 1

)

= Z (4.16)

we have

XBX = XRy(−γ/2)Rz(−(δ + β)/2)X

= XRy(−γ/2)XXRz(−(δ + β)/2)X

= XRy(−γ/2)XXRz(−(δ + β)/2)X

= Ry(γ/2)Rz((δ + β)/2) (4.17)

CHAPTER 4. QUANTUM CIRCUITS 47

and thus

AXBXC = Rz(β)Ry(γ/2)Ry(γ/2)Rz((δ + β)/2)Rz((δ − β)/2)

= Rz(β)Ry(γ)Rz(δ) (4.18)

or from (4.9)U = eiαAXBXC (4.19)

where ABC = I.

4.4 Controlled operations with a single bit

The controlled NOT gate (or CNOT gate) is given by

UCNOT =

1 0 0 00 1 0 00 0 0 10 0 1 0

(4.20)

such that|a, b⟩ → |a, a⊕ b⟩ (4.21)

where ⊕ is sum module two. We can now generalize the CNOT to controlledU gate for arbitrary single q-bit unitary gate U using the decomposition ofeq. (4.19). First let us define the Phase Shift gate (which generalizes π/8 (orT ) and Phase (or S) gates)

(

1 00 eiα

)

whose action on the first (or controlled) bit is given by

|00⟩ → |00⟩|01⟩ → |01⟩|10⟩ → eiα|10⟩|11⟩ → eiα|11⟩.

But this is equivalent to the controlled operation of gate(

eiα 00 eiα

)

CHAPTER 4. QUANTUM CIRCUITS 48

on the second q-bit. Now it is easy to check that the following circuit

has the following action on the second bit

I = ABC if the first bit is 0

orU = eiαAXBXC if the first bit is 1.

Note that the state of controlled bit was taken to be |1⟩ when the unitaryoperation is preformed on the second q-bit, but (more generally) one maytake the controlled state to be |0⟩ or any other state of the first q-bit.

4.5 Controlled operations with multiple bits

More generically one could imagine controlled operations with multiple bits,

Cn(U)|x1x2x3...xn⟩|ψ⟩ = |x1x2...xn⟩Ux1·x2·x3...·xn|ψ⟩.

For example, if V 2 = U , then the following circuit is equivalent to C2(U)

In a special case C2(U) = C2(X), V = (1 + i) (I + iX) /2 so that

V 2 =(1− i)2 (I + iX)2

4=

(1− 2i− 1)(I + 2iX − I)

4= X.

It turns out that arbitrary unitary operation to an arbitrary good approx-imation can composed of only Hadamard (H), phase (S), controlled-NOTand π/8 (T ) gates. For example the Toffoli gate is given by the followingcircuit

CHAPTER 4. QUANTUM CIRCUITS 49

and using the Toffoli gate one can employ the so-called work bits to conditionthe unitary operation on an arbitrary number of control bits. How?

4.6 Measurement Principles

There are two important (but trivial) measurement principles which applyto any quantum circuit:

1. Principle of deferred measurement. Measurement can always be movedfrom an intermediate stage of a quantum circuit to the end of the cir-cuit; if the measurement results are used at any stage of the circuitthen the classically controlled operations can be replaced by conditionalquantum operations.For example in the quantum teleportation circuit the measurement maybe delayed until the very end. This would not change the overall actionof the circuit on the q-bits, although the interpretation of teleportationwould get lost.

(a) Principle of implicit measurement. Without loss of generality, anyunterminated quantum wires (q-bits which are not measures) at theend of a quantum circuit may be assumed to be measured.This is just a statement of the fact that the reduced density matrix(of any subset of q-bits) is insensitive to whether any other q-bits(which are not in the subset) were measured.

4.7 Universal Quantum Gates

One can show that an arbitrary unitary matrix U on a d- dimensional Hilbertspace can be decomposed into a product of d two-level matrices (i.e. matricesacting non-trivially on only two or fewer components),

U = U1U2U3...Ud.

CHAPTER 4. QUANTUM CIRCUITS 50

Moreover any two-level unitary matrix acting on a space of n q-bits canbe implemented using only single q-bit gates and CNOT gates. These tworesults imply that single q-bit gates and CNOT gates form a universal setof gates which can be used to compute arbitrary transformation.Due to the continuum infinity of single-bit gates this universal set is stillpretty large,

{All singe qbit gates , CNOT}

and one might wonder whether it is possible to approximate and arbitraryunitary transformation with only a finite set of gates such as

{Hadamard,Phase, π/8, CNOT}.

It is in fact possible to approximate and arbitrary unitary transformationwith only these gates and the overhead is only polynomial (compared to thecircuit from with arbitrary q-bit gates), but does depend on the desired pre-cision. Of course the main problem is that the circuit representing a unitarytransformation in a system of n q-bits generically requires an exponentialnumber of gates. Why?