Documente Academic
Documente Profesional
Documente Cultură
• We all know that modern computers are built from networks of logic • The quantum analogue of the NOT gate is easy to picture
gates • The other classical gates that we known and “love” are not so easy to
• Quantum computing uses logic gates in a similar way: networks of them transfer to the quantum world
are constructed to perform certain operations • All quantum gates must be reversible: classical AND, OR etc are not!
• There are many more possible quantum gates (infinitely many) • We will not use these familiar gates as they require effort to be useful,
• They must all be reversible (due to unitarity) and do not do all that we require
• So we can represent them with a unitary matrix • We will introduce some new gates!
! !
• Example: Quantum NOT gate: a0 a1
7→
a1 a0
!
• The matrix which does this transformation is X = 0 1
:
1 0
! ! !
0 1 a0 a1
=
1 0 a1 a0
Lecture 5: Quantum Logic – p.3/17 Lecture 5: Quantum Logic – p.4/17
Controlled NOT (CNOT) Controlled-Controlled NOT
A B A’ B’ A B C A’ B’ C’
0 0 0 0 0 0 0 0 0 0
• Quantum CNOT gate: 0 1 0 1 0 0 1 0 0 1
0 1 0 0 1 0
1 0 1 1 Quantum CCN Gate: 0 1 1 0 1 1
1 1 1 0 1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 1
a00 a00
a a 1 1 1 11 0
• The transformation is therefore 01 01
7→ a000 a000 1 0 0 0 0 0 0 0
a10 a11
a001 a001 0 1 0 0 0 0 0 0
a11 a10
0
a010
a010
0 1 0 0 0 0 0
0
1 0 0 0
a
011
a
011 0 0 1 0 0 0 0
7→ with matrix NCC =
0 0 0 0 1 0 0 0
0 1 0
• and is represented by the matrix NC = 0
a100
a100
0 0 0
1
a101 a101 0 0 0 0 0 1 0 0
0 0 1 0 a a 0 0 0 0 0 0 0 1
110 111
a111 a110 0 0 0 0 0 0 1 0
Lecture 5: Quantum Logic – p.5/17 Lecture 5: Quantum Logic – p.6/17
A B C A’ B’ C’ • The NOT, CN, CCN and CEX gates are all gates which can exist in both
0 0 0 0 0 0 classical and quantum worlds
0 0 1 0 0 1 • There are many other gates with no classical analogue:
0 1 0 0 1 0
Quantum CEX Gate:
! !
0 1 1 0 1 1 • The Y and Z gates: Y = 0 −i 1 0
1 0 0 1 0 0 ,Z=
i 0 0 −1
1 0 1 1 1 0
1 1 0 1 0 1 • Together with the X, these are known as the Pauli matrices
1 1 1 1 1 1 !
• The Hadamard Gate: H = √1 1 1
a000 a000 1 0 0 0 0 0 0 0
2 1 −1
a001 a001 0 1 0 0 0 0 0 0
a010
a010
0 0 1 0 0 0 0
0 • H is one of the most useful quantum gates: it takes classical states
(|0i , |1i) to to states “halfway” between |0i and |1i:
a a 0 0 0 1 0 0 0 0
011 011
7→ with matrix XC =
0 0 0 0 1 0 0 0
a100 a100 1
H |0i = √ (|0i + |1i)
a101 a110 0 0 0 0 0 0 1 0
2
a110 a101 0 0 0 0 0 1 0 0
1
a111 a111 0 0 0 0 0 0 0 1 H |1i = √ (|0i − |1i)
2
Lecture 5: Quantum Logic – p.7/17 Lecture 5: Quantum Logic – p.8/17
More New Gates Analysing Quantum Circuits
• In the algorithms we will study next week, we will need to be able to • The basis states transform in the following way:
analyse circuits which contain both one- and two-input gate. This is a bit
more complicated. 1
|00i 7→ √ (|00i + |10i)
• Consider the circuit 2
1
H |01i 7→ √ (|01i + |11i)
2
|I> |I’> |Q> 1
|10i 7→ √ (|00i − |10i)
2
• Clearly |Qi = Nc |I ′ i, but how do we find matrix M such that |I ′ i = M |Ii? 1
|11i 7→ √ (|01i − |11i)
• The Hadamard gate H only acts on one bit of our state 2
• Its action on the first bit is H |0i = √1 (|0i + |1i), and H |1i = √1 (|0i − |1i)
2 2 1 0 1 0
• |Ii is defined on the basis {|00i , |01i , |10i , |11i} 0 1 0 1
• The matrix for this is M = √1
2 1 0 −1 0
0 1 0 −1
• So |I ′ i = M |Ii and hence |Qi = M |I ′ i = Nc M |Ii. We need to calculate • The new states are all entangled pairs (Bell states): if one of the qubits is
measured, we automatically know what the other one is without
measuring it
1 0 0 0 1 0 1 0 1 0 1 0
1 0
1 0 0 0
1 0 1 1 0 1 0
1 • Starting with an initially independent set of qubits, we can form a
Nc M = √ = √
2 0 0 0 1 1 0 −1 0 2 0 1 0 −1 composite state and pass it through this circuit in order to create
0 0 1 0 0 1 0 −1 1 0 −1 0 entangled pairs
H
• This is unitary, as required and expected
|I> |I’> |Q>
• This is actually quite an important quantum circuit: it acts on the basis
states in the following way:
1 1
|00i 7→ √ (|00i + |11i) |01i 7→ √ (|01i + |10i)
2 2
1 1
|10i 7→ √ (|00i − |11i) |11i 7→ √ (|01i − |10i)
2 2