SlideShare a Scribd company logo
1 of 53
Download to read offline
Cryptography
• 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
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 !!!
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)
Deutsch’s Problem
Quantum Oracle
The Black box
• 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
The Hadamard Case
Hadamard
• (1 1
• (1-1)
Examples
Deutsch’s Problem
• The left side is the scheme
• The right is one of the four functions we may have
Remark
• 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
Shor’s Algorithm
Measuring the second register
Now, QFT
Shor algorithm
• We map a state |a> 0<a<q-1 as follow:
|a> →
Quantum Fourier Transform (QFT)
Probability Analysis for a state |y>
Searching for good y’s
• 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

What's hot (20)

Back tracking
Back trackingBack tracking
Back tracking
 
Bucket sort- A Noncomparision Algorithm
Bucket sort- A Noncomparision AlgorithmBucket sort- A Noncomparision Algorithm
Bucket sort- A Noncomparision Algorithm
 
Boyd 4.6, 4.7
Boyd 4.6, 4.7Boyd 4.6, 4.7
Boyd 4.6, 4.7
 
asymptotic notation
asymptotic notationasymptotic notation
asymptotic notation
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
2-Approximation Vertex Cover
2-Approximation Vertex Cover2-Approximation Vertex Cover
2-Approximation Vertex Cover
 
Time complexity
Time complexityTime complexity
Time complexity
 
Analysis Of Algorithms - Hashing
Analysis Of Algorithms - HashingAnalysis Of Algorithms - Hashing
Analysis Of Algorithms - Hashing
 
Quick sorting
Quick sortingQuick sorting
Quick sorting
 
Lecture24
Lecture24Lecture24
Lecture24
 
Algorithm: Quick-Sort
Algorithm: Quick-SortAlgorithm: Quick-Sort
Algorithm: Quick-Sort
 
Lecture23
Lecture23Lecture23
Lecture23
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Sorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha MajumderSorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha Majumder
 
Origins of Free
Origins of FreeOrigins of Free
Origins of Free
 
Choleskymethod
CholeskymethodCholeskymethod
Choleskymethod
 
Analysis and design of algorithms part 4
Analysis and design of algorithms part 4Analysis and design of algorithms part 4
Analysis and design of algorithms part 4
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 

Similar to Quant2a

Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsDharmalingam Ganesan
 
Universal Approximation Theorem
Universal Approximation TheoremUniversal Approximation Theorem
Universal Approximation TheoremJamie Seol
 
2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptx2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptxRams715121
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiouvafopoulos
 
Fundamental computing algorithms
Fundamental computing algorithmsFundamental computing algorithms
Fundamental computing algorithmsGanesh Solanke
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic ProgrammingSahil Kumar
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................nourhandardeer3
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesFahim Ferdous
 
Shor’s algorithm the ppt
Shor’s algorithm the pptShor’s algorithm the ppt
Shor’s algorithm the pptMrinal Mondal
 
Introduction to the AKS Primality Test
Introduction to the AKS Primality TestIntroduction to the AKS Primality Test
Introduction to the AKS Primality TestPranshu Bhatnagar
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesSreedhar Chowdam
 
Sorting Algorithm
Sorting AlgorithmSorting Algorithm
Sorting AlgorithmAl Amin
 
1 chapter1 introduction
1 chapter1 introduction1 chapter1 introduction
1 chapter1 introductionSSE_AndyLi
 
Arithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HSArithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HSRoseEdenAbitong2
 
Algorithms - Rocksolid Tour 2013
Algorithms  - Rocksolid Tour 2013Algorithms  - Rocksolid Tour 2013
Algorithms - Rocksolid Tour 2013Gary Short
 

Similar to Quant2a (20)

Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
 
Universal Approximation Theorem
Universal Approximation TheoremUniversal Approximation Theorem
Universal Approximation Theorem
 
2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptx2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptx
 
e.ppt
e.ppte.ppt
e.ppt
 
Introduction to Algorithm
Introduction to AlgorithmIntroduction to Algorithm
Introduction to Algorithm
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
 
Recursion
RecursionRecursion
Recursion
 
Fundamental computing algorithms
Fundamental computing algorithmsFundamental computing algorithms
Fundamental computing algorithms
 
Lecture1
Lecture1Lecture1
Lecture1
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
 
Shor’s algorithm the ppt
Shor’s algorithm the pptShor’s algorithm the ppt
Shor’s algorithm the ppt
 
Introduction to the AKS Primality Test
Introduction to the AKS Primality TestIntroduction to the AKS Primality Test
Introduction to the AKS Primality Test
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
Sorting Algorithm
Sorting AlgorithmSorting Algorithm
Sorting Algorithm
 
1 chapter1 introduction
1 chapter1 introduction1 chapter1 introduction
1 chapter1 introduction
 
Unit vi
Unit viUnit vi
Unit vi
 
Arithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HSArithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HS
 
Algorithms - Rocksolid Tour 2013
Algorithms  - Rocksolid Tour 2013Algorithms  - Rocksolid Tour 2013
Algorithms - Rocksolid Tour 2013
 

More from Natan Katz

AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptxNatan Katz
 
SGLD Berlin ML GROUP
SGLD Berlin ML GROUPSGLD Berlin ML GROUP
SGLD Berlin ML GROUPNatan Katz
 
Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs Natan Katz
 
Foundation of KL Divergence
Foundation of KL DivergenceFoundation of KL Divergence
Foundation of KL DivergenceNatan Katz
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural NetworksNatan Katz
 
Deep VI with_beta_likelihood
Deep VI with_beta_likelihoodDeep VI with_beta_likelihood
Deep VI with_beta_likelihoodNatan Katz
 
NICE Research -Variational inference project
NICE Research -Variational inference projectNICE Research -Variational inference project
NICE Research -Variational inference projectNatan Katz
 
NICE Implementations of Variational Inference
NICE Implementations of Variational Inference NICE Implementations of Variational Inference
NICE Implementations of Variational Inference Natan Katz
 
Reinfrocement Learning
Reinfrocement LearningReinfrocement Learning
Reinfrocement LearningNatan Katz
 
Variational inference
Variational inference  Variational inference
Variational inference Natan Katz
 
GAN for Bayesian Inference objectives
GAN for Bayesian Inference objectivesGAN for Bayesian Inference objectives
GAN for Bayesian Inference objectivesNatan Katz
 

More from Natan Katz (17)

final_v.pptx
final_v.pptxfinal_v.pptx
final_v.pptx
 
AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptx
 
SGLD Berlin ML GROUP
SGLD Berlin ML GROUPSGLD Berlin ML GROUP
SGLD Berlin ML GROUP
 
Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs
 
Cyn meetup
Cyn meetupCyn meetup
Cyn meetup
 
Finalver
FinalverFinalver
Finalver
 
Foundation of KL Divergence
Foundation of KL DivergenceFoundation of KL Divergence
Foundation of KL Divergence
 
Bismark
BismarkBismark
Bismark
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural Networks
 
Deep VI with_beta_likelihood
Deep VI with_beta_likelihoodDeep VI with_beta_likelihood
Deep VI with_beta_likelihood
 
NICE Research -Variational inference project
NICE Research -Variational inference projectNICE Research -Variational inference project
NICE Research -Variational inference project
 
NICE Implementations of Variational Inference
NICE Implementations of Variational Inference NICE Implementations of Variational Inference
NICE Implementations of Variational Inference
 
Ucb
UcbUcb
Ucb
 
Reinfrocement Learning
Reinfrocement LearningReinfrocement Learning
Reinfrocement Learning
 
Neural ODE
Neural ODENeural ODE
Neural ODE
 
Variational inference
Variational inference  Variational inference
Variational inference
 
GAN for Bayesian Inference objectives
GAN for Bayesian Inference objectivesGAN for Bayesian Inference objectives
GAN for Bayesian Inference objectives
 

Recently uploaded

Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxFarihaAbdulRasheed
 
Pests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPirithiRaju
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfWildaNurAmalia2
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naJASISJULIANOELYNV
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsHajira Mahmood
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxJorenAcuavera1
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 

Recently uploaded (20)

Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
 
Pests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdf
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by na
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutions
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptx
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 

Quant2a

  • 2.
  • 3.
  • 4. • 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
  • 5.
  • 6.
  • 8. • 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
  • 9. • Let N a huge integer s.t. • p, q are primes • N= p*q • We wish to find p, q Reformulation of factorization
  • 10. • 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
  • 11. • 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
  • 12. • N=15 • 7^2=49 4(15) • 7^3= 13(15) • 7^4 =1 (15) • 7^8 =1 (15)
  • 13. • 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)
  • 14. • 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?
  • 15. Even Period 𝑎 r 2 ∓ 1 ≡ 0 mod(N) We factorized N !!!
  • 16.
  • 17. 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!
  • 18. 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
  • 19. 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?
  • 20. 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)
  • 21.
  • 23.
  • 25.
  • 26. • We need to ask the oracle twice • Can't solve it faster!! Black box – Classical Case
  • 27. 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?
  • 28. F constant • U maps 0 & 1to the same values so it is not unitary
  • 29.
  • 33.
  • 34.
  • 36. • The left side is the scheme • The right is one of the four functions we may have Remark
  • 37.
  • 38. • If f is constant, get |+> and after Hadamard |0> • If f isn’t constant, get |-> and after Hadamard |1> What do we have?
  • 40. 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)
  • 41. 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 𝐴𝑞
  • 42. Or Tensor (with n qubits )
  • 44.
  • 46.
  • 47. Measuring the second register Now, QFT Shor algorithm
  • 48. • We map a state |a> 0<a<q-1 as follow: |a> → Quantum Fourier Transform (QFT)
  • 49.
  • 52.
  • 53. • 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