CS计算机代考程序代写 algorithm MULT20015 Lecture 6 2021 FINAL

MULT20015 Lecture 6 2021 FINAL

MULT20015 Elements of Quantum Computing
Lecture 6

Subject outline

Lecture topics (by week)

1 – Introduction to quantum computing and maths basics
2 – Single qubit representations and logic operations
3 – Two qubit states and logic gates
4 – Multi-qubit states and quantum arithmetic
5 – Basic quantum algorithms
6 – Period finding, cryptography and quantum factoring
7 – Shor’s algorithm, post-quantum crypto, quantum key distribution
8 – Quantum search algorithms
9 – Grover search applications, optimisation problems
10 – Solving optimisation problems on quantum computers
11 – Applications in quantum machine learning
12 – Real quantum computer devices

Assignment schedule:
#1: Hand out in Week 2
#2: Hand out in Week 8

MULT20015 Elements of Quantum Computing
Lecture 6

Week 3

Lecture 5
5.1 Two-qubit systems
5.2 Two qubit example – independent Alice and Bob
5.3 General two qubit states: measurement and operations

Lecture 6
6.1 Two-qubit logic operations
6.2 Entanglement

Practice class 3
Two qubit states and operations

MULT20015 Elements of Quantum Computing
Lecture 6

Lecture 5 recap: binary and decimal in the QUI

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

| alice&bobi

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

=
1

2
|0i+

1

2
|1i+

1

2
|2i+

1

2
|3i

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

binary: amplitude “𝑎!!” = 1/2

deci
mal:

“𝑎!”
= 1/

2

binary amplitude “𝑎””” = 1/2

decimal: “𝑎#” = 1/2

MULT20015 Elements of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JkiqAuh4MZlBWuFTi1n0kwbmrmYnBHKdF7Hx/AJ3Cq41424dW96WdjWAyE//38OJ/m8WAqNtv1u5ebmFxaXlldW19Y3Nrfy2zu3OkoU41UWyUjdeaC5FCGvokDJ72LFIfAkr3ndy0Fee+RKiyi8wV7MGwG0Q+ELBmisZr7sdjmmbqzFYUYvqOsrYCkMTdvO6DH1RtrJstTVDwrTPvTvSyboe+bOsma+YBftYdFZ4YxFgYyr0sx/uq2IJQEPkUnQuu7YMTZSUCiY5Nmqm2geA+tCm9eNDCHgupEOf5rRA+O0qB8pc0KkQ/fvRAqB1r3AM50BYEdPZwPzv6yeoH/WSEUYJ8hDNlrkJ5JiRAfYaEsozlD2jACmhHkrZR0wsNDAndjiKTDEBlycaQqzoloqnhft65NC+WwMaJnskX1yRBxySsrkilRIlTDyRF7IK3mznq0P68v6HrXmrPHMLpko6+cXiDCukw==AAACO3icbZDLSgMxFIYz9X6vunQTLKIglJkiqAuh4MZlBWuFTi1n0kwbmrmYnBHKdF7Hx/AJ3Cq41424dW96WdjWAyE//38OJ/m8WAqNtv1u5ebmFxaXlldW19Y3Nrfy2zu3OkoU41UWyUjdeaC5FCGvokDJ72LFIfAkr3ndy0Fee+RKiyi8wV7MGwG0Q+ELBmisZr7sdjmmbqzFYUYvqOsrYCkMTdvO6DH1RtrJstTVDwrTPvTvSyboe+bOsma+YBftYdFZ4YxFgYyr0sx/uq2IJQEPkUnQuu7YMTZSUCiY5Nmqm2geA+tCm9eNDCHgupEOf5rRA+O0qB8pc0KkQ/fvRAqB1r3AM50BYEdPZwPzv6yeoH/WSEUYJ8hDNlrkJ5JiRAfYaEsozlD2jACmhHkrZR0wsNDAndjiKTDEBlycaQqzoloqnhft65NC+WwMaJnskX1yRBxySsrkilRIlTDyRF7IK3mznq0P68v6HrXmrPHMLpko6+cXiDCukw==

Measurement/collapse on single qubit, renormalisation:

| 0i =
c |10i+ d |11i
p

|c|2 + |d|2

“0”
on

1st

“1” on 1st

& similar for measurements on qubits #2

Single qubit operations on multi-qubit states, e.g. two-qubits):

We write as: |”($ = 2)⟩ = )!*!+”*”|00⟩ where
*!applies a H-gate to qubit #1 in t=0->1, then
)! applies a Y-gate to qubit #1 in t=1->2
*”applies a H-gate to qubit #2 in t=0->1, then
+” applies a X-gate to qubit #2 in t=1->2
NB. Order for different qubit operators doesn’t matter

i.e. we can write |”($ = 2)⟩ = +”*”)!*!|00⟩

qubit 1

qubit 2

t=0 t=1 t=2

|”($ = 2)⟩

MULT20015 Elements of Quantum Computing
Lecture 6

6.1 Two qubit logic operations

MULT20015
Lecture 6

MULT20015 Elements of Quantum Computing
Lecture 6

Quantum superposition:

Systems can be in indeterminate (multiple) states prior to measurement

Quantum entanglement:

Systems can be linked such that measurement of one part correlates to that of another part

Quantum measurement:

Result of any given measurement a-priori unknown, system “collapses” to an outcome

Recall: Key concepts for quantum computing

We’ve looked at superposition and measurement, now for entanglement
– while it might seem to be a niche interest for physicists and philosophers,

it is actually a crucial aspect of quantum computing…

Entanglement is generated when the qubits interact – e.g. via two-qubit logic operations

MULT20015 Elements of Quantum Computing
Lecture 6

Computing with our quantum register

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

So far, we considered two qubits each in a superposition, and although we merge the
description into a “quantum binary register” you’ve seen the qubits are still independent

i.e. measurement outcomes for the Alice qubit didn’t depend on those of the Bob qubit
(& vice-versa)

|0ñ or |1ñ

?

nothing happens
to Bob

corresponding quantum register:
numbers only, no computing (yet)

In order to actually compute anything with the numbers in our quantum register,
we need to interact our qubits physically (similar in a sense to classical logic operations).

When we do so, we generate entanglement – during the computation the numbers represented
in the qubit register become quantum connected…in a sense, they know about each other.

Quantum register state:

MULT20015 Elements of Quantum Computing
Lecture 6

Recall from Lecture 1: Multi qubits – state counting

1 qubit:

|0ñ, |1ñ

2 qubits:

|0ñ, |1ñ |0ñ, |1ñ

Binary combinations

|00ñ, |01ñ, |10ñ, |11ñ

|0ñ, |1ñ

3 qubits:

|0ñ, |1ñ |0ñ, |1ñ

|000ñ, |001ñ, |010ñ, |011ñ
|100ñ, |101ñ, |110ñ, |111ñ

|0ñ, |1ñ

4 qubits:

|0ñ, |1ñ |0ñ, |1ñ |0ñ, |1ñ |0ñ, |1ñ

|0000ñ, |0001ñ, |0010ñ, |0011ñ
|0100ñ, |0101ñ, |0110ñ, |0111ñ
|1000ñ, |1001ñ, |1010ñ, |1011ñ
|1100ñ, |1101ñ, |1110ñ, |1111ñ

binary representation of decimals 0 to 1

binary representation of decimals 0 to 3

binary representation of decimals 0 to 7

binary representation of decimals 0 to 15

MULT20015 Elements of Quantum Computing
Lecture 6

Multiple qubits and quantum processing

Independent quantum superpositions ® superposition over
N-bit binaries |000…0ñ,…, |111…1ñ (and there are 2N of these)

Basic representation of binaries as quantum information:

Quantum computation: qubits interact to create
complex superpositions and entangled states

N qubits …
101100

10

10101110

00101110

11100001

11101010

101100
10

10101110

00101110

11100001

11101010

Not very useful…measurement of qubits collapses to one random N-bit string

11
10
00
01

00
10
00
10

10
11
00
11

binaries time
probability

Bubble: Brocken commons.wikimedia.org

MULT20015 Elements of Quantum Computing
Lecture 6

Quantum information processing

|0000ñ

|0001ñ
|0010ñ

|0011ñ

|0100ñ

|1010ñ

|0110ñ
|0111ñ

|1000ñ

|1001ñ

|0101ñ

|1011ñ

|1100ñ

|1101ñ

|1110ñ

|1111ñ

01
01 11
10

10
11

binaries time

probability

|0000ñ

|0001ñ

|0010ñ

|0011ñ

|0100ñ

|0101ñ

|0110ñ

|0111ñ

|1000ñ

|1001ñ|1010ñ

|1011ñ

|1100ñ

|1101ñ

|1110ñ

|1111ñ

11
00

00
10

11
11

• logic gates between qubits perform mathematical operations on binary data

• complex entangled states created ® binary data are quantum “linked”

• quantum interference amplifies probability of desired output (answer)

start

quantum program

finish

Bubble: Brocken commons.wikimedia.org

CNOT

H

Digital quantum computing:

MULT20015 Elements of Quantum Computing
Lecture 6

Two qubit logic gates: CNOT

Control qubit

Target qubit

Two qubit gates can be constructed using an interaction between the two systems.
Most important is the Controlled-NOT (CNOT) gate.

How states transform: CNOT truth table

Rule: The target is flipped
iff the control qubit is “1”

Symbol for “control”

Symbol for binary
addition (bit flip)

a |00i+ b |01i+ c |10i+ d |11i
! a |00i+ b |01i+ d |10i+ c |11i

AAACbHicdZHbSsNAEIY3UavWUzzcibBYLIJQEhHsZcEbLxWsLTSlTDbbdunmwO5EKaGvKfgA3voEXrhJK2jVgYWPf+Znhn+DVAqNrvtq2Sura5X1jc3q1vbO7p6zf/Cok0wx3maJTFQ3AM2liHkbBUreTRWHKJC8E0xuin7niSstkvgBpynvRzCKxVAwQCMNnLROgfoTjrnrzugFDebsFcxK9ko9nLPRfb9ap74SozGCUsnz//7wm599+QdOzW24ZdHf4C2gRhZ1N3De/DBhWcRjZBK07nluiv0cFAom+azqZ5qnwCYw4j2DMURc9/MymRk9M0pIh4kyL0Zaqt8dOURaT6PATEaAY73cK8S/er0Mh81+LuI0Qx6z+aJhJikmtIiZhkJxhnJqAJgS5lbKxqCAofmMH1sCBSaaIhdvOYXf8HjZ8NyGd39VazUXCW2QY3JKzolHrkmL3JI70iaMvJAPa82qWO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sLTSlTDbbdunmwO5EKaGvKfgA3voEXrhJK2jVgYWPf+Znhn+DVAqNrvtq2Sura5X1jc3q1vbO7p6zf/Cok0wx3maJTFQ3AM2liHkbBUreTRWHKJC8E0xuin7niSstkvgBpynvRzCKxVAwQCMNnLROgfoTjrnrzugFDebsFcxK9ko9nLPRfb9ap74SozGCUsnz//7wm599+QdOzW24ZdHf4C2gRhZ1N3De/DBhWcRjZBK07nluiv0cFAom+azqZ5qnwCYw4j2DMURc9/MymRk9M0pIh4kyL0Zaqt8dOURaT6PATEaAY73cK8S/er0Mh81+LuI0Qx6z+aJhJikmtIiZhkJxhnJqAJgS5lbKxqCAofmMH1sCBSaaIhdvOYXf8HjZ8NyGd39VazUXCW2QY3JKzolHrkmL3JI70iaMvJAPa82qWO/2kX1sn8xHbWvhOSQ/yq5/Akl6tzA=

NB. Here, control
qubit is in first
position in the kets

MULT20015 Elements of Quantum Computing
Lecture 6

CNOT in matrix form

As a matrix, the CNOT operation is:

Recall, matrix representation of two qubit states:

CNOT

⟩|𝜓 = 𝑎!! ⟩|00 + 𝑎!” ⟩|01 +𝑎”! ⟩|10 + 𝑎”” ⟩|11 =

𝑎!!
𝑎!”
𝑎”!
𝑎””

⟩|𝜓 = 𝑎!! ⟩|00 + 𝑎!” ⟩|01
+𝑎”! ⟩|10 + 𝑎”” ⟩|11

⟩|𝜓# = 𝑎!! ⟩|00 + 𝑎!” ⟩|01
+𝑎”! ⟩|11 + 𝑎”” ⟩|10

ket form

matrix form

⟩|𝜓# =
1 0
0 1

0 0
0 0

0 0
0 0

0 1
1 0

𝑎!!
𝑎!”
𝑎”!
𝑎””

=

𝑎!!
𝑎!”
𝑎””
𝑎”!

amplitudes
flipped

amplitudes
flipped

⟩|𝜓

CNOT operation: | ⟩𝜓 | ⟩𝜓!
CNOT

MULT20015 Elements of Quantum Computing
Lecture 6

Example: CNOT on superposition

|0i

Before the CNOT, the state is:

After the CNOT, the state is:

↵ |0i+ � |1i
AAACGHicbZBLSgNBE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GCe+xYG0GIpptN/5XzA0v6fBBr+yLiU/p9IoPQmHEY2M4QaGh+1wr4X62T0qDRzWSUpISRmC0apIpTzIuQeF9qFKTG1oDQ0t7KxRA0CLJR/tgSaLDRFLl4v1P4a25O6p5b965Oa81GmVCF7bF9dsQ8dsaa7JK1WJsJ9sie2Qt7dZ6cN2fivM9a55xyZpf9kPPxBVjRpqA=AAACKnicbZBLSgNBEIZ7fMZ31KWbxiAKQpgRwWyEgBuXEYwKmRBqOhXTpOdBd40QhrmFx/AEbvUE7oJbvYc9ySx8/dDw81UVVf0HiZKGXHfizM0vLC4tV1ZW19Y3Nreq2zs3Jk61wLaIVazvAjCoZIRtkqTwLtEIYaDwNhhdFPXbB9RGxtE1jRPshnAfyYEUQBb1qnV/hJT5iZGHOT/nPqhkCHwKXTfnx9wPkErgeXmvWnPr7lT8r/FKU2OlWr3qp9+PRRpiREKBMR3PTaibgSYpFOarfmowATGCe+xYG0GIpptN/5XzA0v6fBBr+yLiU/p9IoPQmHEY2M4QaGh+1wr4X62T0qDRzWSUpISRmC0apIpTzIuQeF9qFKTG1oDQ0t7KxRA0CLJR/tgSaLDRFLl4v1P4a25O6p5b965Oa81GmVCF7bF9dsQ8dsaa7JK1WJsJ9sie2Qt7dZ6cN2fivM9a55xyZpf9kPPxBVjRpqA=

| i | 0i

| i = (↵ |0i+ � |1i)⌦ |0i = ↵ |00i+ � |10i

MULT20015 Elements of Quantum Computing
Lecture 6

Control Phase Gate

Control qubit

Target qubit

Another useful gate is the controlled phase gate (and generalisations using R-gate menu):

As a matrix:

How states transform:

Rule: the phase of the target flipped iff
the control qubit is “1”.

|00i ! |00i
|01i ! |01i
|10i ! |10i
|11i ! �|11i

Fun fact: CZ matrix is “diagonal” so it doesn’t matter which one you think of as control/target.

CZ =

2

66
4

1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 �1

3

77
5

a |00i+ b |01i+ c |10i+ d |11i
! a |00i+ b |01i+ c |10i � d |11i

AAACbHicjZHbSsNAEI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wbJFJodJxXy15aXlldW9+obG5t7+xW9/YfdJwqxjsslrHqBqC5FBHvoEDJu4niEAaSPwaTm7z/+MSVFnF0j9OE+yGMIjEUDNBI/WrSoEC9CcfMcWb0jAZzdnNmBbuFPpiz0T2v0qCeEqMxglLx83/851/+frXuNJ2i6CK4JdRJWe1+9c0bxCwNeYRMgtY910nQz0ChYJLPKl6qeQJsAiPeMxhByLWfFcnM6IlRBnQYK/MipIX63ZFBqPU0DMxkCDjWv3u5+Fevl+Kw5WciSlLkEZsvGqaSYkzzmOlAKM5QTg0AU8LcStkYFDA0n/FjS6DARJPn4v5OYREeLpqu03TvLuvXrTKhdVIjx+SUuOSKXJNb0iYdwsgL+bBWrFXr3T60a/bRfNS2Ss8B+VF24xNMsLcyAAACbHicjZHbSsNAEIY38VxP9XBXhMViEcSSiGAvBW+8rGC10IQy2W7bpZsDuxOlhL6m4AN46xN44SYNeKgXDix8/DM/M/wbJFJodJxXy15aXlldW9+obG5t7+xW9/YfdJwqxjsslrHqBqC5FBHvoEDJu4niEAaSPwaTm7z/+MSVFnF0j9OE+yGMIjEUDNBI/WrSoEC9CcfMcWb0jAZzdnNmBbuFPpiz0T2v0qCeEqMxglLx83/851/+frXuNJ2i6CK4JdRJWe1+9c0bxCwNeYRMgtY910nQz0ChYJLPKl6qeQJsAiPeMxhByLWfFcnM6IlRBnQYK/MipIX63ZFBqPU0DMxkCDjWv3u5+Fevl+Kw5WciSlLkEZsvGqaSYkzzmOlAKM5QTg0AU8LcStkYFDA0n/FjS6DARJPn4v5OYREeLpqu03TvLuvXrTKhdVIjx+SUuOSKXJNb0iYdwsgL+bBWrFXr3T60a/bRfNS2Ss8B+VF24xNMsLcy

MULT20015 Elements of Quantum Computing
Lecture 6

SWAP gate

Qubit 1

Qubit 2

A SWAP operation can be implemented using an interaction between the two qubits – the
states of the two qubits are swapped (not the physical qubits).

As a matrix:

How states transform:

Rule: the two qubits are swapped.

NB. Unlike CNOT, SWAP gates do not generate entanglement (but “sqrt S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8ASXq3MA==

MULT20015 Elements of Quantum Computing
Lecture 6

Example: a two-qubit circuit

t=0 t=1 t=2 t=3

Slider at t=1

Slider at t=2

Slider at t=3

Consider a simple two-qubit circuit:

What’s gone on here? – the 11 component
turned red, as did the slider…

MULT20015 Elements of Quantum Computing
Lecture 6

Example: a two-qubit circuit

t=0 t=1 t=2 t=3

State at t=1

State at t=2

State at t=3

Consider a simple two-qubit circuit:

⟩|𝜓(𝑡 = 1) = !

⟩|00 + !

⟩|01 + !

⟩|10 + !

⟩|11

CNOT:
⟩|𝜓(𝑡 = 2) = !


⟩|00 + !


⟩|01 + !


⟩|10 + !


⟩|11

CZ:
⟩|𝜓(𝑡 = 3) = !


⟩|00 + !


⟩|01 + !


⟩|10 − !


⟩|11

a |00i+ b |01i+ c |10i+ d |11i
! a |00i+ b |01i+ c |10i � d |11i

AAACbHicjZHbSsNAEIY38VxP9XBXhMViEcSSiGAvBW+8rGC10IQy2W7bpZsDuxOlhL6m4AN46xN44SYNeKgXDix8/DM/M/wbJFJodJxXy15aXlldW9+obG5t7+xW9/YfdJwqxjsslrHqBqC5FBHvoEDJu4niEAaSPwaTm7z/+MSVFnF0j9OE+yGMIjEUDNBI/WrSoEC9CcfMcWb0jAZzdnNmBbuFPpiz0T2v0qCeEqMxglLx83/851/+frXuNJ2i6CK4JdRJWe1+9c0bxCwNeYRMgtY910nQz0ChYJLPKl6qeQJsAiPeMxhByLWfFcnM6IlRBnQYK/MipIX63ZFBqPU0DMxkCDjWv3u5+Fevl+Kw5WciSlLkEZsvGqaSYkzzmOlAKM5QTg0AU8LcStkYFDA0n/FjS6DARJPn4v5OYREeLpqu03TvLuvXrTKhdVIjx+SUuOSKXJNb0iYdwsgL+bBWrFXr3T60a/bRfNS2Ss8B+VF24xNMsLcyAAACbHicjZHbSsNAEIY38VxP9XBXhMViEcSSiGAvBW+8rGC10IQy2W7bpZsDuxOlhL6m4AN46xN44SYNeKgXDix8/DM/M/wbJFJodJxXy15aXlldW9+obG5t7+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rSoEC9CcfMcWb0jAZzdnNmBbuFPpiz0T2v0qCeEqMxglLx83/851/+frXuNJ2i6CK4JdRJWe1+9c0bxCwNeYRMgtY910nQz0ChYJLPKl6qeQJsAiPeMxhByLWfFcnM6IlRBnQYK/MipIX63ZFBqPU0DMxkCDjWv3u5+Fevl+Kw5WciSlLkEZsvGqaSYkzzmOlAKM5QTg0AU8LcStkYFDA0n/FjS6DARJPn4v5OYREeLpqu03TvLuvXrTKhdVIjx+SUuOSKXJNb0iYdwsgL+bBWrFXr3T60a/bRfNS2Ss8B+VF24xNMsLcy

-1 <-> 𝜋 phase

But, why has the slider turned red? – entanglement!

CZ:

symmetric -> no change in flip

MULT20015 Elements of Quantum Computing
Lecture 6

6.2 Entanglement

MULT20015
Lecture 6

MULT20015 Elements of Quantum Computing
Lecture 6

Entanglement – the real magic of quantum mechanics

So far, we have focused on qubits in quantum superpositions and subsequent measurement.

Strange and wonderful as that is, superposition is actually the least weird aspect of qubits.

Now we get to the stuff that really bothered Einstein and the like – entanglement!

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

|00ñ

|11ñ
Y

|10ñ

|01ñ

Let’s look at different types of two-qubit states:

| alice&bobi =

1
p
2
|0i+

1
p
2
|1i



1
p
2
|0i+

1
p
2
|1i

® measurement results are independent

|11ñ
Y

|00ñ

® entangled, measurement results are dependent!

1
p
2
|00i+

1
p
2
|11i

Looks simpler,
but it’s far more

interesting!

Independent superpositions of Alice and Bob

Too “spooky”
to be true

An entangled state of Alice and Bob

“product” | alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

no “product”
analogy

possible!⊗

MULT20015 Elements of Quantum Computing
Lecture 6

Entanglement – why it is strange

Let’s look at that entangled state in more detail – measurement scenarios:

|11ñ
Y

|00ñ

Bob’s measurement
result is completely

determined after
Alice’s qubit

measurement!

i.e. Alice
measurement

somehow determines
Bob’s outcome!

Wow.

1
p
2
|00i+

1
p
2
|11i

Alice measures “0”
(50% of the time)

overall state collapses

® |00ñ

?

1
p
2
|00i+

1
p
2
|11i

50%

𝑎!! = 1/ 2

𝑎”” = 1/ 2

Prob[00] = 𝑎!!
# = ”

#

Prob[11] = 𝑎””
# = ”

#

?

Bob measures “0”
100% of the time

Alice measures “1”
(50% of the time)

overall state collapses

® |11ñ

?

Bob measures “1”
100% of the time

50%

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

(NB. this is called
a “Bell State” after

John Bell who figured
out how to really test

all this…)

Looks what happens when Alice measures (first qubit)

MULT20015 Elements of Quantum Computing
Lecture 6

Aside: why did entanglement worry Einstein?

|11ñ
Y

|00ñ Bob’s measurement result is completely determined by
the result of Alice’s qubit measurement!

i.e. Alice measurement determines Bob’s outcome!

1
p
2
|00i+

1
p
2
|11i

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11iEinstein (and others) objected to this because it seemed to imply action or communication

faster than light…

i.e. imagine Alice and Bob qubits are separated to either side of the galaxy…you can see how
it appears that Alice sends a signal to Bob in order for Bob’s measurement to work out.

Important – even though entanglement worried Einstein, you can prove that no actual
communication actually happens between Alice and Bob…it’s more like an “influence”.

We don’t really understand it, but “quantum connections” do occur (Bell showed the way)

More to the point, they are a “resource” that powers quantum computation…

MULT20015 Elements of Quantum Computing
Lecture 6

Back to the example circuit

⟩|𝜓(𝑡 = 3) = !

⟩|00 + !

⟩|01 + !

⟩|10 − !

⟩|11

t=0 t=1 t=2 t=3

⟩|𝜓(𝑡 = 1) = !

⟩|00 + !

⟩|01 + !

⟩|10 + !

⟩|11 = !

⟩|0 + ⟩|1 ⊗ !

⟩|0 + ⟩|1

⟩|𝜓(𝑡 = 2) = !

⟩|00 + !

⟩|01 + !

⟩|10 + !

⟩|11 = !

⟩|0 + ⟩|1 ⊗ !

⟩|0 + ⟩|1

Can write as a “product” -> no entanglement

Can’t write as a “product” -> entangled!

Can write as a “product” -> no entanglement

Most will say, yes I can I’ll just use i to get the −

)

⟩|11 …but it won’t work…

i.e.
!

⟩|0 + ⟩𝑖 |1 ⊗ !

⟩|0 + ⟩𝑖 |1 = !

⟩|00 + #

⟩|01 + #

⟩|10 − !

⟩|11 See, it’s not the same state…

MULT20015 Elements of Quantum Computing
Lecture 6

Separable states

| i = a|0i+ b|1i |�i = c|0i+ d|1i

A separable state is one which can be written as

|�i = | i ⌦ |�i

All separable states (of two qubits) can be written as:

| i = ac |00i+ ad |01i+ bc |10i+ bd |11i
AAACOnicbVDLSgMxFM34rPVVdekmWARBKBMR7EYpuHFZwT6gM5Q7mbQNzTxIMkIZ+jd+hl/gVjduBRfi1g8wM9OFbb0QOI97uTfHiwVX2rbfrZXVtfWNzdJWeXtnd2+/cnDYVlEiKWvRSESy64FigoespbkWrBtLBoEnW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q9U7ZqdF14GZAaqaFbNfuXT8SOaBCzUVIBSPWLH2k1Bak4Fm5adRLEY6BiGrGdgCAFTbpr/c4pPjeLjQSTNCzXO1b8TKQRKTQLPdAagR2rRy8T/vF6iB3U35WGcaBbSYtEgEVhHOAsN+1wyqsXEAKCSm1sxHYEEqk20c1s8CSaaLBeymMIyaF/UiF0j95fVRn2WUAkdoxN0hgi6Qg10h5qohSh6Qi/oFb1Zz9aH9WV9F60r1mzmCM2V9fMLqUqrow==AAACOnicbVDLSgMxFM34rPVVdekmWARBKBMR7EYpuHFZwT6gM5Q7mbQNzTxIMkIZ+jd+hl/gVjduBRfi1g8wM9OFbb0QOI97uTfHiwVX2rbfrZXVtfWNzdJWeXtnd2+/cnDYVlEiKWvRSESy64FigoespbkWrBtLBoEnWMcb32Z+55FJxaPwQU9i5gYwDPmAU9BG6ldunDHT2IkVx9cYaMZS257icww+LhjJmFdYJLc8vyBk2q9U7ZqdF14GZAaqaFbNfuXT8SOaBCzUVIBSPWLH2k1Bak4Fm5adRLEY6BiGrGdgCAFTbpr/c4pPjeLjQSTNCzXO1b8TKQRKTQLPdAagR2rRy8T/vF6iB3U35WGcaBbSYtEgEVhHOAsN+1wyqsXEAKCSm1sxHYEEqk20c1s8CSaaLBeymMIyaF/UiF0j95fVRn2WUAkdoxN0hgi6Qg10h5qohSh6Qi/oFb1Zz9aH9WV9F60r1mzmCM2V9fMLqUqrow==

MULT20015 Elements of Quantum Computing
Lecture 6

Examples of separable states

Consider the state:

It is separable because:

Consider the state:

It is also separable because:

| i =
|00i+ |01i

p
2

| i = |0i ⌦
|0i+ |1i

p
2

| i =
|0i+ |1i

p
2


|0i+ |1i

p
2

| i =
|00i+ |01i+ |10i+ |11i

2

MULT20015 Elements of Quantum Computing
Lecture 6

Constructing a Bell state

Refers to maximally entangled 2 qubit states named after the physicist John
Bell (who figured out how to experimentally explore the reality of
entanglement).

Execution:

Question: Is
|00i+ |11i

p
2

separable?

Consider the following circuit in the QUI:

|00i !
|00i+ |10i

p
2

!
|00i+ |11i

p
2H CNOT

MULT20015 Elements of Quantum Computing
Lecture 6

Entanglement

Answer: No! We can never find a, b, c, d, i.e.

A state which is not separable is called an entangled state.

Entanglement is a uniquely quantum mechanical property, with no direct
classical analogue.

|00i+ |11i
p
2

6= (a |0i+ b |1i)⌦ (c |0i+ d |1i)
AAACW3icbZBLSwMxFIXT8V1fVXHlJliEilASEXQpuHGpYFXolJJJ72hoJjNN7ghlmJ/nj3Dh0pVb3Zs+xOeFwOGceznhizKtHDL2VAlmZufmFxaXqssrq2vrtY3Na5fmVkJLpjq1t5FwoJWBFirUcJtZEEmk4Sbqn43ymwewTqXmCocZdBJxZ1SspEBvdWvdMLZCFjTsAxaMlfRgIjkvaVmEbmCxOCxLGhoY0IYYh5T5rWgi+T4NU1QJONqQX2nvM+3W6qzJxkP/Cj4VdTKdi27tJeylMk/AoNTCuTZnGXYKYVFJDWU1zB1kQvbFHbS9NMJXd4oxiJLueadH49T6Z5CO3e8XhUicGyaR30wE3rvf2cj8L2vnGJ90CmWyHMHISVGca4opHVGlPWVBoh56IaRV/q9U3gtPFj37Hy2RFZ5M6bnw3xT+iuvDJmdNfnlUPz2ZElokO2SXNAgnx+SUnJML0iKSPJJX8kbeK8/BTFANViarQWV6s0V+TLD9AU0Vstk=AAACW3icbZBLSwMxFIXT8V1fVXHlJliEilASEXQpuHGpYFXolJJJ72hoJjNN7ghlmJ/nj3Dh0pVb3Zs+xOeFwOGceznhizKtHDL2VAlmZufmFxaXqssrq2vrtY3Na5fmVkJLpjq1t5FwoJWBFirUcJtZEEmk4Sbqn43ymwewTqXmCocZdBJxZ1SspEBvdWvdMLZCFjTsAxaMlfRgIjkvaVmEbmCxOCxLGhoY0IYYh5T5rWgi+T4NU1QJONqQX2nvM+3W6qzJxkP/Cj4VdTKdi27tJeylMk/AoNTCuTZnGXYKYVFJDWU1zB1kQvbFHbS9NMJXd4oxiJLueadH49T6Z5CO3e8XhUicGyaR30wE3rvf2cj8L2vn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37Hy2RFZ5M6bnw3xT+iuvDJmdNfnlUPz2ZElokO2SXNAgnx+SUnJML0iKSPJJX8kbeK8/BTFANViarQWV6s0V+TLD9AU0Vstk=

MULT20015 Elements of Quantum Computing
Lecture 6

Entanglement Measure

We would like to have a measure of how much entanglement a state has. Some
states are more entangled than others:

1
p
2
|00i+

1
p
2
|11i

AAACNXicdZDLSgMxFIYz9VbrbdSlm2ARBKFMimDdFdy4rGAv0BlKJs20oZmLyRmhDPMsPoZP4FbXLtypW1/B9LLQVg8Efv7/HM7J5ydSaHCcV6uwsrq2vlHcLG1t7+zu2fsHLR2nivEmi2WsOj7VXIqIN0GA5J1EcRr6krf90dUkb99zpUUc3cI44V5IB5EIBKNgrJ596QaKsozkmavvFGTVPMfuiEPmODk+w/+lhOQ9u+xUnGnhZUHmoozm1ejZH24/ZmnII2CSat0lTgJeRhUIJnleclPNE8pGdMC7RkY05NrLpl/M8Ylx+jiIlXkR4Kn7cyKjodbj0DedIYWhXswm5l9ZN4Wg5mUiSlLgEZstClKJIcYTXrgvFGcgx0ZQpoS5FbMhNVTAUP21xVfUoJlwIYsUlkWrWiFOhdycl+u1OaEiOkLH6BQRdIHq6Bo1UBMx9ICe0DN6sR6tN+vd+py1Fqz5zCH6VdbXN8aOrKI=AAACNXicdZDLSgMxFIYz9VbrbdSlm2ARBKFMimDdFdy4rGAv0BlKJs20oZmLyRmhDPMsPoZP4FbXLtypW1/B9LLQVg8Efv7/HM7J5ydSaHCcV6uwsrq2vlHcLG1t7+zu2fsHLR2nivEmi2WsOj7VXIqIN0GA5J1EcRr6krf90dUkb99zpUUc3cI44V5IB5EIBKNgrJ596QaKsozkmavvFGTVPMfuiEPmODk+w/+lhOQ9u+xUnGnhZUHmoozm1ejZH24/ZmnII2CSat0lTgJeRhUIJnleclPNE8pGdMC7RkY05NrLpl/M8Ylx+jiIlXkR4Kn7cyKjodbj0DedIYWhXswm5l9ZN4Wg5mUiSlLgEZstClKJIcYTXrgvFGcgx0ZQpoS5F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fmXlpl6IaxtqXQnat/JzIWGTONAtsZMRybVS8X//N6KYZ1PxMqSREUXywKU+li7ObPu0OhgaOcWsK4FvZWl4+ZZhxtREtbAs1sNHku3moK66R9XfNozXu4qTbqRUIlck4uyBXxyC1pkHvSJC3CiSQv5JW8Oc/Ou/PhfC5aN5xi5owswfn6BXacmBA=AAACAnicbVDLSgNBEJz1GeMr6tHLYhA8hVkRzDHgxWME84BkCbOT3mTI7Owy0yuEJTe/wKt+gTfx6o/4Af6Hs8keTGJBQ1HVTXdXkEhhkNJvZ2Nza3tnt7RX3j84PDqunJy2TZxqDi0ey1h3A2ZACgUtFCihm2hgUSChE0zucr/zBNqIWD3iNAE/YiMlQsEZWqnbnwBmlM4GlSqt0TncdeIVpEoKNAeVn/4w5mkECrlkxvQ8mqCfMY2CS5iV+6mBhPEJG0HPUsUiMH42v3fmXlpl6IaxtqXQnat/JzIWGTONAtsZMRybVS8X//N6KYZ1PxMqSREUXywKU+li7ObPu0OhgaOcWsK4FvZWl4+ZZhxtREtbAs1sNHku3moK66R9XfNozXu4qTbqRUIlck4uyBXxyC1pkHvSJC3CiSQv5JW8Oc/Ou/PhfC5aN5xi5owswfn6BXacmBA=

Not entangled, separable

Entangled, but close to a separable state

Maximally entangled

In the QUI we measure the degree of entanglement using an informatic “entropy”
measure: Entanglement Entropy (EE)

Entanglement is a type of correlation between two systems, say A and B.

To see how much correlation there is between A and B: We can measure
B and ask how many bits of information (as measured by entropy) this can
tell us about the state of A?

MULT20015 Elements of Quantum Computing
Lecture 6

Entanglement Entropy – a recipe (used on QUI)

𝐻 = −𝜆” log)(𝜆”) − 𝜆) log)(𝜆)).

To calculate the entanglement entropy between two qubits, follow these steps…

Consider an arbitrary normalized two-qubit state:

⟩|𝜓 = 𝑎!! ⟩|00 + 𝑎!” ⟩|01 +𝑎”! ⟩|10 + 𝑎”” ⟩|11

1. Construct the matrix from the amplitudes: 𝐴 =
𝑎!! 𝑎!”
𝑎”! 𝑎””

2. Calculate the eigenvalues 𝜆” and 𝜆) of the matrix product 𝐴𝐴*.

3. The entanglement entropy (EE) between the qubits (in number of bits) is given by:

QUI does this for you, EE displayed on red-scale on time-slider
-> generalises to circuits involving more qubits (EE between
qubits above/below the corresponding segment on slider)

NB. Two-qubits: max EE = 1 bit

MULT20015 Elements of Quantum Computing
Lecture 6

Generating Bell states

|11ñ
Y

|00ñ

1
p
2
|00i+

1
p
2
|11i

| alice&bobi = | alicei ⇥ | bobi

= (
1
p
2
|0i+

1
p
2
|1i)⇥ (

1
p
2
|0i+

1
p
2
|1i)

=
1

2
|0i |0i+

1

2
|0i |1i+

1

2
|1i |0i+

1

2
|1i |1i

=
1

2
|00i+

1

2
|01i+

1

2
|10i+

1

2
|11i

John Bell (1964) figured out a protocol to actually measure whether entanglement was
true or not in physical systems (answer is yes to many standard deviations).

The family of simple two-qubit maximally entangled states are named in his honour – Bell States

NB. Two-qubits: max EE = 1 bit

MULT20015 Elements of Quantum Computing
Lecture 6

Dialing in the level of entanglement entropy (EE)

Adjust angle of R-gate rotation (about X + Z axis)

R-gate same as H-gate
-> maximal entanglement

As we reduce
the rotation angle
in R we make the
superposition in

qubit #1 more
unbalanced

before the CNOT

-> slider bar becomes
less red…

(lower entanglement)

EE max

EE med

EE low

MULT20015 Elements of Quantum Computing
Lecture 6

Week 3

Lecture 5
5.1 Two-qubit systems
5.2 Two qubit example – independent Alice and Bob
5.3 General two qubit states: measurement and operations

Lecture 6
6.1 Two-qubit logic operations
6.2 Entanglement

Practice class 3
Two qubit states and operations

MULT20015 Elements of Quantum Computing
Lecture 6

Subject outline

Lecture topics (by week)

1 – Introduction to quantum computing and maths basics
2 – Single qubit representations and logic operations
3 – Two qubit states and logic gates
4 – Multi-qubit states and quantum arithmetic
5 – Basic quantum algorithms
6 – Period finding, cryptography and quantum factoring
7 – Shor’s algorithm, post-quantum crypto, quantum key distribution
8 – Quantum search algorithms
9 – Grover search applications, optimisation problems
10 – Solving optimisation problems on quantum computers
11 – Applications in quantum machine learning
12 – Real quantum computer devices

Assignment schedule:
#1: Hand out in Week 2
#2: Hand out in Week 8