0% found this document useful (0 votes)
13 views35 pages

CYS536 Lect2

The document outlines a lecture on Quantum Computation and Quantum Security, focusing on the concept of qubits and their superposition, including exercises for practical understanding. It also covers the NOT gate and its application in quantum states, along with a discussion on evaluating a textbook related to the subject. Additionally, it includes practical lab activities using IBM Quantum Composer and encourages self-publishing as a viable option for authors.

Uploaded by

Ahmed Mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views35 pages

CYS536 Lect2

The document outlines a lecture on Quantum Computation and Quantum Security, focusing on the concept of qubits and their superposition, including exercises for practical understanding. It also covers the NOT gate and its application in quantum states, along with a discussion on evaluating a textbook related to the subject. Additionally, it includes practical lab activities using IBM Quantum Composer and encourages self-publishing as a viable option for authors.

Uploaded by

Ahmed Mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

CYS 536

Quantum Computation and Quantum Security

2024-2025 - Term 2
Lecture 2
Instructor: Dr. Naya Nagy
Email: nmnagy@iau.edu.sa
Outline

1. The qubit, superposition


2. Lab 2
3. The NOT Gate
4. Judge your text book
The Qubit

A qubit lives in the Hilbert space of two dimensions ℋ2 .

𝑞 = 𝛼 |0ۧ + 𝛽 |1ۧ

𝛼 and 𝛽 are actually complex numbers.


For now, think of them as simple, real numbers.

There is an additional condition of unitarity:


𝛼 2+ 𝛽 2=1
3
The Qubit - Superposition

𝑞 = 𝛼 |0ۧ + 𝛽 |1ۧ

Now 𝑞 is a superposition of zero and one.

Because 𝛼 2 + 𝛽 2 = 1, what are the


- probability of 0, and is 𝛼 2
- probability of 1? Is 𝛽 2

4
The Qubit - Superposition

𝑞 = 𝛼 |0ۧ + 𝛽 |1ۧ

Now 𝑞 is a superposition of zero and one.

Because 𝛼 2 + 𝛽 2 = 1, what are the


- probability of 0, and is 𝛼 2
- probability of 1? is 𝛽 2

5
The Qubit – Superposition - Exercises

Exercise 1. Write the qubit 𝑞1 that is 50% 0 and 50% 1.

Solution
𝑞1 = 𝛼 |0ۧ + 𝛼 |1ۧ
2 2 2 1 1 2
𝛼 + 𝛼 =1 ➔ 𝛼 = ➔𝛼 = =
2 2 2

2 2
𝑞1 = |0ۧ + |1ۧ. ➔ This is a BALANCED SUPERPOSITION
2 2
6
The Qubit – Superposition - Exercises

Exercise 2. Write the qubit 𝑞2 that is 33.33% 0 and 66.66% 1.

Solution
𝑞2 = 𝛼 |0ۧ + 𝛽 |1ۧ
2 2 2 2
𝛼 + 𝛽 = 1 and 𝛽 =2∗ 𝛼
2 2 1 3 2 6
➔ 𝛼 +2∗ 𝛼 =1➔𝛼 = = , and 𝛽 = =
3 3 3 3
3 6
𝑞2 = |0ۧ + |1ۧ.
3 3 7
The Qubit – Superposition - Exercises

Exercise 3. Write the qubit 𝑞3 that is 100% 0.

Solution
𝑞3 = 𝛼 |0ۧ + 𝛽 |1ۧ
𝛼 = 1 and 𝛽 = 0
➔ 𝑞3 = |0ۧ.

8
The Qubit – Superposition - Exercises

Exercise 4. Write the qubit 𝑞4 that is 40% 0 and the rest 1.

Solution
𝑞4 = 𝛼 |0ۧ + 𝛽 |1ۧ
𝛼 2 = 0.4 ➔ 𝛼 = 0.4 = 0.63 …
and 𝛽 2 = 0.6 ➔𝛽 = 0.6 = 0.77 …
➔ 𝑞4 = 0.63|0ۧ + 0.77|1ۧ.
9
The Qubit – Superposition - Exercises

Note – I hope I do not need to say this explicitly, there is an


implicit multiplication in the notation... always
𝒒𝟑 = 𝜶 ∗ |𝟎ۧ + 𝜷 ∗ |𝟏ۧ
➔ 𝒒𝟑 = 𝟎. 𝟔𝟑 ∗ |𝟎ۧ + 𝟎. 𝟕𝟕 ∗ |𝟏ۧ.

10
The Qubit – Superposition - Exercises

Exercise 5. Write the qubit 𝑞5 = 𝛼 |0ۧ + 𝛽 |1ۧ,


such that 𝛽 = 2.

Solution
This problem has no solution!
As 𝛼 2 + 𝛽 2 = 1 ➔ 0 ≤ 𝛽 2 ≤ 0

11
The Qubit – Superposition - Exercises

Exercise 6. Write the qubit 𝑞6 = 𝛼 |0ۧ + 𝛽 |1ۧ,


3
such that 𝛽 = .
5

Solution
2 2 2 3 2 2 9
𝛼 + 𝛽 =1➔ 𝛼 + =1➔ 𝛼 + =1
5 25
2 16 4
𝛼 = ➔𝛼 =
25 5
4 3
Then 𝑞6 = |0ۧ + |1ۧ
5 5 12
The Qubit –
Superposition and
the Fundamental Theorem of Trigonometry

The condition of unitarity for an arbitrary qubit


𝑞 = 𝛼 |0ۧ + 𝛽 |1ۧ is 𝛼 2 + 𝛽 2 = 1

and
For any given angle ∡𝐴, the fundamental theorem of
trigonometry says
sin ∡𝐴 2 + cos ∡𝐴 2 = 1
... hmmm 13
The Qubit – Superposition and
the Fundamental Theorem of Trigonometry

Use a notation with only one argument...


𝜽
Denote the angle .
𝟐
We take the half angle for reason which will be clear later.
then
𝜃 𝜃
𝑞= cos |0ۧ + sin |1ۧ.
2 2

Is it unitary?? YES!!
This folks ... is TRUE ELEGANCE! 14
The Qubit – Superposition written with an angle
Now go through all exercises before and write the qubit
using the angle notation for probabilities.

You may need a calculator.

2 2 𝜋 𝜋 𝜋
𝑞1 = |0ۧ + |1ۧ = cos |0ۧ + sin |1ۧ, and 𝜃 = .
2 2 4 4 2

𝑞3 = |0ۧ = cos 0 |0ۧ + sin 0 |1ۧ, and 𝜃 = 0.


15
The Qubit – Superposition written with an angle
For Exercise 4.
𝑞4 = 0.63|0ۧ + 0.77|1ۧ = arccos 0.63 |0ۧ + arcsin 0.77 |1ۧ
= ___ ∗ |0ۧ + ___ ∗ |1ۧ, and 𝜃 = 2 ∗ ___ = ____ 𝑟𝑎𝑑.

16
The Qubit – Superposition written with an angle
For Exercise 2.
3 6 3 6
𝑞2 = |0ۧ
+ |1ۧ
= arccos |0ۧ
+ arcsin |1ۧ
3 3 3 3
= 0.955 ∗ |0ۧ + 0.955 ∗ |1ۧ, and 𝜃 = 2 ∗ 0.955 = 1.91 𝑟𝑎𝑑.
For computation of arccos and arcsin, you may use
https://www.rapidtables.com/calc/math/Arccos_Calculator.html
https://www.rapidtables.com/calc/math/Arcsin_Calculator.html.

17
Lab Activity

Use IBM Quantum Composer

18
Practical Activity No.2 = Lab 2

Set a qubit in an arbitrary state. Use the gate U.


The U gate is the “universal” gate. It allows you to set the state
of a qubit to any superposition of |0ۧ and |1ۧ.

19
Practical Activity No.2 = Lab 2

The 𝑈 gate, takes three parameters: theta, phi and lambda.


We will use now only theta = 𝜃.
The first parameter of 𝑈 is the angle 𝜃, that is used in the
formula
𝜃 𝜃
𝑞 = cos |0ۧ + sin |1ۧ
2 2
Try all exercises. Add a few more examples of your choice.

Submit screenshots of the circuit.


If you run the circuit, you may run it on a simulator. 20
Practical Activity No.2 = Lab 2

Look at the probability measurement. It should match the


probabilities given by 𝜃.
For example, 𝜃 = 𝜋 gives you a pure 1. What is the qubit 𝑞 in
this case?

21
Practical Activity No.2 = Lab 2
𝜋
For example, what happens for 𝜃 = ?. The supersposition is
2
balanced. What is the qubit 𝑞 in this case?

22
Practical Activity No.2 = Lab 2

Try the gate U(𝜃, 0, 0) for seven different values of 𝜃. Record


the probabilities in a table.
Arrange the different values of 𝜃 in increasing order.
Fill in the table and submit the table to BB.

Theta 0 rad Pi/10


rad
Probabili
ty of 0
Probabili
ty of 1

23
Some One Qubit Gates

The NOT Gate

24
The NOT Gate

The NOT gate has the same meaning as in the classical


sense. It is denoted X
𝑋|0ۧ = |1ۧ and 𝑋|1ۧ = |0ۧ
How to apply the NOT on a superposition?
If 𝑞 = 𝛼 |0ۧ + 𝛽 |1ۧ, then
X𝑞 = 𝑋 𝛼 |0ۧ + 𝛽 |1ۧ = 𝑋𝛼 |0ۧ + 𝑋𝛽 |1ۧ
= 𝛼𝑋|0ۧ + 𝛽𝑋|1ۧ = 𝛼 |1ۧ + 𝛽 |0ۧ = 𝛽 |0ۧ + 𝛼 |1ۧ.
25
The NOT Gate - Exercises

1 3
Exercise 1: Find X𝑞1 , where 𝑞1 = |0ۧ + |1ۧ.
2 2
Solution:
1 3 1 3
X𝑞1 = 𝑋 |0ۧ + |1ۧ = 𝑋 |0ۧ + 𝑋 |1ۧ
2 2 2 2
1 3 1 3 3 1
= 𝑋|0ۧ + 𝑋|1ۧ = |1ۧ + |0ۧ = |0ۧ + |1ۧ
2 2 2 2 2 2

26
Quantum Presence

Read the news


Make an opinion

27
Get Your Textbook!!

https://www.amazon.com/Securing-
Secrets-Beyond-Supercomputers-
Cryptography/dp/B0CN4PP63Z

The kindle version has a good price: $7.44

It has good codes written in Python. You


may use them for experiments and
projects.
28
Judge Your Textbook
Remember the questions we asked for the article...
Ask the same and other questions:
Question 1: What is the purpose of the book?
1. Scientific
2. Informative
3. Advertising a company
4. Advertising and informative
Question 2: Who is the intended audience of the book?
1. Scientific
2. General public
Question 3: Is the textbook credible?
- Is it new ... old?
- technically sound - can you verify that the article is correct?
- Do you have secondary sources that corroborate the credibility? Are the
secondary sources from the same source, author or antagonistic sources?
Judge Your Textbook
Remember the questions we asked for the article...
Ask the same and other questions:
Question 4: Do I understand the article?
- Do I understand ALL the technical concepts?
- Do I need to check some concepts from other sources, because the article is
not self-contained?
Question 5: What can you say about the author? Is the author credible? What can
you say about his credentials? Have you read anything else by this author? Does
anyone else (from your peers or friends) know him/her?
Question 6: How is the technical content?
1. Deep... Shallow... not saying anything
2. Correct... Wrong... Cannot tell
Judge Your Textbook
Remember the questions we asked for the article...
Ask the same and other questions:
Question 7: Is this book useful for me? For what?
Is the article useful to someone else?
Do I recommend the article?
Strongly recommend
Recommend with reservations
Not recommend
Justify to the person you recommend the article to
Positives and Negatives
of the Book:

Some of my own notes


1. The book is very recent. It is a few months old.
2. It is listed as one of the three best books in quantum
cryptography, by “bookauthority”
https://bookauthority.org/books/new-quantum-
cryptography-books
...hmm, ok who is book authority?
Positives and Negatives
of the Book:

3. The book has codes in Python – qiskit ➔ good for us.


4. The chapters of the book follow the expected material,
nothing unusual.
5. The book is self published!!!
Do you know what that means?
You can do it too...
There is no hassle with the publisher...
Self Publishing a Book:

Amazon (and not only) allows to self publish books.


You do not need an approval from a publishing house.
In the past, self published books used to be weak books.
Now, more good authors, choose to self publish their
Books as it gives freedom from the
publisher.
The financial effort on the author’s side
Is small... May aroung 50 USD.
It used to be in the thousands.
Do you want to do this for your project?
We Finished
Week 2

Finalize the group for your


project

35

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy