<<

of Quantum Computation I

Wim van Dam Department of Science, University of California at Santa Barbara, Santa Barbara, CA 93106-5110, USA

Notes for the graduate course “Quantum Computation and Quantum Information” (290A), Spring 2005. v1

Complex Values: Let α ∈ C, then we can write this com- does not commute: hψ||φi 6= |φihψ|. However, this multi- plex value as α = x + yi with the real and imaginary compo- plication is associative and distributive. Hence, for exam- 0 0 nents x,y ∈ R. It is often useful to write the value as α = reiϕ ple, |ψi(hφ|+hφ |) = |ψihφ|+|ψihφ | and (|ψihφ|)(|ψihφ|) = with the r ∈ R≥0 and the phase ϕ ∈ [0,2π). The “norm |ψi(hφ|φi)hψ| = |ψihψ| (because hφ|φi = 1). squared” of α equals |α2| = x2 +y2 = r2. The complex conju- Measurement Projection: According to quantum me- gate of α is defined by α¯ = α∗ = x − yi = re−iϕ, which can be chanics, the ‘inner squared’ |hψ|φi|2 = hψ|φihφ|ψi p used in |α|2 = αα∗. The norm |α| = x2 + y2 = r obeys the between two states |ψi and |φi gives the probability that triangle inequality |α + β| ≤ |α| + |β| for all α,β ∈ C. one observes the outcome “|ψi” when one observes the state Finite Dimensional : Let A be a finite set “|φi”. It is straightforward to verify that 0 ≤ |hψ|φi|2 ≤ 1. If of N = |A| states. A , which is in super- hψ|φi = 0, the two states are orthogonal. If |hψ|φi| = 1, then position over all basis states A, is represented by a norm one, the two states are identical up to a general phase factor (be- N complex valued vector ∈ C . In Dirac’s braket notation, a col- cause we can still have hψ|φi = eiγ). Although mathematically umn vector is denoted by a |keti and a row vector by a hbra|. present, such a general phase difference can never be observed ∗ If |ψi = ∑x∈A αx|xi, then hψ| := ∑x∈A αxhx| (note the com- in reality, hence it has no physical relevance. plex conjugation of αx). Given column vector |ψi, the row Product Construction: We can combine the † N M NM N M vector hψ| is also denoted by |ψi and is called the conjugate spaces C and C to a joint space C := C ⊗ C . If A of |ψi. If A = {1,...,N}, we can write in vector and B are the respective basis sets of these two spaces, then N M notation: the joint basis of C ⊗ C is given by the Cartesian product N M  † A × B. As a result, using the ⊗ : C × C → α NM 1 C , we can combine the states α2  |ψi† =   = α∗ α∗ ··· α∗  = hψ|. (1)  .  1 2 N N M  .  |ψi = ∑ αx|xi ∈ C and |φi = ∑ βy|yi ∈ C (5) x∈A y∈B αN

N N to the tensor product state We equip this space with an inner product h·|·i : C ×C → such that it becomes a finite dimensional Hilbert space. For C |ψi ⊗ |φi = |ψ,φi = α β |x,yi ∈ NM. (6) the vectors ∑ x y C x∈A,y∈B |ψi = α |xi and |φi = β |xi (2) ∑ x ∑ x For the of a tensor product it holds that x∈A x∈A (|ψi ⊗ |φi)† = hψ| ⊗ hφ|. the inner product hψ||φi is expressed by the braket If we assume A = {1,...,N} and B = {1,...,M}, then this tensor product equation is described in by ∗ ∗ hψ|φi = ∑ αxβx = hφ|ψi , (3) x∈A   α1β1 ∗ α β where α is the of α ∈ C. The norm of  1 2  N p  .  a vector in C is defined by k|ψik := hψ|ψi, which for a α   β   .  ∗ 1 1   valid state representation is always one: ∑ αxα = 1 (the   x∈A x α2   β2  α1βM  normalization restriction). For vectors the triangle inequality   ⊗   =  . (7)  .   .   α2β1  holds as well: kα|ψi + β|φik ≤ kα|ψik + kβ|φik.  .   .     .  The |·ih·| : N × N → N×N maps two N- αN βM  .  C C C   dimensional vectors to an N × N :  .   .  ∗ αNβM |ψihφ| = ∑ αxβy|xihy|, (4) x,y∈A If |ψi and |φi are norm one vectors, then so is |ψi ⊗ |φi. where |xihy| is the all-zero matrix with one 1 value in the x-th Note that the tensor product does not commute: |ψi ⊗ |φi= 6 row and the y-th column. |φi ⊗ |ψi, but that it is associative and distributive. For exam- Braket Calculus: The difference between the inner and ple, |ψi ⊗ (|φi ⊗ |φ0i) = (|ψi ⊗ |φi) ⊗ |φ0i, and |ψi ⊗ (α|φi + the outer product shows that ‘multiplying’ bras and kets β|φ0i) = |ψi ⊗ α|φi + |ψi ⊗ β|ψ0i = α|ψ,φi + β|ψ,φ0i. 2

Unitary Operations: The group of norm preserving, lin- As was the case with vectors, the tensor product of matrices is N ear operations on C is the group U(N) of unitary, com- not commutative, but it is distributive and associative. Also, if N×N 0 0 0 0 plex valued N × N matrices U ∈ C that obey the equality U,U ∈ U(N) and W,W ∈ U(M), then (U ⊗W)(U ⊗W ) = U ·U† = I. Here U† is the Hermitian conjugate (or the conju- UU0 ⊗WW 0; if U,W are unitary, then so is U ⊗W and (U ⊗ † ∗ † † † gate transpose) of U defined by Ui j := Uji for all 1 ≤ i, j ≤ N, W) = U ⊗W . and I is the N-dimensional identity matrix. As these opera- Eigenvector / Eigenvalue Decomposition: We can de- tions are linear, we have compose a U ∈ U(N) into its eigenvectors |ψ1i,...,|ψNi and its corresponding eigenvalues λ1,...,λN ∈ U|ψi = ∑ αxU|xi (8) . With these values we can express the operator as x∈A C N for all |ψi ∈ N. Hence, if we know the values of U on the C U = ∑ λi|ψiihψi|. (14) basis states |x ∈ Ai, we know the values of U on all quantum i=1 N states in C . We can describe U ∈ U(N) as a summation of The unitarity of U corresponds with the requirement that all outer products by eigenvalues λi have norm one, and that the eigenvectors form a orthonormal basis of N. The identity matrix I has for all U := ∑ Uxy|xihy|, (9) C x,y∈A eigenvalues λi = 1. The conjugate transpose of this U is given by or equivalently Uxy := hx|U|yi, such that by linearity we see N that † ∗ U = ∑ λi |ψiihψi|. (15) i=1 U|ψi = ∑ Uxy|xihy| ∑ αz|zi = ∑ αzUxz|xi. (10) x,y∈A z∈A x,z∈A When U is as above and W ∈ U(M) has eigenvector decom- M Unitary matrices are inner product preserving (and hence position W = ∑ j=1 µ j|φ jihφ j| then for the tensor product we also norm preserving) as is shown by hφ|ψi = hφ|I|ψi = have hφ|U†U|ψi = hφ0|ψ0i, where |φ0i := U|φi and |ψ0i := U|ψi. N M This shows that U is unitary if and only if the row vectors of V ⊗W = ∑ ∑ λiµ j|ψi,φ jihψi,φ j|. (16) N U form a orthonormal basis of C (similarly for the columns i=1 j=1 of U). Quantum Computing: The typical setting for a quantum Just as with vectors, we can define the tensor product be- circuit is quantum mechanical system that is described by tween two matrices. Specifically, if U ∈ U(N) and W ∈ U(M) an n-fold tensor product of two dimensional Hilbert spaces: n are unitary matrices defined by C2 ⊗ C2 ⊗ ··· ⊗ C2 = C2 (where each C2 corresponds to a single qubit). The elementary quantum gates that we can ap- U := U |xihy| and W := W |pihq|, (11) ∑ xy ∑ pq ply to an initial state |0,...,0i are unitary operators that act x,y∈A p,q∈B only a small number of qubits. For example, if we apply the N×N M×M NM×NM 0 1 then for the tensor product ⊗ : C ×C → C we NOT gate X = ( 1 0 ) to the second qubit, then the overall uni- have tary operator is described by I ⊗X ⊗I ⊗···⊗I ∈ U(2n), where

NM×NM the I are the identity operators on the qubits 1,3,...,n. For U ⊗W = ∑ ∑ UxyWpq|x, pihy,q| ∈ C . (12) operators that act on two non-adjacent qubits, the notation be- x,y∈ p,q∈ A B comes a bit tricky. Consider for example a CNOT gate that NM N M This matrix acts on the space C = C ⊗ C spanned by acts on the first and the last qubit. To avoid these problems N the set of basis states A × B. For the states |ψi ∈ C and one can introduce the notation where the identity operators M NM |φi ∈ C we have (U ⊗W)(|ψi⊗|φi) = U|ψi⊗W|φi ∈ C . are omitted, and a subscript is used to indicate on which qubit Again assuming A = {1,...,N} and B = {1,...,M}, the ten- the gates act. Hence the previous NOT circuit has the much n sor product of two matrices is described in matrix notation by shorter description X2 ∈ U(2 ), and the CNOT example be- comes CNOT ∈ U(2n). Regardless, it is often advisable to   1,n U11WU12W ··· U1NW draw a quantum circuit diagram to explain the .  .. .  Further Reading: For more information see Sections 1.2, U21W . .  U ⊗W =   (13) 1.3 and especially Sections 2–2.1.7 in  . .. .   . . .  • Quantum Computation and Quantum Information, UN1W ······ UNNW M.A. Nielsen and I.L. Chuang, Cambridge University   U11W11 U11W12 ··· U1NW1M Press (2000).  ..   U11W21 . U1NW2M  NM×NM =   ∈ C .  . .. .   . . .  UN1WM1 ······ UNNWMM