SlideShare a Scribd company logo
Cryptography
Quant2a
Quant2a
• I,H matrices 2X2
• Tensor(I,H) (I11H I12H
• I21H I22H)
• I11 I22 I21 I22 are all numbers!
• The outcome is a matrix of 4x4
Quant2a
Quant2a
Shor’s Algorithm
• The best-known classical algorithm for factoring N
is ”General number field sieve”
• Shor’s Algorithm is polynomial in log𝑁 and uses log 𝑁 space
Factorization
• Let N a huge integer s.t.
• p, q are primes
• N= p*q
• We wish to find p, q
Reformulation of factorization
• Let N as before.
• Pick randomly a number a< N
• If GCD(a, N )>1 so we achieved the required (we can
do this step using the Euclidean algorithm)
• GCD(a, N ) = 1
Finding an Even Period
• Consider the following function :
F(x) = 𝑎𝑥
mod(N) for x integer
• Assume r is the smallest period of F:
F(x+r)=F(x) ∀ m<r F(x+m)≠F(x)
Even Period
• N=15
• 7^2=49 4(15)
• 7^3= 13(15)
• 7^4 =1 (15)
• 7^8 =1 (15)
• a^m = a^(m+r) => a^r=1 a^r-1 =0 mod(N)
• If r is even : a^2-b^2 –(a-b)(a+b)
• 0=a^r-1 = (a^(r/2) -1)(a^(r/2)+1)
• If a^(r/2) =-1Mod(N) =>a^(r/2)=N-1 mod(N)
• If r is odd we cannot do anything (need a new a)
• If r is even but 𝑎
𝑟
2 ≡ -1mod(N) we cant factorize N
need a new a
We have r is an even period
𝑎𝑟 ≡ 1 (N)
When r is bad?
Even Period
𝑎
r
2 ∓ 1 ≡ 0 mod(N)
We factorized N !!!
Quant2a
Examples
The simple
N=15 , a=7
The period: 7,49, 343, 2401
Convert to mod (15): 7,4, 13, 1
➢ r =4
➢GCD(72 +1,15) = 5
➢GCD(72 -1,15) = 3
Wow it works!
Examples
Tedious one
N=35 , a=12
Period mod 35: 12,4,13,16,17,29,33,11,27,9,3,1
➢ r =12, we need 126 mod(35)= 29
➢ GCD(126
+1,35) = 5 GCD(126
-1,35) = 7
Well….
If some one provides you the period r ,yes.
But no oracles in algorithms. We need to find it
ourselves
Is it that easy?
The Quantum Part
• We have a function F s.t.
• F : {0,1}𝑛 -> {0,1}𝑛
• Find an even number r s.t.
• F(x)= F(x+r) ∀ x
• ∀ m< r F(x+m)≠F(x)
Quant2a
Deutsch’s Problem
Quantum Oracle
Quant2a
The Black box
Quant2a
• We need to ask the oracle twice
• Can't solve it faster!!
Black box – Classical Case
Quantum Case
• We wish to find a unitary gate that allows us to find
the function faster.
• This operator maps one Qbit to one Qbit
Does it work?
F constant
• U maps 0 & 1to the same values so it is not
unitary
Quant2a
The Hadamard Case
Hadamard
• (1 1
• (1-1)
Examples
Quant2a
Quant2a
Deutsch’s Problem
• The left side is the scheme
• The right is one of the four functions we may have
Remark
Quant2a
• If f is constant, get |+> and after Hadamard |0>
• If f isn’t constant, get |-> and after Hadamard |1>
What do we have?
Quantum Fourier Transform (QFT)
QFT Properties
• QFT is unitary :
||x||=1 => ||QFT|x>||=1
||x||=1,||y||=1 ,<x,y>=0 => <QFT|x>,QFT|y> > =0
• The order of QFT is a power of 2(2𝑙
)
• Commonuse for FFT is finding periods
(convert a signal from time axis to frequency)
QFT – Matrix representation
• QFT is a matrix that its (a, c) entry is:
• We can show that it is a unitary matrix
• A common notation is 𝐴𝑞
Or Tensor (with n qubits )
Phase Operator
Quant2a
Shor’s Algorithm
Quant2a
Measuring the second register
Now, QFT
Shor algorithm
• We map a state |a> 0<a<q-1 as follow:
|a> →
Quantum Fourier Transform (QFT)
Quant2a
Probability Analysis for a state |y>
Searching for good y’s
Quant2a
• https://www.quantiki.org/wiki/shors-factoring-algorithm
• https://www.kau.edu.sa/Files/830001/Files/57627_Algorithms_Part17.pdf
• https://people.eecs.berkeley.edu/~luca/quantum/lecture08.pdf
• https://courses.edx.org/c4x/BerkeleyX/CS191x/asset/chap5.pdf
• https://www.cl.cam.ac.uk/teaching/1617/QuantComp/slides7.pdf
• https://arcb.csc.ncsu.edu/~mueller/qc/qc19/readings/Quantum%20Fourier
%20Transforms%20191119.pdf
• https://arxiv.org/pdf/1408.6252.pdf
• https://www.youtube.com/watch?v=YoWBUhbrRn0
bib

More Related Content

PPT
Cs1311lecture23wdl
PPTX
Asymptotic notations(Big O, Omega, Theta )
PPT
Binsort
PPTX
3 analysis.gtm
PDF
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
PPTX
Queue- 8 Queen
Cs1311lecture23wdl
Asymptotic notations(Big O, Omega, Theta )
Binsort
3 analysis.gtm
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
Queue- 8 Queen

What's hot (20)

PPTX
Bucket sort- A Noncomparision Algorithm
PDF
Boyd 4.6, 4.7
PPTX
asymptotic notation
PPT
Asymptotic analysis
PDF
2-Approximation Vertex Cover
PPT
Time complexity
PPT
Analysis Of Algorithms - Hashing
PPT
Algorithm: Quick-Sort
PPT
Asymptotic Notation and Complexity
PPT
Randomized algorithms ver 1.0
PPT
Sorting Seminar Presentation by Ashin Guha Majumder
PDF
Origins of Free
DOCX
Choleskymethod
 
PDF
Analysis and design of algorithms part 4
PPTX
Sorting Algorithms
PDF
Asymptotic Notation
Bucket sort- A Noncomparision Algorithm
Boyd 4.6, 4.7
asymptotic notation
Asymptotic analysis
2-Approximation Vertex Cover
Time complexity
Analysis Of Algorithms - Hashing
Algorithm: Quick-Sort
Asymptotic Notation and Complexity
Randomized algorithms ver 1.0
Sorting Seminar Presentation by Ashin Guha Majumder
Origins of Free
Choleskymethod
 
Analysis and design of algorithms part 4
Sorting Algorithms
Asymptotic Notation
Ad

Similar to Quant2a (20)

PPTX
Shor’s algorithm the ppt
PPTX
myppt for health issues at IITB. Don't come to IITB
PPTX
Shors_Algorithm_Factoring using the number.pptx
PPTX
Shors'algorithm simplified.pptx
PDF
A basic overview to the Shor's algorithm
PPTX
Shors_Algorithm_Factorization using.pptx
PPT
QC-UNIT 2.ppt
PPT
full description on quantum computing.ppt
PPT
quantumComputers.ppt
PPT
quantumComputers.ppt
PPT
quantumComputers.pptjhijjkbtyfvhjbvvjvkjlh
PPT
quantumComputers.ppt
PPT
quantumComputers.ppt
PPT
quantumComputers (1).ppt
PPT
quantumComputers.ppt
PPT
quantumComputers.pptICICI-An HR perspective
PPT
hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
PPT
quantumComputers.ppt
PPT
quantumComputers.ppt
PPT
quantumComputers.ppt
Shor’s algorithm the ppt
myppt for health issues at IITB. Don't come to IITB
Shors_Algorithm_Factoring using the number.pptx
Shors'algorithm simplified.pptx
A basic overview to the Shor's algorithm
Shors_Algorithm_Factorization using.pptx
QC-UNIT 2.ppt
full description on quantum computing.ppt
quantumComputers.ppt
quantumComputers.ppt
quantumComputers.pptjhijjkbtyfvhjbvvjvkjlh
quantumComputers.ppt
quantumComputers.ppt
quantumComputers (1).ppt
quantumComputers.ppt
quantumComputers.pptICICI-An HR perspective
hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
quantumComputers.ppt
quantumComputers.ppt
quantumComputers.ppt
Ad

More from Natan Katz (20)

PDF
Open Source models security- Supply chain
PDF
AI HIT taught in HIT always believe thanks
PPTX
AI Open-Source Models- Benefits vs. Risks.
PPTX
final_v.pptx
PPTX
AI for PM.pptx
PPTX
SGLD Berlin ML GROUP
PPTX
Ancestry, Anecdotes & Avanan -DL for Amateurs
PDF
Cyn meetup
PDF
Finalver
PDF
Foundation of KL Divergence
PPTX
Bismark
PPTX
Bayesian Neural Networks
PDF
Deep VI with_beta_likelihood
PPTX
NICE Research -Variational inference project
PPTX
NICE Implementations of Variational Inference
PPTX
PDF
Reinfrocement Learning
PPTX
Neural ODE
PDF
Variational inference
PPTX
GAN for Bayesian Inference objectives
Open Source models security- Supply chain
AI HIT taught in HIT always believe thanks
AI Open-Source Models- Benefits vs. Risks.
final_v.pptx
AI for PM.pptx
SGLD Berlin ML GROUP
Ancestry, Anecdotes & Avanan -DL for Amateurs
Cyn meetup
Finalver
Foundation of KL Divergence
Bismark
Bayesian Neural Networks
Deep VI with_beta_likelihood
NICE Research -Variational inference project
NICE Implementations of Variational Inference
Reinfrocement Learning
Neural ODE
Variational inference
GAN for Bayesian Inference objectives

Recently uploaded (20)

PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
2. Earth - The Living Planet Module 2ELS
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PDF
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
PPTX
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
PPTX
Microbiology with diagram medical studies .pptx
PPTX
INTRODUCTION TO EVS | Concept of sustainability
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PDF
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
DOCX
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
PPTX
2. Earth - The Living Planet earth and life
PPTX
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
PPTX
Pharmacology of Autonomic nervous system
PPTX
BIOMOLECULES PPT........................
PDF
An interstellar mission to test astrophysical black holes
PDF
Sciences of Europe No 170 (2025)
PPTX
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
PDF
HPLC-PPT.docx high performance liquid chromatography
PDF
. Radiology Case Scenariosssssssssssssss
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
7. General Toxicologyfor clinical phrmacy.pptx
2. Earth - The Living Planet Module 2ELS
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
Microbiology with diagram medical studies .pptx
INTRODUCTION TO EVS | Concept of sustainability
The KM-GBF monitoring framework – status & key messages.pptx
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
2. Earth - The Living Planet earth and life
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
Pharmacology of Autonomic nervous system
BIOMOLECULES PPT........................
An interstellar mission to test astrophysical black holes
Sciences of Europe No 170 (2025)
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
HPLC-PPT.docx high performance liquid chromatography
. Radiology Case Scenariosssssssssssssss
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...

Quant2a