Lecture 4 - Quantum Circuit Model, Entanglement, Superdense Coding 02.03.2020
Total Page:16
File Type:pdf, Size:1020Kb
Ozye˘ginUniversity¨ Spring 2020 CS480/CS580 Quantum Computing Lecture 4 - Quantum Circuit Model, Entanglement, Superdense Coding 02.03.2020 Scribe: Eren Balatkan Lecturer: Ozlem¨ Salehi K¨oken 4 Quantum Circuit Model In this section, we will be talking about the quantum circuit model. 4.1 1-Qubit Gates Not (X) : Corresponds to a 180 rotation around X - Axis 0 1 Z j0i X = 1 0 X j0i = j1i Y j0i X j0i X j1i = j0i X(α j0i + β j1i) = β j0i + α j1i j1i Y-Gate (Y) : Corresponds to a 180 rotation around Y - Axis 0 −i Z j0i Y = i 0 Y j0i = i j1i Y j0i X j0i Y j1i = −i j0i Y (α j0i + β j1i) = −βi j0i + α j1i j1i 1 Z-Gate (Z) : Corresponds to a 180 rotation around Z - Axis 1 0 Z j0i Z = 0 −1 Z j0i = j0i Y j0i X j0i Z j1i = − j1i Z(α j0i + β j1i) = α j0i + −β j1i j1i Rotation Gates Let jΨi be a quantum state and let µ be a unitary operator. The action of µ on jΨi can be thought as a rotation on the Bloch sphere −iθX=2 Rx(θ) = e −iθY=2 Ry(θ) = e −iθZ=2 Rz(θ) = e If A2 = I; eiAx = cos(x)I + isin(x)A 0 θ θ 1 cos −isin θ θ B 2 2 C Rx(θ) = cos I + isin X = B C 2 2 θ θ @ −isin cos A 2 2 0 θ θ 1 cos −sin θ θ B 2 2 C Ry(θ) = cos I + isin Y = B C 2 2 θ θ @ sin cos A 2 2 θ θ R (θ) = e−iθZ=2 = cos I − Z z 2 2 0 θ 1 0 θ 1 cos 0 isin 0 2 2 = B C − B C B θ C B θ C @ 0 cos A @ 0 −isin A 2 2 0 θ θ 1 cos − isin 0 2 2 = B C B θ θ C @ 0 cos + isin A 2 2 e−iθ=2 0 = 0 eiθ=2 2 Example: σ σ Let jΨj = cos j0i + ei'sin j1i 2 2 0 σ 1 −iθ=2 cos e 0 2 Rz(θ) = iθ=2 @ σ A 0 e ei'sin 2 0 σ 1 e−iθ=2cos = @ 2 σ A eiθ=2ei'sin 2 σ σ = e−iθ=2cos j0i + eiθ=2ei'sin j1i 2 2 σ σ = e−iθ=2(cos j0i + eiθei'sin j1i) 2 2 σ σ = e−iθ=2(cos j0i + ei(θ+')sin j1i) 2 2 Effect of Rz(θ) is to change the angle ' to ' + θ which is a rotation around z-axis iα Theorem 1. Suppose µ is a 1-Qubit unitary gate. Then there exists α; β; γ and δ such that µ = e Rz(β)Ry(γ)Rz(δ) Theorem 2. Any unitary µ can be expressed as µ = eiαAXBXC where ABC = I, A,B,C are unitary S-Gate T-Gate 1 0 1 0 S = T = 0 i 0 eπi=4 S = Rz(π=2) T = Rz(π=4) S2 = Z T 2 = S Hadamard Gate (H) ! 1 1 p1 p1 H = p1 = 2 2 2 1 −1 p1 − p1 2 2 ! ! p1 p1 1 p1 j+i = H j0i = 2 2 = 2 = p1 j0i + p1 j1i p1 − p1 0 p1 2 2 2 2 2 ! ! p1 p1 0 p1 |−i = H j1i = 2 2 = 2 = p1 j0i − p1 j1i p1 − p1 1 − p1 2 2 2 2 2 3 1 1 H j+i = H p j0i + p j1i 2 2 1 1 1 1 1 1 = p p j0i + p j1i + p p j0i − p j1i 2 2 2 2 2 2 1 1 1 1 = j0i + j1i + j0i − j1i 2 2 2 2 = j0i H2 = I (H ⊗ H)(j00i) = H⊗2 j00i 1 1 = p (j0i + j1i) ⊗ p (j0i + j1i) 2 2 1 1 1 1 = j00i + j01i + j10i + j11i 2 2 2 2 1 n H⊗n j0:::0i = p P2 −1 jxi where x is written in binary 2n x=0 1 1 1 1 H⊗3 j000i = p P7 jxi = p j000i + p j001i + ::: + p j111i 8 x=0 8 8 8 Hadamard corresponds to a rotation of π around p1 ; 0; p1 . When restricted to real amplitudes, Hadamard 2 2 is a reflection matrix in 2D plane over angle π=8 j0i j+i H π=8 j1i 4 4.2 Multi-Qubit Gates Controlled Not (CNOT) 0 1 1 0 0 0 CNOT j10i = j11i B 0 1 0 0 C CNOT = B C @ 0 0 0 1 A CNOT j11i = j10i 0 0 1 0 CNOT j01i = j01i CNOT j00i = j00i Example: Let jΨi = p1 j00i + p1 j10i = p1 j0i + p1 j1i ⊗ j0i 2 2 2 2 CNOT (jΨi = p1 j00i + p1 j11i) 2 2 Controlled Z-Gate (CZ) 0 1 1 0 0 0 CZ j00i = j00i B 0 1 0 0 C CZ = B C @ 0 0 1 0 A CZ j01i = j01i 0 0 0 −1 CZ j10i = j10i CZ j11i = − j11i Toffoli Gate (CCX) 0 1 1 0 0 0 0 0 0 0 CCX j000i = j000i B0 1 0 0 0 0 0 0C B C B0 0 1 0 0 0 0 0C B C CCX j101i = j101i B0 0 0 1 0 0 0 0C CCX = B C B0 0 0 0 1 0 0 0C B C CCX j110i = j111i B0 0 0 0 0 1 0 0C B C @0 0 0 0 0 0 0 1A 0 0 0 0 0 0 1 0 CCX j111i = j110i 5 Example: C4NOT : Apply NOT to target if 4 control qubits are in state j1i ? Input 1 Input 2 Input 3 Input 4 Ancilla 1 Ancilla 2 Target Example: Apply NOT to target if control qubit is on state j0i ? Input 1 X X Target 6 5 Basic Quantum Protocols 5.1 Entanglement Suppose that we have a quantum system in jΨi = j00i. Let's apply the following operations. Qubit 1 H Qubit 2 1 1 (H ⊗ I)(j00i) = p j0i + p j1i ⊗ j0i 2 2 1 1 = p j00i + p j10i 2 2 CNOT p1 j00i + p1 j10i) = p1 j00i + p1 j11i 2 2 2 2 If we measure first qubit and observe j0i, then the second qubit collapses to j0i. Similarly, if we measure the second qubit and observe j1i, then the second qubit collapses to j1i. This is true even if the qubits are seperated from each other. This is called entanglement. Bell States •j Φ+i = p1 j00i + p1 j11i 2 2 •j Φ−i = p1 j00i − p1 j11i 2 2 •j Ψ+i = p1 j01i + p1 j10i 2 2 •j Ψ−i = p1 j01i − p1 j10i 2 2 The states above are known as the Bell states and they are entangled states. Entangled states can not be written as a tensor product of two subsystems. 7 5.2 Superdense Coding Suppose that Alice wants to send Bob two classical bits of information. Alice will send only a single qubit to Bob to achieve this task. • Initially, Alice and Bob have an entangled pair of qubits in state p1 j00i + p1 j11i. 2 2 • Alice has the first qubit and Bob has the second qubit. Alice wants to send two bits of classical information, ab, to Bob. • If a=1, Alice applies Z-Gate to her qubit. • If b=1, Alice applies X and sends to Bob. ab Operation Result |||{ |||{ |||{ 00 - p1 j00i + p1 j11i 2 2 01 X p1 j10i + p1 j01i 2 2 10 Z p1 j00i − p1 j11i 2 2 11 XZ p1 j10i − p1 j01i 2 2 • Now Bob has both qubits. • Bob applies CNOT where first qubit is control and second qubit is target. • Bob applies Hadamard to first qubit • He makes the measuerment and observes quantum state jabi 1'st Case - j00i 1 1 jΨi = CNOT p j00i + p j11i 2 2 1 1 = p j00i + p j10i 2 2 1 1 1 1 1 1 (H ⊗ I) jΨi = p p j0i + p j1i j0i + p p j0i − p j1i j0i 2 2 2 2 2 2 1 1 1 1 = p j00i + p j10i + p j00i − p j10i = j00i 2 2 2 2 2'nd Case - j01i 1 1 jΨi = CNOT p j10i + p j01i 2 2 1 1 = p j11i + p j01i 2 2 1 1 1 1 1 1 (H ⊗ I) jΨi = p p j0i − p j1i j1i + p p j0i + p j1i j1i 2 2 2 2 2 2 1 1 1 1 = p j01i − p j11i + p j01i − p j11i = j01i 2 2 2 2 8.