Quantum Computation Basic Structures - Profs

5 downloads 90 Views 1MB Size Report
Manjit Kumar: Quantum – Einstein, Bohr and Their Great Debate about the Nature ... represented by real numbers R. For quantum systems we need to consider ...
Quantum Computation Basic Structures Alessandra Di Pierro

[email protected] 2011

History

14 December 1900, 5:15pm

History

14 December 1900, 5:15pm

1900 Max Plank: Black Body Radiation

History

14 December 1900, 5:15pm

1900 Max Plank: Black Body Radiation 1905 Albert Einstein: Photoelectric Effect

History

14 December 1900, 5:15pm

1900 Max Plank: Black Body Radiation 1905 Albert Einstein: Photoelectric Effect 1925 Werner Heisenberg: Matrix Mechanics

History

14 December 1900, 5:15pm

1900 Max Plank: Black Body Radiation 1905 Albert Einstein: Photoelectric Effect 1925 Werner Heisenberg: Matrix Mechanics 1926 Erwin Schr¨ odinger: Wave Mechanics

History

14 December 1900, 5:15pm

1900 Max Plank: Black Body Radiation 1905 Albert Einstein: Photoelectric Effect 1925 Werner Heisenberg: Matrix Mechanics 1926 Erwin Schr¨ odinger: Wave Mechanics 1932 John von Neumann: Quantum Mechanics

History

14 December 1900, 5:15pm

1900 Max Plank: Black Body Radiation 1905 Albert Einstein: Photoelectric Effect 1925 Werner Heisenberg: Matrix Mechanics 1926 Erwin Schr¨ odinger: Wave Mechanics 1932 John von Neumann: Quantum Mechanics Manjit Kumar: Quantum – Einstein, Bohr and Their Great Debate about the Nature of Reality, Icon Books 2009

Complex Numbers Quantitative information, e.g. measurement results, is usually represented by real numbers R. For quantum systems we need to consider also complex numbers C.

Complex Numbers Quantitative information, e.g. measurement results, is usually represented by real numbers R. For quantum systems we need to consider also complex numbers C. A complex number z ∈ C is a (formal) combinations of two reals x, y ∈ R: z = x + iy with: i 2 = −1.

Complex Numbers Quantitative information, e.g. measurement results, is usually represented by real numbers R. For quantum systems we need to consider also complex numbers C. A complex number z ∈ C is a (formal) combinations of two reals x, y ∈ R: z = x + iy with: i 2 = −1. z ∈ C is:

The complex conjugate of a complex number z ∗ = z = x + iy = x − iy

Hauptsatz of Algebra Complex numbers are algebraically closed: Every polynomial of order n over C has exactly n roots.

Polar Coordinates

φ r

Conversion x = r · cos(φ) and r=

p x2 + y2

y = r · sin(φ) y φ = arctan( ) x

Another representation: (r , φ) = r · e iφ

e iφ = cos(φ) + i sin(φ),

Vector Spaces A Vector Space (over a field K, e.g. R or C) is a set V together with two operations: Scalar Product . ·. : K × V 7→ V Vector Addition . +. : V × V 7→ V such that (∀x, y , z ∈ V and α, β ∈ K): 1. x + (y + z) = (x + y ) + z 2. x + y = y + x 3. ∃o : x + o = x 4. ∃−x : x + (−x) = o 5. α(x + y ) = αx + αy 6. (α + β)x = αx + βx 7. (αβ)x = α(βx) 8. 1x = x (1 ∈ K)

Tuple Spaces Theorem All finite dimensional vector spaces are isomorphic to the (finite) Cartesian product of the underlying field Kn (i.e. Rn or Cm ). x = (x1 , x2 , x3 , . . . , xn ) y = (y1 , y2 , y3 , . . . , yn )

Algebraic Structure αx = (αx1 , αx2 , αx3 , . . . , αxn ) x + y = (x1 + y1 , x2 + y2 , x3 + y3 , . . . , xn + yn ) Finite dimensional vectors can be represented via their coordinates with respect to a given base.

Hilbert Spaces

A complex vector space H is called an Inner Product Space (or (Pre-)Hilbert Space) if there is a complex valued function h., .i on H × H that satisfies (∀x, y , z ∈ H and ∀α ∈ C): 1. hx, xi ≥ 0 2. hx, xi = 0 ⇐⇒ x = o 3. hαx, y i = α hx, y i 4. hx, y + zi = hx, y i+hx, zi 5. hx, y i = hy , xi The function h., .i is called an inner product on H.

Basis Vectors A set of vectors xi is said to be linearly independent iff X λi xi = λi xi = 0 implies that ∀ i : λi = 0

Basis Vectors A set of vectors xi is said to be linearly independent iff X λi xi = λi xi = 0 implies that ∀ i : λi = 0 Two vectors in a Hilbert space are orthogonal iff hx, y i = 0

Basis Vectors A set of vectors xi is said to be linearly independent iff X λi xi = λi xi = 0 implies that ∀ i : λi = 0 Two vectors in a Hilbert space are orthogonal iff hx, y i = 0 An orthonormal system in a Hilbert space is a set of linearly independent set of vectors with:  1 iff i = j hbi , bj i = δij = 0 iff i 6= j

Basis Vectors A set of vectors xi is said to be linearly independent iff X λi xi = λi xi = 0 implies that ∀ i : λi = 0 Two vectors in a Hilbert space are orthogonal iff hx, y i = 0 An orthonormal system in a Hilbert space is a set of linearly independent set of vectors with:  1 iff i = j hbi , bj i = δij = 0 iff i 6= j

Theorem For a Hilbert space there exists an orthonormal basis {bi }. The representation of each vector is unique: X X x= xi bi = hx, bi i bi i

i

Dirac Notation P.A.M. Dirac “invented” the Bra-Ket Notation Hilbert spaces have an inner product but Typewriters have/had now sub-scripts hx, y i = hx|y i = hx| |y i

Dirac Notation P.A.M. Dirac “invented” the Bra-Ket Notation Hilbert spaces have an inner product but Typewriters have/had now sub-scripts hx, y i = hx|y i = hx| |y i In particular, we enumerate the basis vectors: ~bi

is denoted by

|ii

Dirac Notation P.A.M. Dirac “invented” the Bra-Ket Notation Hilbert spaces have an inner product but Typewriters have/had now sub-scripts hx, y i = hx|y i = hx| |y i In particular, we enumerate the basis vectors: ~bi

is denoted by

|ii

I

Ket-vectors are vectors in L2 or Cn

I

Bra-vectors are vectors in (L2 )∗ = L2 or (Cn )∗ = Cn .

Conventions Physical Convention: hx|αy i = α hx|y i

Conventions Physical Convention: hx|αy i = α hx|y i

Mathematical Convention: hαx, y i = α hx, y i

Conventions Physical Convention: hx|αy i = α hx|y i

Mathematical Convention: hαx, y i = α hx, y i

Linear in first or second argument. hx, αy i = hαy , xi = α ¯ hy , xi = α ¯ hx, y i

Finite-Dimensional Hilbert Spaces – Cn We represent vectors and their transpose by: 

 x1   ~x = |xi =  ...  , xn

T y1   ~y = hy | =  ...  = (y1 , . . . , yn ) yn 

Finite-Dimensional Hilbert Spaces – Cn We represent vectors and their transpose by: 

 x1   ~x = |xi =  ...  , xn

T y1   ~y = hy | =  ...  = (y1 , . . . , yn ) yn 

The adjoint of ~x = (x1 , . . . , xn ) is given by ~x † = (x1∗ , . . . , xn∗ )T

Finite-Dimensional Hilbert Spaces – Cn We represent vectors and their transpose by: 

 x1   ~x = |xi =  ...  , xn

T y1   ~y = hy | =  ...  = (y1 , . . . , yn ) yn 

The adjoint of ~x = (x1 , . . . , xn ) is given by ~x † = (x1∗ , . . . , xn∗ )T The inner product can be represented by: X h~y , ~x i = yi∗ xi = ~y †~x i

Finite-Dimensional Hilbert Spaces – Cn We represent vectors and their transpose by: 

 x1   ~x = |xi =  ...  , xn

T y1   ~y = hy | =  ...  = (y1 , . . . , yn ) yn 

The adjoint of ~x = (x1 , . . . , xn ) is given by ~x † = (x1∗ , . . . , xn∗ )T The inner product can be represented by: X h~y , ~x i = yi∗ xi = ~y †~x i

We can also define a norm (length) k~x k =

p h~x , ~x i.

Qubits Consider a simple systems with two degrees of freedom. |0i

|1i

Qubits Consider a simple systems with two degrees of freedom. |0i

|1i

Definition A qubit (quantum bit) is a quantum state of the form |ψi = α |0i + β |1i where α and β are complex numbers with |α|2 + |β|2 = 1.

Qubits Consider a simple systems with two degrees of freedom. |0i

|1i

Definition A qubit (quantum bit) is a quantum state of the form |ψi = α |0i + β |1i where α and β are complex numbers with |α|2 + |β|2 = 1. Qubits live in a two-dimensional complex vector, more precisely, Hilbert space C2 and are normalised, i.e. k |ψi k = hψ, ψi = 1.

Representing a Qubit A qubit |ψi = α |0i + β |1i with |α|2 + |β|2 = 1 can be represented: |ψi = cos(θ/2) |0i + e iϕ sin(θ/2) |1i , where θ ∈ [0, π] and ϕ ∈ [0, 2π].

Representing a Qubit A qubit |ψi = α |0i + β |1i with |α|2 + |β|2 = 1 can be represented: |ψi = cos(θ/2) |0i + e iϕ sin(θ/2) |1i , where θ ∈ [0, π] and ϕ ∈ [0, 2π]. Using polar coordinates we have: |ψi = r0 e iφ0 |0i + r1 e iφ1 |1i , with r02 + r12 = 1.

Representing a Qubit A qubit |ψi = α |0i + β |1i with |α|2 + |β|2 = 1 can be represented: |ψi = cos(θ/2) |0i + e iϕ sin(θ/2) |1i , where θ ∈ [0, π] and ϕ ∈ [0, 2π]. Using polar coordinates we have: |ψi = r0 e iφ0 |0i + r1 e iφ1 |1i , with r02 + r12 = 1. Take r0 = cos(ρ) and r1 = sin(ρ) for some ρ.

Representing a Qubit A qubit |ψi = α |0i + β |1i with |α|2 + |β|2 = 1 can be represented: |ψi = cos(θ/2) |0i + e iϕ sin(θ/2) |1i , where θ ∈ [0, π] and ϕ ∈ [0, 2π]. Using polar coordinates we have: |ψi = r0 e iφ0 |0i + r1 e iφ1 |1i , with r02 + r12 = 1. Take r0 = cos(ρ) and r1 = sin(ρ) for some ρ. Set θ = ρ/2, then |ψi = cos(θ/2)e iφ0 |0i + sin(θ/2)e iφ1 |1i , with 0 ≤ θ ≤ π,

Representing a Qubit A qubit |ψi = α |0i + β |1i with |α|2 + |β|2 = 1 can be represented: |ψi = cos(θ/2) |0i + e iϕ sin(θ/2) |1i , where θ ∈ [0, π] and ϕ ∈ [0, 2π]. Using polar coordinates we have: |ψi = r0 e iφ0 |0i + r1 e iφ1 |1i , with r02 + r12 = 1. Take r0 = cos(ρ) and r1 = sin(ρ) for some ρ. Set θ = ρ/2, then |ψi = cos(θ/2)e iφ0 |0i + sin(θ/2)e iφ1 |1i , with 0 ≤ θ ≤ π, or equivalently |ψi = e iγ (cos(θ/2) |0i + e iϕ sin(θ/2) |1i), withϕ = φ1 − φ0 and γ = φ0 , with 0 ≤ ϕ ≤ 2π.

Representing a Qubit A qubit |ψi = α |0i + β |1i with |α|2 + |β|2 = 1 can be represented: |ψi = cos(θ/2) |0i + e iϕ sin(θ/2) |1i , where θ ∈ [0, π] and ϕ ∈ [0, 2π]. Using polar coordinates we have: |ψi = r0 e iφ0 |0i + r1 e iφ1 |1i , with r02 + r12 = 1. Take r0 = cos(ρ) and r1 = sin(ρ) for some ρ. Set θ = ρ/2, then |ψi = cos(θ/2)e iφ0 |0i + sin(θ/2)e iφ1 |1i , with 0 ≤ θ ≤ π, or equivalently |ψi = e iγ (cos(θ/2) |0i + e iϕ sin(θ/2) |1i), withϕ = φ1 − φ0 and γ = φ0 , with 0 ≤ ϕ ≤ 2π. The global phase shift e iγ is physically irrelevant (unobservable).

Bloch Sphere |0i cos(θ/2) |0i + e iϕ sin(θ/2) |1i

θ

ϕ

|1i

Computational Quantum States The postulates of Quantum Mechanics require that a computational quantum state is given by a normalised vector in Cn . A qubit is a two-dimensional quantum state, i.e. in C2

Computational Quantum States The postulates of Quantum Mechanics require that a computational quantum state is given by a normalised vector in Cn . A qubit is a two-dimensional quantum state, i.e. in C2 Mathematical Notation: x or ~xi

Computational Quantum States The postulates of Quantum Mechanics require that a computational quantum state is given by a normalised vector in Cn . A qubit is a two-dimensional quantum state, i.e. in C2 Mathematical Notation: x or ~xi Physical Notation: |xi or |ii

Computational Quantum States The postulates of Quantum Mechanics require that a computational quantum state is given by a normalised vector in Cn . A qubit is a two-dimensional quantum state, i.e. in C2 Mathematical Notation: x or ~xi Physical Notation: |xi or |ii We represent the coordinates of a state or ket-vector as a column vector, in particular a qubit:     α x1 |ψi = or ~x = β x2 with respect to the (orthonormal) basis {~b0 , ~b1 } or {|0i , |ii}.

Dual States A linear functional on a vector space V is a map f : V → K such that f (x + y ) = f (x) + f (y ) and f (αx) = αf (x) for all x, y ∈ V, α ∈ K.

Dual States A linear functional on a vector space V is a map f : V → K such that f (x + y ) = f (x) + f (y ) and f (αx) = αf (x) for all x, y ∈ V, α ∈ K.

Theorem (Riesz Representation Theorem) Every linear functional on a Hilbert space H can be represented by a vector in the Hilbert space H, such that f (x) = hyf |xi = fy (x) Dual Hilbert spaces are isomorphic to the original Hilbert space.

Dual States A linear functional on a vector space V is a map f : V → K such that f (x + y ) = f (x) + f (y ) and f (αx) = αf (x) for all x, y ∈ V, α ∈ K.

Theorem (Riesz Representation Theorem) Every linear functional on a Hilbert space H can be represented by a vector in the Hilbert space H, such that f (x) = hyf |xi = fy (x) Dual Hilbert spaces are isomorphic to the original Hilbert space. We represent functionals, dual or bra-vectors as row vectors   hψ| = α∗ β ∗ or ~x † = x1∗ x2∗

Change of Basis We can represent a quantum state |ψi with respect to any basis.

Change of Basis We can represent a quantum state |ψi with respect to any basis. For example, we can consider in C2 , i.e. for qubits, the (alternative) orthonormal basis: 1 |+i = √ (|0i + |1i) 2

1 |−i = √ (|0i − |1i) 2

Change of Basis We can represent a quantum state |ψi with respect to any basis. For example, we can consider in C2 , i.e. for qubits, the (alternative) orthonormal basis: 1 |+i = √ (|0i + |1i) 2

1 |−i = √ (|0i − |1i) 2

and thus, vice versa: 1 |0i = √ (|+i + |−i) 2

1 |1i = √ (|+i − |−i) 2

Change of Basis We can represent a quantum state |ψi with respect to any basis. For example, we can consider in C2 , i.e. for qubits, the (alternative) orthonormal basis: 1 |+i = √ (|0i + |1i) 2

1 |−i = √ (|0i − |1i) 2

and thus, vice versa: 1 |0i = √ (|+i + |−i) 2

1 |1i = √ (|+i − |−i) 2

A qubit is therefore represented in the two bases as: α |0i + β |1i = =

α β √ (|+i + |−i) √ (|+i − |−i) 2 2 α+β α−β √ |+i + √ |−i 2 2

Linear Operators

A map L : V → W between two vector spaces V and W is called a linear map if 1. L(x + y ) = L(x) + L(y ) and 2. L(αx) = αL(x) for all x, y ∈ V and all α ∈ K (e.g. K = C or R).

Linear Operators

A map L : V → W between two vector spaces V and W is called a linear map if 1. L(x + y ) = L(x) + L(y ) and 2. L(αx) = αL(x) for all x, y ∈ V and all α ∈ K (e.g. K = C or R). For V = W we talk about a linear operator on V.

Images of the Basis Like vectors, we can represent a linear operator L via its “coordinates” as a matrix. Again these depend on the particular basis we use.

Images of the Basis Like vectors, we can represent a linear operator L via its “coordinates” as a matrix. Again these depend on the particular basis we use. Specifying the image of the base vectors determines – by linearity – the operator (or in general a linear map) uniquely.

Images of the Basis Like vectors, we can represent a linear operator L via its “coordinates” as a matrix. Again these depend on the particular basis we use. Specifying the image of the base vectors determines – by linearity – the operator (or in general a linear map) uniquely. Suppose we know the images of the basis vectors |0i and |1i L(|0i) = L(|1i) =

Images of the Basis Like vectors, we can represent a linear operator L via its “coordinates” as a matrix. Again these depend on the particular basis we use. Specifying the image of the base vectors determines – by linearity – the operator (or in general a linear map) uniquely. Suppose we know the images of the basis vectors |0i and |1i L(|0i) = α00 |0i + α01 |1i L(|1i) =

Images of the Basis Like vectors, we can represent a linear operator L via its “coordinates” as a matrix. Again these depend on the particular basis we use. Specifying the image of the base vectors determines – by linearity – the operator (or in general a linear map) uniquely. Suppose we know the images of the basis vectors |0i and |1i L(|0i) = α00 |0i + α01 |1i L(|1i) = α10 |0i + α11 |1i

Images of the Basis Like vectors, we can represent a linear operator L via its “coordinates” as a matrix. Again these depend on the particular basis we use. Specifying the image of the base vectors determines – by linearity – the operator (or in general a linear map) uniquely. Suppose we know the images of the basis vectors |0i and |1i L(|0i) = α00 |0i + α01 |1i L(|1i) = α10 |0i + α11 |1i then this is enough to know the αij ’s to know what L is doing to all vectors (as they are representable as linear combinations of the basis vectors).

Matrices Using a “mathematical” indexing (starting from 1 rather than 0) and using the first index to indicate a row position and the second for a column position we can identify the operator/map with a matrix:   α11 α12 L= α21 α22

Matrices Using a “mathematical” indexing (starting from 1 rather than 0) and using the first index to indicate a row position and the second for a column position we can identify the operator/map with a matrix:   α11 α12 L= α21 α22 The application of L to a general vector (qubit) then becomes a simple matrix multiplication:        α α11 α12 α11 α + α12 β α L( )= = β α21 α22 β α21 α + α22 β

Matrices Using a “mathematical” indexing (starting from 1 rather than 0) and using the first index to indicate a row position and the second for a column position we can identify the operator/map with a matrix:   α11 α12 L= α21 α22 The application of L to a general vector (qubit) then becomes a simple matrix multiplication:        α α11 α12 α11 α + α12 β α L( )= = β α21 α22 β α21 α + α22 β Multiplications: (Lij )(xi ) =

X i

Lij xi and (Lij )(Kki ) =

X i

Lij Kki

Transformations We can define a linear map B which implements the base change {|0i , |1i} and {|+i , |−i}:   1 1 1 B= √ 2 1 −1

Transformations We can define a linear map B which implements the base change {|0i , |1i} and {|+i , |−i}:   1 1 1 B= √ 2 1 −1 Transforming the coordinates (xi ) in {|0i , |1i} into coordinates (yi ) using {|+i , |−i} can be obtained by matrix multiplication: B(xi ) = (yi ) and B−1 (yi ) = (xi )

Transformations We can define a linear map B which implements the base change {|0i , |1i} and {|+i , |−i}:   1 1 1 B= √ 2 1 −1 Transforming the coordinates (xi ) in {|0i , |1i} into coordinates (yi ) using {|+i , |−i} can be obtained by matrix multiplication: B(xi ) = (yi ) and B−1 (yi ) = (xi ) The matrix representation L of an operator using {|0i , |1i} can be transformed into the representation K in {|+i , |−i} via: K = BLB−1

Transformations We can define a linear map B which implements the base change {|0i , |1i} and {|+i , |−i}:   1 1 1 B= √ 2 1 −1 Transforming the coordinates (xi ) in {|0i , |1i} into coordinates (yi ) using {|+i , |−i} can be obtained by matrix multiplication: B(xi ) = (yi ) and B−1 (yi ) = (xi ) The matrix representation L of an operator using {|0i , |1i} can be transformed into the representation K in {|+i , |−i} via: K = BLB−1 Problem: It is not easy to compute inverse B−1 , defined on implicitly by BB−1 = B−1 B = I the identity (existence?!).

Outer Product In the bar-ket notation the outer product is expressed by |xihy |. It could be treated just as a formal combination, e.g. we can express the identity as I = |0ih0| + |1ih1| because (|0ih0| + |1ih1|) |ψi = (|0ih0| + |1ih1|)(α |0i + β |1i) = α |0ih0||0i + α |1ih1||0i + β |0ih0||1i + β |1ih1||1i = α |0i + β |1i

Outer Product In the bar-ket notation the outer product is expressed by |xihy |. It could be treated just as a formal combination, e.g. we can express the identity as I = |0ih0| + |1ih1| because (|0ih0| + |1ih1|) |ψi = (|0ih0| + |1ih1|)(α |0i + β |1i) = α |0ih0||0i + α |1ih1||0i + β |0ih0||1i + β |1ih1||1i = α |0i + β |1i Using coordinates, we have with |xi = (xi )T and hy | = (yj ): (|xihy |)ij = xi yj

Outer Product In the bar-ket notation the outer product is expressed by |xihy |. It could be treated just as a formal combination, e.g. we can express the identity as I = |0ih0| + |1ih1| because (|0ih0| + |1ih1|) |ψi = (|0ih0| + |1ih1|)(α |0i + β |1i) = α |0ih0||0i + α |1ih1||0i + β |0ih0||1i + β |1ih1||1i = α |0i + β |1i Using coordinates, we have with |xi = (xi )T and hy | = (yj ):      1 0 1 0 1 = (|xihy |)ij = xi yj e.g. |0ih1| = 0 0 0

Adjoint Operator For a matrix L = (Lij ) its transpose matrix LT is defined as (LT ij ) = (Lji )

Adjoint Operator For a matrix L = (Lij ) its transpose matrix LT is defined as (LT ij ) = (Lji ) the conjugate matrix L∗ is defined by (L∗ij ) = (Lij )∗

Adjoint Operator For a matrix L = (Lij ) its transpose matrix LT is defined as (LT ij ) = (Lji ) the conjugate matrix L∗ is defined by (L∗ij ) = (Lij )∗ and the adjoint matrix L† is given via (L†ij ) = (L∗ji ) or L† = (L∗ )T

Adjoint Operator For a matrix L = (Lij ) its transpose matrix LT is defined as (LT ij ) = (Lji ) the conjugate matrix L∗ is defined by (L∗ij ) = (Lij )∗ and the adjoint matrix L† is given via (L†ij ) = (L∗ji ) or L† = (L∗ )T Notation: In mathematics the adjoint operator is usually denoted by L∗ and defined implicitly via: D E hL(x), y i = hx, L∗ (y )i or L† x|y = hx, Ly i

Unitary Operators A square matrix/operator U is called unitary if U† U = I = UU†

Unitary Operators A square matrix/operator U is called unitary if U† U = I = UU† That means U’s inverse is U† = U−1 . It also implies that U is invertible and the inverse is easy to compute.

Unitary Operators A square matrix/operator U is called unitary if U† U = I = UU† That means U’s inverse is U† = U−1 . It also implies that U is invertible and the inverse is easy to compute. The postulates of Quantum Mechanics require that the time evolution to a quantum state, e.g. a qubit, are implemented via a unitary operator (as long as there is no measurement).

Unitary Operators A square matrix/operator U is called unitary if U† U = I = UU† That means U’s inverse is U† = U−1 . It also implies that U is invertible and the inverse is easy to compute. The postulates of Quantum Mechanics require that the time evolution to a quantum state, e.g. a qubit, are implemented via a unitary operator (as long as there is no measurement). The unitary evolution of an (isolated) quantum state/system is a mathematical consequence of being a solution of the Schr¨odinger equation for some Hamiltonian operator H.

Basic 1-Qubit Operators  Pauli X-Gate

X=

0 1 1 0



Basic 1-Qubit Operators

Pauli X-Gate

X=

Pauli Y-Gate

Y=



0 1 1 0





0 −i i 0



Basic 1-Qubit Operators

Pauli X-Gate

X=

Pauli Y-Gate

Y=

Pauli Z-Gate

Z=



0 1 1 0





0 −i i 0





1 0 0 −1



Basic 1-Qubit Operators

Pauli X-Gate

X=

Pauli Y-Gate

Y=



0 1 1 0



0 −i i 0



Pauli Z-Gate Hadamard Gate

 

 1 0 Z= 0 −1   1 1 1 H = √2 1 −1

Basic 1-Qubit Operators

Pauli X-Gate

X=

Pauli Y-Gate

Y=



0 1 1 0



0 −i i 0



Pauli Z-Gate Hadamard Gate Phase Gate

 

 1 0 Z= 0 −1   1 1 1 H = √2 1 −1   1 0 Φ= 0 e iφ

Basic 1-Qubit Operators

Pauli X-Gate

X=

Pauli Y-Gate

Y=



0 1 1 0





0 −i i 0





Pauli Z-Gate Hadamard Gate Phase Gate

 1 0 Z= 0 −1   1 1 1 H = √2 1 −1   1 0 Φ= 0 e iφ

The Pauli-X gate is also often referred to as NOT gate.

Graphical “Notation” The product (combination) of unitary operators results in a unitary operator, i.e. with U1 , . . . , Un unitary, the product U = Un . . . U1 is also unitary (Note: (LK)† = K† L† ).

Graphical “Notation” The product (combination) of unitary operators results in a unitary operator, i.e. with U1 , . . . , Un unitary, the product U = Un . . . U1 is also unitary (Note: (LK)† = K† L† ).

|xi

φ H

X

H

U |xi

Graphical “Notation” The product (combination) of unitary operators results in a unitary operator, i.e. with U1 , . . . , Un unitary, the product U = Un . . . U1 is also unitary (Note: (LK)† = K† L† ).

|xi

φ H

X

H

U |xi

Any unitary 2 × 2 matrix U can be expressed as   e i(α−β/2−δ/2) cos γ/2 e i(α+β/2−δ/2) sin γ/2 U= −e i(α−β/2+δ/2) sin γ/2 e i(α+β/2+δ/2) cos γ/2 where α, β, δ and γ are real numbers (angles).

Basic Measurement Principle

The values α and β describing a qubit are often called probability amplitudes. If we measure a qubit   α |φi = α |0i + β |1i = β in the computational basis {|0i , |1i} then we observe state |0i with probability |α|2 and |1i with probability |β|2 .

Basic Measurement Principle

The values α and β describing a qubit are often called probability amplitudes. If we measure a qubit   α |φi = α |0i + β |1i = β in the computational basis {|0i , |1i} then we observe state |0i with probability |α|2 and |1i with probability |β|2 . Furthermore, the state |φi changes: it collapses into state |0i with probability |α|2 or |1i with probability |β|2 , respectively.

Self Adjoint Operators An operator A is called self-adjoint or hermitian iff A = A†

Self Adjoint Operators An operator A is called self-adjoint or hermitian iff A = A† The postulates of Quantum Mechanics require that a quantum observable A is represented by a self-adjoint operator A.

Self Adjoint Operators An operator A is called self-adjoint or hermitian iff A = A† The postulates of Quantum Mechanics require that a quantum observable A is represented by a self-adjoint operator A. Possible measurement results are eigenvalues λi of A defined as A |ii = λi |ii or

A~ai = λi ~ai

Self Adjoint Operators An operator A is called self-adjoint or hermitian iff A = A† The postulates of Quantum Mechanics require that a quantum observable A is represented by a self-adjoint operator A. Possible measurement results are eigenvalues λi of A defined as A |ii = λi |ii or

A~ai = λi ~ai P Probability to observe λk in state |xi = i αi |ii is Pr (A = λk , |xi) = |αk |2

Spectrum The set of eigen-values {λ1 , λ2 , . . .} of an operator L is called its spectrum σ(L). σ(L) = {λ | λI − L is not invertible}

Spectrum The set of eigen-values {λ1 , λ2 , . . .} of an operator L is called its spectrum σ(L). σ(L) = {λ | λI − L is not invertible}

It is possible that for an eigen-value λi in the equation L |ii = λi |ii we may have more than one eigen-vector |ii, i.e. the dimension of the eigen-space d(n) > 1. We will not consider these degenerate cases here.

Spectrum The set of eigen-values {λ1 , λ2 , . . .} of an operator L is called its spectrum σ(L). σ(L) = {λ | λI − L is not invertible}

It is possible that for an eigen-value λi in the equation L |ii = λi |ii we may have more than one eigen-vector |ii, i.e. the dimension of the eigen-space d(n) > 1. We will not consider these degenerate cases here. Terminology: “eigen” means “self” or “own” in German (cf Italian “auto-valore”).

Projections Projections An operator P on Cn is called projection (or idempotent) iff P2 = PP = P

Projections Projections An operator P on Cn is called projection (or idempotent) iff P2 = PP = P

Orthogonal Projection An operator P on Cn is called (orthogonal) projection iff P2 = P = P†

Projections Projections An operator P on Cn is called projection (or idempotent) iff P2 = PP = P

Orthogonal Projection An operator P on Cn is called (orthogonal) projection iff P2 = P = P†

We say that an (orthogonal) projection P projects onto its image space P(Cn ), which is always a linear sub-spaces of Cn .

Projections Projections An operator P on Cn is called projection (or idempotent) iff P2 = PP = P

Orthogonal Projection An operator P on Cn is called (orthogonal) projection iff P2 = P = P†

We say that an (orthogonal) projection P projects onto its image space P(Cn ), which is always a linear sub-spaces of Cn . Birkhoff-von Neumann: Projection on a Hilbert space form an (ortho-)lattice which gives rise to non-classical a “quantum logic”.

Spectral Theorem In the bra-ket notation we can represent a projection onto the sub-space generated by |xi by the outer product Px = |xihx|.

Spectral Theorem In the bra-ket notation we can represent a projection onto the sub-space generated by |xi by the outer product Px = |xihx|.

Theorem A self-adjoint operator A (on a finite dimensional Hilbert space, e.g. Cn ) can be represented uniquely as a linear combination X A= λ i Pi i

with λi ∈ R and Pi the (orthogonal) projection onto the eigen-space generated by the eigen-vector |ii: Pi = |iihi|

Spectral Theorem In the bra-ket notation we can represent a projection onto the sub-space generated by |xi by the outer product Px = |xihx|.

Theorem A self-adjoint operator A (on a finite dimensional Hilbert space, e.g. Cn ) can be represented uniquely as a linear combination X A= λ i Pi i

with λi ∈ R and Pi the (orthogonal) projection onto the eigen-space generated by the eigen-vector |ii: Pi = |iihi|

In the degenerate case we had to consider: Pi =

Pd(n) j=1

|ij ihij |.

Measurement Process If we perform a measurement of the observable represented by: X A= λi |iihi| i

with eigen-values λi and eigen-vectors |ii in a state |xi we have to decompose the state according to the observable, i.e. X X X X |xi = Pi |xi = |iihi|xi = hi|xi |ii = αi |ii i

i

i

i

Measurement Process If we perform a measurement of the observable represented by: X A= λi |iihi| i

with eigen-values λi and eigen-vectors |ii in a state |xi we have to decompose the state according to the observable, i.e. X X X X |xi = Pi |xi = |iihi|xi = hi|xi |ii = αi |ii i

i

i

With probability |αi |2 = | hi|xi |2 two things happen

i

Measurement Process If we perform a measurement of the observable represented by: X A= λi |iihi| i

with eigen-values λi and eigen-vectors |ii in a state |xi we have to decompose the state according to the observable, i.e. X X X X |xi = Pi |xi = |iihi|xi = hi|xi |ii = αi |ii i

i

i

With probability |αi |2 = | hi|xi |2 two things happen I

The measurement instrument will the display λi .

i

Measurement Process If we perform a measurement of the observable represented by: X A= λi |iihi| i

with eigen-values λi and eigen-vectors |ii in a state |xi we have to decompose the state according to the observable, i.e. X X X X |xi = Pi |xi = |iihi|xi = hi|xi |ii = αi |ii i

i

i

With probability |αi |2 = | hi|xi |2 two things happen I

The measurement instrument will the display λi .

I

The state |xi collapses to |ii.

i

Do-It-Yourself Observable We can take any (orthonormal) basis {|ii}n0 of Cn+1 to act as computational basis. We are free to choose (different) measurement results λi to indicate different states in {|ii}.

Do-It-Yourself Observable We can take any (orthonormal) basis {|ii}n0 of Cn+1 to act as computational basis. We are free to choose (different) measurement results λi to indicate different states in {|ii}.

|hn|xi|2

|ni

λn |xi =

P

i

hi|xi|ii

A=

P

i

.. .

λi |iihi| λ0 |h0|xi|2

|0i

Do-It-Yourself Observable We can take any (orthonormal) basis {|ii}n0 of Cn+1 to act as computational basis. We are free to choose (different) measurement results λi to indicate different states in {|ii}.

|hn|xi|2

|ni

λn |xi =

P

i

hi|xi|ii

A=

P

i

.. .

λi |iihi| λ0 |h0|xi|2

The “display” values λi are essential for physicists, in a quantum computing context they are just side-effects.

|0i

Reversibility Quantum Dynamics For unitary transformations describing qubit dynamics: U† = U−1 The quantum dynamics is invertible or reversible

Reversibility Quantum Dynamics For unitary transformations describing qubit dynamics: U† = U−1 The quantum dynamics is invertible or reversible Quantum Measurement For projection operators involved in quantum measurement: P† 6= P−1 The quantum measurement is not reversible.

Reversibility Quantum Dynamics For unitary transformations describing qubit dynamics: U† = U−1 The quantum dynamics is invertible or reversible Quantum Measurement For projection operators involved in quantum measurement: P† 6= P−1 The quantum measurement is not reversible. However P2 = P The quantum measurement is idempotent.

Beyond Qubits

Operations on a single Qubit are nice and interesting but don’t give us much computational power.

Beyond Qubits

Operations on a single Qubit are nice and interesting but don’t give us much computational power. We need to consider “larger” computational states which contain more information. There could be two options:

Beyond Qubits

Operations on a single Qubit are nice and interesting but don’t give us much computational power. We need to consider “larger” computational states which contain more information. There could be two options: I

Quantum Systems with a larger number of freedoms.

Beyond Qubits

Operations on a single Qubit are nice and interesting but don’t give us much computational power. We need to consider “larger” computational states which contain more information. There could be two options: I

Quantum Systems with a larger number of freedoms.

I

Quantum Registers as a combination of several Qubits.

Beyond Qubits

Operations on a single Qubit are nice and interesting but don’t give us much computational power. We need to consider “larger” computational states which contain more information. There could be two options: I

Quantum Systems with a larger number of freedoms.

I

Quantum Registers as a combination of several Qubits.

Though it might one day be physically more realistic/cheaper to built quantum devices based on not just binary basic states, even then it will be necessary to combine these larger “Qubits”.

Free Vector Spaces

In language theory we have a universal construction of words made out of any (finite) set of letters, i.e. alphabet Σ.

Free Vector Spaces

In language theory we have a universal construction of words made out of any (finite) set of letters, i.e. alphabet Σ. For vector spaces there is similar construction:

Free Vector Spaces

In language theory we have a universal construction of words made out of any (finite) set of letters, i.e. alphabet Σ. For vector spaces there is similar construction: Take any (finite) set of objects B and “declare” it a base. The free vector space is the set of all linear combinations of elements in B = {b1 , b2 , . . .}, i.e. ( ) X V(B) = λi |bi i | λi ∈ C and bi ∈ B i

with the obvious algebraic operations (incl. inner product).

Multi Qubit State We encountered already the state space of a single qubit with B = {0, 1} but also with B = {+, −}.

Multi Qubit State We encountered already the state space of a single qubit with B = {0, 1} but also with B = {+, −}. The state space of a two qubit system is given by V({0, 1} × {0, 1}) or V({+, −} × {+, −}) i.e. the base vectors are (in the standard base): B = {(0, 0), (1, 0), (0, 1), (1, 1)} or we use a “short-hand” notation B = {00, 01, 10, 11}

Multi Qubit State We encountered already the state space of a single qubit with B = {0, 1} but also with B = {+, −}. The state space of a two qubit system is given by V({0, 1} × {0, 1}) or V({+, −} × {+, −}) i.e. the base vectors are (in the standard base): B = {(0, 0), (1, 0), (0, 1), (1, 1)} or we use a “short-hand” notation B = {00, 01, 10, 11} In order to understand the relation between V(B) and V(B × B) and in general V(B n ) we need to consider the tensor product.

Tensor Product Given a n × m matrix A  a11 . . .  .. . . A= . . an1

and a k × l matrix B:    a1m b11 . . . b1l ..  B =  .. .  ..  . . ..  .  . . . anm bk1 . . . bkl

Tensor Product Given a n × m matrix A  a11 . . .  .. . . A= . . an1

and a k × l matrix B:    a1m b11 . . . b1l ..  B =  .. .  ..  . . ..  .  . . . anm bk1 . . . bkl

The tensor or Kronecker product A ⊗ B is a nk × ml matrix:   a11 B . . . a1m B  ..  .. A ⊗ B =  ... . .  an1 B . . . anm B

Tensor Product Given a n × m matrix A  a11 . . .  .. . . A= . . an1

and a k × l matrix B:    a1m b11 . . . b1l ..  B =  .. .  ..  . . ..  .  . . . anm bk1 . . . bkl

The tensor or Kronecker product A ⊗ B is a nk × ml matrix:   a11 B . . . a1m B  ..  .. A ⊗ B =  ... . .  an1 B . . . anm B Special cases are square matrices (n = m and k = l) and vectors (row n = k = 1, column m = l = 1).

Tensor Product of Vectors The tensor product of (ket) vectors fulfils a number of nice algebraic properties, such as

Tensor Product of Vectors The tensor product of (ket) vectors fulfils a number of nice algebraic properties, such as 1. The bilinearity property: (αv + α0 v 0 ) ⊗ (βw + β 0 w 0 ) = = αβ(v ⊗ w ) + αβ 0 (v ⊗ w 0 ) + α0 β(v 0 ⊗ w ) + α0 β 0 (v 0 ⊗ w 0 ) with α, α0 , β, β 0 ∈ C, and v , v 0 ∈ Ck , w , w 0 ∈ Cl .

Tensor Product of Vectors The tensor product of (ket) vectors fulfils a number of nice algebraic properties, such as 1. The bilinearity property: (αv + α0 v 0 ) ⊗ (βw + β 0 w 0 ) = = αβ(v ⊗ w ) + αβ 0 (v ⊗ w 0 ) + α0 β(v 0 ⊗ w ) + α0 β 0 (v 0 ⊗ w 0 ) with α, α0 , β, β 0 ∈ C, and v , v 0 ∈ Ck , w , w 0 ∈ Cl . 2. For v , v 0 ∈ Ck and w , w 0 ∈ Cl we have:





v ⊗ w |v 0 ⊗ w 0 = v |v 0 w |w 0

Tensor Product of Vectors The tensor product of (ket) vectors fulfils a number of nice algebraic properties, such as 1. The bilinearity property: (αv + α0 v 0 ) ⊗ (βw + β 0 w 0 ) = = αβ(v ⊗ w ) + αβ 0 (v ⊗ w 0 ) + α0 β(v 0 ⊗ w ) + α0 β 0 (v 0 ⊗ w 0 ) with α, α0 , β, β 0 ∈ C, and v , v 0 ∈ Ck , w , w 0 ∈ Cl . 2. For v , v 0 ∈ Ck and w , w 0 ∈ Cl we have:





v ⊗ w |v 0 ⊗ w 0 = v |v 0 w |w 0 3. We denote by bim ∈ Bn ⊆ Cm the i’th basis vector in Cm then kl bik ⊗ bjl = b(i−1)l+j

Tensor Product of Matrices For the tensor product of square matrices we also have:

Tensor Product of Matrices For the tensor product of square matrices we also have: 1. The bilinearity property: (αM + α0 M0 ) ⊗ (βN + β 0 N0 ) = = αβ(M ⊗ N) + αβ 0 (M ⊗ N0 ) + α0 β(M0 ⊗ N) + α0 β 0 (M0 ⊗ N0 ) α, α0 , β, β 0 ∈ C, M, M0 m × m matrices N, N0 n × n matrices.

Tensor Product of Matrices For the tensor product of square matrices we also have: 1. The bilinearity property: (αM + α0 M0 ) ⊗ (βN + β 0 N0 ) = = αβ(M ⊗ N) + αβ 0 (M ⊗ N0 ) + α0 β(M0 ⊗ N) + α0 β 0 (M0 ⊗ N0 ) α, α0 , β, β 0 ∈ C, M, M0 m × m matrices N, N0 n × n matrices. 2. We have, with v ∈ Cm and w ∈ Cn : (M ⊗ N)(v ⊗ w ) = (Mv ) ⊗ (Nw ) (M ⊗ N)(M0 ⊗ N0 ) = (MM0 ) ⊗ (NN0 )

Tensor Product of Matrices For the tensor product of square matrices we also have: 1. The bilinearity property: (αM + α0 M0 ) ⊗ (βN + β 0 N0 ) = = αβ(M ⊗ N) + αβ 0 (M ⊗ N0 ) + α0 β(M0 ⊗ N) + α0 β 0 (M0 ⊗ N0 ) α, α0 , β, β 0 ∈ C, M, M0 m × m matrices N, N0 n × n matrices. 2. We have, with v ∈ Cm and w ∈ Cn : (M ⊗ N)(v ⊗ w ) = (Mv ) ⊗ (Nw ) (M ⊗ N)(M0 ⊗ N0 ) = (MM0 ) ⊗ (NN0 ) 3. If M and N are unitary (or invertible) so is M ⊗ N, and: (M ⊗ N)T = MT ⊗ NT and (M ⊗ N)† = M† ⊗ N†

The Two Qubit States Given two Hilbert spaces H1 with basis B1 and H2 with basis B2 we can define the tensor product of spaces as H1 ⊗ H2 = V({bi ⊗ bj | bi ∈ B1 , bj ∈ B2 })

The Two Qubit States Given two Hilbert spaces H1 with basis B1 and H2 with basis B2 we can define the tensor product of spaces as H1 ⊗ H2 = V({bi ⊗ bj | bi ∈ B1 , bj ∈ B2 }) Using the notation |ii ⊗ |ji = |ii |ji = |iji the standard base of the state space of a two qubit system C4 = C2 ⊗ C2 are:         1 0 0 0  0   1   0   0         |00i =   0  , |01i =  0  , |10i =  1  , |11i =  0  0 0 0 1

The Two Qubit States Given two Hilbert spaces H1 with basis B1 and H2 with basis B2 we can define the tensor product of spaces as H1 ⊗ H2 = V({bi ⊗ bj | bi ∈ B1 , bj ∈ B2 }) Using the notation |ii ⊗ |ji = |ii |ji = |iji the standard base of the state space of a two qubit system C4 = C2 ⊗ C2 are:         1 0 0 0  0   1   0   0         |00i =   0  , |01i =  0  , |10i =  1  , |11i =  0  0 0 0 1 Use lexicographical order for enumeration of the base in the n n-qubit state space C2 and represent them also using a decimal notation, e.g. |00i ≡ |0i, |01i ≡ |1i, |10i ≡ |2i, and |11i ≡ |3i.

Entanglement The important relation between V(B), e.g. V({0, 1}), and V(B n ), e.g. V({0, 1}n ) is given by V(B n ) = (V(B))⊗n , i.e.: V(B × B × . . . × B) = V(B) ⊗ V(B) ⊗ . . . ⊗ V(B)

Entanglement The important relation between V(B), e.g. V({0, 1}), and V(B n ), e.g. V({0, 1}n ) is given by V(B n ) = (V(B))⊗n , i.e.: V(B × B × . . . × B) = V(B) ⊗ V(B) ⊗ . . . ⊗ V(B) n

Every n qubit state in C2 can represented as a linear combination of the base vectors |0 . . . 00i , |0 . . . 01i , |0 . . . 10i , . . . , |1 . . . 11i or decimal |0i , |1i , |2i , . . . , . . . , |2n − 1i.

Entanglement The important relation between V(B), e.g. V({0, 1}), and V(B n ), e.g. V({0, 1}n ) is given by V(B n ) = (V(B))⊗n , i.e.: V(B × B × . . . × B) = V(B) ⊗ V(B) ⊗ . . . ⊗ V(B) n

Every n qubit state in C2 can represented as a linear combination of the base vectors |0 . . . 00i , |0 . . . 01i , |0 . . . 10i , . . . , |1 . . . 11i or decimal |0i , |1i , |2i , . . . , . . . , |2n − 1i. 2

A two-qubit quantum state |ψi ∈ C2 is said to be separable iff there exist two single-qubit states |ψ1 i and |ψ2 i in C2 such that |ψi = |ψ1 i ⊗ |ψ2 i

Entanglement The important relation between V(B), e.g. V({0, 1}), and V(B n ), e.g. V({0, 1}n ) is given by V(B n ) = (V(B))⊗n , i.e.: V(B × B × . . . × B) = V(B) ⊗ V(B) ⊗ . . . ⊗ V(B) n

Every n qubit state in C2 can represented as a linear combination of the base vectors |0 . . . 00i , |0 . . . 01i , |0 . . . 10i , . . . , |1 . . . 11i or decimal |0i , |1i , |2i , . . . , . . . , |2n − 1i. 2

A two-qubit quantum state |ψi ∈ C2 is said to be separable iff there exist two single-qubit states |ψ1 i and |ψ2 i in C2 such that |ψi = |ψ1 i ⊗ |ψ2 i If |ψi is not separable then we say that |ψi is entangled.

Classical Gates At heart of classical (electronic) circuits we have to consider gates like for example:

Classical Gates At heart of classical (electronic) circuits we have to consider gates like for example:

0 0 1 1

AND 0 0 1 0 0 0 1 1

Classical Gates At heart of classical (electronic) circuits we have to consider gates like for example:

0 0 1 1

AND 0 0 1 0 0 0 1 1

0 0 1 1

XOR 0 0 1 1 0 1 1 0

Classical Gates At heart of classical (electronic) circuits we have to consider gates like for example:

0 0 1 1

AND 0 0 1 0 0 0 1 1

0 0 1 1

XOR 0 0 1 1 0 1 1 0

NAND 0 0 1 0 1 1 1 0 1 1 1 0

Classical Gates At heart of classical (electronic) circuits we have to consider gates like for example:

0 0 1 1

AND 0 0 1 0 0 0 1 1

0 0 1 1

XOR 0 0 1 1 0 1 1 0

NAND 0 0 1 0 1 1 1 0 1 1 1 0

The idea is to define similar quantum gates, taking two (or n) qubits at input and producing some output. Contrary to classical gates we have to use unitary, i.e. reversible, gates in quantum circuits.

The Controlled-NOT or CNOT Gate The quantum analog of the classical XOR-gate is the CNOT-gate. Its behaviour is |x, y i 7→ |x, y ⊕ xi with y ⊕ x = (y + x) mod 2 i.e. |00i 7→ |00i , |01i 7→ |01i , |10i 7→ |11i , |11i 7→ |10i.

The Controlled-NOT or CNOT Gate The quantum analog of the classical XOR-gate is the CNOT-gate. Its behaviour is |x, y i 7→ |x, y ⊕ xi with y ⊕ x = (y + x) mod 2 i.e. |00i 7→ |00i , |01i 7→ |01i , |10i 7→ |11i , |11i 7→ |10i. We represent the CNOT-gate graphically and as a matrix (with respect to the standard basis {|00i , |01i , |10i , |11i}) as:

The Controlled-NOT or CNOT Gate The quantum analog of the classical XOR-gate is the CNOT-gate. Its behaviour is |x, y i 7→ |x, y ⊕ xi with y ⊕ x = (y + x) mod 2 i.e. |00i 7→ |00i , |01i 7→ |01i , |10i 7→ |11i , |11i 7→ |10i. We represent the CNOT-gate graphically and as a matrix (with respect to the standard basis {|00i , |01i , |10i , |11i}) as: |xi

|xi

|y i

|y ⊕ xi

The Controlled-NOT or CNOT Gate The quantum analog of the classical XOR-gate is the CNOT-gate. Its behaviour is |x, y i 7→ |x, y ⊕ xi with y ⊕ x = (y + x) mod 2 i.e. |00i 7→ |00i , |01i 7→ |01i , |10i 7→ |11i , |11i 7→ |10i. We represent the CNOT-gate graphically and as a matrix (with respect to the standard basis {|00i , |01i , |10i , |11i}) as: |xi

|xi

|y i

|y ⊕ xi



1  0 CNOT =   0 0

0 1 0 0

0 0 0 1

 0 0   1  0

Swapping Gate We can exploit the CNOT-Gate to swap two qubits: |xi

|y i

|y i

|xi

is depicted by |xi

|y i

|y i

|xi

Controlled Phase Gate The controlled phase gate is depicted as follows: |xi

|xi

|y i

e ixy φ |y i φ

Controlled Phase Gate The controlled phase gate is depicted as follows: |xi

|xi

|y i

e ixy φ |y i φ

Its matrix/operator representation is given by:   1 0 0 0  0 1 0 0   Φ=  0 0 1 0  0 0 0 e iφ

General Controlled Gate In general, we can “control” any single qubit transformation U by another qubit, i.e. such that: |0i ⊗ |y i 7→ |0i ⊗ |y i |1i ⊗ |y i 7→ |1i ⊗ U |y i

General Controlled Gate In general, we can “control” any single qubit transformation U by another qubit, i.e. such that: |0i ⊗ |y i 7→ |0i ⊗ |y i |1i ⊗ |y i 7→ |1i ⊗ U |y i

The diagrammatic representation is: |xi

|y i

|xi

U

U |y i

Toffoli Gate The Toffoli-Gate is a three-qubit quantum gate with the following behaviour and matrix representation (standard base enumeration):

x 0 0 0 0 1 1 1 1

input output y z x0 y0 z0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0

      T=     

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

           

Toffoli Gate Usage The Toffoli gate can be used can be used to implement a reversible version of NAND and a FANOUT gate.

Toffoli Gate Usage The Toffoli gate can be used can be used to implement a reversible version of NAND and a FANOUT gate. |xi

|xi

|y i

|y i

|zi

|z ⊕ xy i Toffoli

Toffoli Gate Usage The Toffoli gate can be used can be used to implement a reversible version of NAND and a FANOUT gate. |xi

|xi

|xi

|xi

|y i

|y i

|y i

|y i

|zi

|z ⊕ xy i

|1i

|¬xy i

Toffoli

NAND

Toffoli Gate Usage The Toffoli gate can be used can be used to implement a reversible version of NAND and a FANOUT gate. |xi

|xi

|xi

|xi

|1i

|1i

|y i

|y i

|y i

|y i

|y i

|y i

|zi

|z ⊕ xy i

|1i

|¬xy i

|0i

|y i

Toffoli

NAND

FANOUT

Reversible Functions Reversibility makes it in general impossible to construct a quantum device Uf which just computes a function f , i.e. Uf : |xi 7→ |f (x)i.

Reversible Functions Reversibility makes it in general impossible to construct a quantum device Uf which just computes a function f , i.e. Uf : |xi 7→ |f (x)i. However, we can always “pack” up a function f as a unitary operator Uf using an ancilla qubit to save the initial state: Uf : |xi ⊗ |0i 7→ |xi ⊗ |f (x)i

Reversible Functions Reversibility makes it in general impossible to construct a quantum device Uf which just computes a function f , i.e. Uf : |xi 7→ |f (x)i. However, we can always “pack” up a function f as a unitary operator Uf using an ancilla qubit to save the initial state: Uf : |xi ⊗ |0i 7→ |xi ⊗ |f (x)i or in the standard version using the XOR operation: Uf : |xi ⊗ |y i 7→ |xi ⊗ |y ⊕ f (x)i

Reversible Functions Reversibility makes it in general impossible to construct a quantum device Uf which just computes a function f , i.e. Uf : |xi 7→ |f (x)i. However, we can always “pack” up a function f as a unitary operator Uf using an ancilla qubit to save the initial state: Uf : |xi ⊗ |0i 7→ |xi ⊗ |f (x)i or in the standard version using the XOR operation: Uf : |xi ⊗ |y i 7→ |xi ⊗ |y ⊕ f (x)i Graphically represented by: |xi

|xi Uf

|y i

|y ⊕ f (x)i