SlideShare une entreprise Scribd logo
1  sur  30
Cove: A Practical Quantum
 Computer Programming
       Framework

         Matt Purkeypile
  Doctorate of Computer Science
      Dissertation Defense
          June 26, 2009
Outline
• This presentation will cover the following:
  – A brief introduction to quantum computing.
  – Walking through a simple factoring example.
  – Programming quantum computers.
  – Cove: A new solution for programming
    quantum computers.
  – Questions
Quantum Computing
• Existing computers (classical) operate on bits,
  which can hold the value of 0 or 1.
• Quantum computers operate on qubits, which
  can hold the value of 0, 1, or a combination of
  the two.
  – Utilizes probability amplitudes, which means they can
    reinforce or cancel out.
• What known problems can quantum computers
  do better?
  – Factor numbers, which means RSA can be cracked.
     • A simple example will be shown.
  – Simulate quantum systems.
  – Unsorted searches.
Classical and quantum comparison




• The bit is just the poles of a qubit.
• The probabilistic bit is just a line through the
  poles of a qubit.
Mathematically
• General state of an arbitrary qubit:
                                α 0 
           ψ = α 0 0 + α1 1 =  
                                α 1 
                         2      2
                 α 0 + α1 = 1
• α1 and α2 are complex numbers and represent
  probability amplitudes.
   – Hence the total of 1.
   – cos(θ ) 0 + eiϕ sin(θ ) 1 in polar form, not commonly used.
        2            2
• n qubits are described by 2n complex numbers.
• Operations on n qubits are described by a 2n x
  2n matrix of complex numbers.
Limitations of quantum computers
• There are several limitations of quantum
  computers.
  – Although qubits can hold many possible
    values, only one classical result can be
    obtained from every run.
     • Hence the output is probabilistic.
     • Repeated runs may be necessary to obtain the
       desired result.
  – The computation must be reversible.
  – It is impossible to copy qubits (no-cloning
    theorem)
Practical Example: Factoring
• Shor’s algorithm for factoring (1994) is perhaps
  the most famous practical quantum computing
  example.
  – It is exponentially faster than the classical solution.
  – A quantum computer is utilized for only part of the
    algorithm.
     • This means you still have to do classical computation.
• Factoring means you can break codes such as
  RSA.
  – RSA is frequently utilized.
  – If N=pq, it is easy to calculate N when given p and q,
    but very hard to determine p and q when only given
    N.
     • Also known as a one-way function.
High Level View of Factoring




• Except for step 2, the algorithm is carried out classically.
• A probabilistic algorithm: may have to repeat runs until
  the answer is achieved.
Trivial Example
• Goal: Factor 15.
   ●
       Result is 3 and 5.
   ●
       This has been done on quantum computers in the lab.
   ●
       Can be worked out by hand.
• Step 1, let:
   ●
       N = 15 (the number we are factoring)
   ●
       n = number of (qu)bits needed to express N, in this
       case 4.
   ●
       m = 8 (a randomly selected number between 1 and N)
Step 2
• Calculate: f ( x) = m x mod N
   ●
       Need to calculate with enough x’s to find the period.
   ●   x = 0,1, 2,...
   ●
       In general, go to at least N2 values.
        ●
            It seems like guessing would be faster, but isn’t.
   ●
       For this example we’ll just do 0 – 15.
• Given this we can find the period (P).
   ●
       Essentially where f ( x) repeats.
   ●
       In other words f ( x + P ) = f ( x) for every x.
• Performing all these calculations where we need
  only one answer (P) is how we can exploit a
  quantum computer.
Result
f (0) = 80 mod15 = 1
f (1) = 81 mod15 = 8
f (2) = 82 mod15 = 4
f (3) = 83 mod15 = 2
f (4) = 84 mod15 = 1
f (5) = 85 mod15 = 8
f (6) = 86 mod15 = 4
f (7) = 87 mod15 = 2
f (8) = 88 mod15 = 1
f (9) = 89 mod15 = 8
f (10) = 810 mod15 = 4
f (11) = 811 mod15 = 2
f (12) = 812 mod15 = 1
f (13) = 813 mod 15 = 8
f (14) = 814 mod15 = 4
f (15) = 815 mod15 = 2
Can easily see the period
      graphically
Using the period (P)
• The period is 4
  ●
      It repeats 1, 8, 4, 2,…
  ●
      This concludes step 2
• Step 3: is P even?
  ●
      If not we start over using a different randomly
      selected m, however in this case it is even.
• Step 4: Utilize P:
    8 + 1 = 8 + 1 = 65
     4/2      2


    8 − 1 = 8 − 1 = 63
     4/2       2
Check the result
• gcd(65, 15) = 5 and gcd(63, 15) = 3
    ●
        Can be done efficiently on classical computers [1].
• Step 5: we have found the factors 5 and 3.
    ●
        May only obtain one of the factors.
    ●
        Simple to obtain the second factor if not found.
         ●
             Basic algebra: pq=N, we know N and either p or q.
    ●
        Start over with a different m if the gcd of the results
        are 1.

[1] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 1
    ed. Cambridge, UK: Cambridge University Press, 2000.
How does a quantum computer
            help?
• A quantum computer speeds things up by doing step 2
  (finding the period) efficiently.
   ●   Qubits are put in a superposition to represent all possible x’s at
       once (in the first register).
   ●   In the case of factoring 15 we need 12 qubits (2(4) + 4, as we
       need two registers) [2]
• Next f ( x) is performed on the qubits in superposition.
   ●   One calculation on a quantum computer, many more classically.
   ●   The result is put in the second register.
• Measure Register 2- collapses the superpositions.
• The period is then obtained via the Quantum Fourier
  Transform (QFT) followed by a measurement.
• The rest of the algorithm is done classically.
  [2]   N. S. Yanofsky and M. A. Mannucci, Quantum Computing for Computer
  Scientists, 1 ed. New York, NY: Cambridge University Press, 2008.
What is really happening after first
          measurement?

                   f(x) for m=8, N=15 after measurement of 4

       5
       4
       3
f(x)




       2
       1

       0
           1   2     3   4   5   6   7    8   9   10   11   12   13   14   15
                                         x
How about QFT and the second
       measurement?
Scaling
• 15 is a trivial example, how about a 128 bit number?
• We need at least 384 qubits (128 * 3) to do the quantum
  part of the algorithm. (scratch qubits not accounted for)
   ●   The quantum operations that are performed are done once, just
       on more qubits.
   ●   Similar to adding two integers: same technique, more bits.
• If we do it classically we have to calculate f(x) many
  times.
   ●   It isn’t how easy it is to calculate f(x), it is how many times.
   ●   Need to go from 0 to N2 , this is a huge number of calculations
       for a 128 bit number! This could be 2(2*128) or ~1.16 x 1077
   ●   The results have to be stored somewhere (taking up memory)
       and then we still have find the period!
   ●   Or we can just use 384 qubits and run through a set of quantum
       operations once per attempt, so the quantum computer scales
       quite well.
• Likewise, Quantum Fourier Transform also finds the
  period in one operation.
What do you need to program
       quantum computer?
• Fundamentally, there are only three things
  needed to perform quantum computation:
  – Initialization of a register (collection of multiple qubits)
    to a classical value.
  – Manipulation of the register via (reversible)
    operations.
  – Measurement, which “collapses” the system to a
    classical result.
• Hence input and outputs are classical values.
• Like programming classical computers, this is
  harder than it sounds.
Programming Quantum
                    Computers?
• Quantum computers hold immense power, but how do
  you program them?
     – The operate fundamentally different from classical computers, so
       classical techniques don’t work.
• With the exception of one technique [3], all existing
  proposals are new languages.
     – New languages may be able to perform quantum computation,
       but lack power for classical computation.
     – Quantum computing is typically only part of the solution, as in
       factoring.
     – Often geared more towards mathematicians and physicists more
       than programmers.

[3] S. Bettelli, "Towards an architecture for quantum programming," in Mathematics. vol.
    Ph.D. Trento, Italy: University of Trento, 2002, p. 115.
Grover’s algorithm in Bettelli’s:
Deutsch’s algorithm in Tafliovich’s:
A new solution: Cove
• Cove is a framework for programming quantum
  computers.
  – This means classical computation is handled by the
    language it is built on (C#)
  – It designed to be extended by users.
  – Key concept: programming against interfaces, not
    implementations.
• The current work includes a simulated quantum
  computer to execute code.
  – All simulations of quantum computers experience an
    exponential slow down.
Why is Cove a new contribution?
• Provides extensibility not present in Bettelli’s
  solution.
   – Like Bettelli, classical computation is handled by the
     existing language.
• Provides an object oriented approach for
  quantum computing.
• Documentation is as important as the
  framework.
   – Available online, within code, intellisense, and a help
     file.
• Attempts to avoid numerous usability flaws that
  are present in all existing proposals to various
  degrees.
Example: Entanglement
• Measurement of one qubit impacts the state of
  another.
  – This doesn’t happen in a classical computer, bits are
    manipulated independently- no impact on other bits.
Example: Implementation of Sum




     (documentation of method excluded)
Reflections
• Unit testing led to a much more solid design and
  implementation.
   – Forced code to be written that utilized Cove.
   – Takes hours to run tests with just a handful of qubits.
• Implementation of the local simulation was much harder
  than anticipated.
   – Many problems with implementation aren’t documented well:
       • Reordering operations.
       • Expanding operations to match register size.
   – Memory and time constraints limit what can be done.
       • Ran into memory constraints early on.
       • Applying an operation to a 20 qubit register requires 220 + (220)2
         =1,099,512,676,352 complex numbers!
       • Makes debugging difficult.
Areas for future work
• Make the prototype implementation more robust
  and complete.
  – Utilize remote resources?
• Investigation into the expanded QRAM model.
  – Essentially how classical and quantum computers
    interact.
• Provide solutions for other algorithms such as
  Grover’s (unsorted search).
• The number of quantum algorithms is small, so
  that is an area for work as well.
Conclusion
• Quantum computers can carry out tasks
  that can never be done on classical
  computers, no matter how fast or powerful
  they become.
• Existing quantum programming
  techniques suffer from numerous flaws.
• Cove is a new method of programming
  quantum computers that tries to avoid
  flaws of existing techniques.
Questions?

       https://cove.purkeypile.com/

(Source code, documentation, dissertation,
         presentations and more)


           Matt Purkeypile
         mpurkeypile@acm.org

Contenu connexe

Tendances

CS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsCS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Rediet Moges
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Rediet Moges
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.Tariq Khan
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysisDr. Rajdeep Chatterjee
 
Introducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosIntroducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosluzenith_g
 
Algorithm Analyzing
Algorithm AnalyzingAlgorithm Analyzing
Algorithm AnalyzingHaluan Irsad
 
Intro to Sorting + Insertion Sort
Intro to Sorting + Insertion SortIntro to Sorting + Insertion Sort
Intro to Sorting + Insertion SortNicholas Case
 
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...Daniel Hutama
 
Algorithm chapter 2
Algorithm chapter 2Algorithm chapter 2
Algorithm chapter 2chidabdu
 
Shor’s algorithm the ppt
Shor’s algorithm the pptShor’s algorithm the ppt
Shor’s algorithm the pptMrinal Mondal
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Dr. Pankaj Agarwal
 
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...Hector Zenil
 

Tendances (20)

CS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsCS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of Algorithms
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
 
Introducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosIntroducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmos
 
Alg1
Alg1Alg1
Alg1
 
Algorithm Analyzing
Algorithm AnalyzingAlgorithm Analyzing
Algorithm Analyzing
 
Intro to Sorting + Insertion Sort
Intro to Sorting + Insertion SortIntro to Sorting + Insertion Sort
Intro to Sorting + Insertion Sort
 
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
 
Algorithm chapter 2
Algorithm chapter 2Algorithm chapter 2
Algorithm chapter 2
 
Shor’s algorithm the ppt
Shor’s algorithm the pptShor’s algorithm the ppt
Shor’s algorithm the ppt
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
 
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...
 
Np completeness
Np completenessNp completeness
Np completeness
 
Unit 4
Unit 4Unit 4
Unit 4
 
Chap10 slides
Chap10 slidesChap10 slides
Chap10 slides
 

Similaire à Matt Purkeypile's Doctoral Dissertation Defense Slides

Sienna 1 intro
Sienna 1 introSienna 1 intro
Sienna 1 introchidabdu
 
Quantum Computing
Quantum ComputingQuantum Computing
Quantum Computingt0pgun
 
Search and optimization on quantum accelerators - 2019-05-23
Search and optimization on quantum accelerators - 2019-05-23Search and optimization on quantum accelerators - 2019-05-23
Search and optimization on quantum accelerators - 2019-05-23Aritra Sarkar
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit Katiyar
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingNicolo Musmeci
 
Shor's discrete logarithm quantum algorithm for elliptic curves
 Shor's discrete logarithm quantum algorithm for elliptic curves Shor's discrete logarithm quantum algorithm for elliptic curves
Shor's discrete logarithm quantum algorithm for elliptic curvesXequeMateShannon
 
Design & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxDesign & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxJeevaMCSEKIOT
 
BCS APSG Quantum Computing tutorial
BCS APSG Quantum Computing tutorialBCS APSG Quantum Computing tutorial
BCS APSG Quantum Computing tutorialGeoff Sharman
 
Using R in remote computer clusters
Using R in remote computer clustersUsing R in remote computer clusters
Using R in remote computer clustersBurak Himmetoglu
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.pptAbhayGill3
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.pptRaja Shekar
 

Similaire à Matt Purkeypile's Doctoral Dissertation Defense Slides (20)

Quantum Computers
Quantum ComputersQuantum Computers
Quantum Computers
 
Shors'algorithm simplified.pptx
Shors'algorithm simplified.pptxShors'algorithm simplified.pptx
Shors'algorithm simplified.pptx
 
Sienna 1 intro
Sienna 1 introSienna 1 intro
Sienna 1 intro
 
Quantum Computing
Quantum ComputingQuantum Computing
Quantum Computing
 
Search and optimization on quantum accelerators - 2019-05-23
Search and optimization on quantum accelerators - 2019-05-23Search and optimization on quantum accelerators - 2019-05-23
Search and optimization on quantum accelerators - 2019-05-23
 
Notion of Algorithms.pdf
Notion of Algorithms.pdfNotion of Algorithms.pdf
Notion of Algorithms.pdf
 
Quantum computing
Quantum computingQuantum computing
Quantum computing
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
Shor's discrete logarithm quantum algorithm for elliptic curves
 Shor's discrete logarithm quantum algorithm for elliptic curves Shor's discrete logarithm quantum algorithm for elliptic curves
Shor's discrete logarithm quantum algorithm for elliptic curves
 
densematrix.ppt
densematrix.pptdensematrix.ppt
densematrix.ppt
 
Design & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxDesign & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptx
 
BCS APSG Quantum Computing tutorial
BCS APSG Quantum Computing tutorialBCS APSG Quantum Computing tutorial
BCS APSG Quantum Computing tutorial
 
Using R in remote computer clusters
Using R in remote computer clustersUsing R in remote computer clusters
Using R in remote computer clusters
 
Lec1.pptx
Lec1.pptxLec1.pptx
Lec1.pptx
 
Chap8 slides
Chap8 slidesChap8 slides
Chap8 slides
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Matt Purkeypile's Doctoral Dissertation Defense Slides

  • 1. Cove: A Practical Quantum Computer Programming Framework Matt Purkeypile Doctorate of Computer Science Dissertation Defense June 26, 2009
  • 2. Outline • This presentation will cover the following: – A brief introduction to quantum computing. – Walking through a simple factoring example. – Programming quantum computers. – Cove: A new solution for programming quantum computers. – Questions
  • 3. Quantum Computing • Existing computers (classical) operate on bits, which can hold the value of 0 or 1. • Quantum computers operate on qubits, which can hold the value of 0, 1, or a combination of the two. – Utilizes probability amplitudes, which means they can reinforce or cancel out. • What known problems can quantum computers do better? – Factor numbers, which means RSA can be cracked. • A simple example will be shown. – Simulate quantum systems. – Unsorted searches.
  • 4. Classical and quantum comparison • The bit is just the poles of a qubit. • The probabilistic bit is just a line through the poles of a qubit.
  • 5. Mathematically • General state of an arbitrary qubit: α 0  ψ = α 0 0 + α1 1 =   α 1  2 2 α 0 + α1 = 1 • α1 and α2 are complex numbers and represent probability amplitudes. – Hence the total of 1. – cos(θ ) 0 + eiϕ sin(θ ) 1 in polar form, not commonly used. 2 2 • n qubits are described by 2n complex numbers. • Operations on n qubits are described by a 2n x 2n matrix of complex numbers.
  • 6. Limitations of quantum computers • There are several limitations of quantum computers. – Although qubits can hold many possible values, only one classical result can be obtained from every run. • Hence the output is probabilistic. • Repeated runs may be necessary to obtain the desired result. – The computation must be reversible. – It is impossible to copy qubits (no-cloning theorem)
  • 7. Practical Example: Factoring • Shor’s algorithm for factoring (1994) is perhaps the most famous practical quantum computing example. – It is exponentially faster than the classical solution. – A quantum computer is utilized for only part of the algorithm. • This means you still have to do classical computation. • Factoring means you can break codes such as RSA. – RSA is frequently utilized. – If N=pq, it is easy to calculate N when given p and q, but very hard to determine p and q when only given N. • Also known as a one-way function.
  • 8. High Level View of Factoring • Except for step 2, the algorithm is carried out classically. • A probabilistic algorithm: may have to repeat runs until the answer is achieved.
  • 9. Trivial Example • Goal: Factor 15. ● Result is 3 and 5. ● This has been done on quantum computers in the lab. ● Can be worked out by hand. • Step 1, let: ● N = 15 (the number we are factoring) ● n = number of (qu)bits needed to express N, in this case 4. ● m = 8 (a randomly selected number between 1 and N)
  • 10. Step 2 • Calculate: f ( x) = m x mod N ● Need to calculate with enough x’s to find the period. ● x = 0,1, 2,... ● In general, go to at least N2 values. ● It seems like guessing would be faster, but isn’t. ● For this example we’ll just do 0 – 15. • Given this we can find the period (P). ● Essentially where f ( x) repeats. ● In other words f ( x + P ) = f ( x) for every x. • Performing all these calculations where we need only one answer (P) is how we can exploit a quantum computer.
  • 11. Result f (0) = 80 mod15 = 1 f (1) = 81 mod15 = 8 f (2) = 82 mod15 = 4 f (3) = 83 mod15 = 2 f (4) = 84 mod15 = 1 f (5) = 85 mod15 = 8 f (6) = 86 mod15 = 4 f (7) = 87 mod15 = 2 f (8) = 88 mod15 = 1 f (9) = 89 mod15 = 8 f (10) = 810 mod15 = 4 f (11) = 811 mod15 = 2 f (12) = 812 mod15 = 1 f (13) = 813 mod 15 = 8 f (14) = 814 mod15 = 4 f (15) = 815 mod15 = 2
  • 12. Can easily see the period graphically
  • 13. Using the period (P) • The period is 4 ● It repeats 1, 8, 4, 2,… ● This concludes step 2 • Step 3: is P even? ● If not we start over using a different randomly selected m, however in this case it is even. • Step 4: Utilize P: 8 + 1 = 8 + 1 = 65 4/2 2 8 − 1 = 8 − 1 = 63 4/2 2
  • 14. Check the result • gcd(65, 15) = 5 and gcd(63, 15) = 3 ● Can be done efficiently on classical computers [1]. • Step 5: we have found the factors 5 and 3. ● May only obtain one of the factors. ● Simple to obtain the second factor if not found. ● Basic algebra: pq=N, we know N and either p or q. ● Start over with a different m if the gcd of the results are 1. [1] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 1 ed. Cambridge, UK: Cambridge University Press, 2000.
  • 15. How does a quantum computer help? • A quantum computer speeds things up by doing step 2 (finding the period) efficiently. ● Qubits are put in a superposition to represent all possible x’s at once (in the first register). ● In the case of factoring 15 we need 12 qubits (2(4) + 4, as we need two registers) [2] • Next f ( x) is performed on the qubits in superposition. ● One calculation on a quantum computer, many more classically. ● The result is put in the second register. • Measure Register 2- collapses the superpositions. • The period is then obtained via the Quantum Fourier Transform (QFT) followed by a measurement. • The rest of the algorithm is done classically. [2] N. S. Yanofsky and M. A. Mannucci, Quantum Computing for Computer Scientists, 1 ed. New York, NY: Cambridge University Press, 2008.
  • 16. What is really happening after first measurement? f(x) for m=8, N=15 after measurement of 4 5 4 3 f(x) 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 x
  • 17. How about QFT and the second measurement?
  • 18. Scaling • 15 is a trivial example, how about a 128 bit number? • We need at least 384 qubits (128 * 3) to do the quantum part of the algorithm. (scratch qubits not accounted for) ● The quantum operations that are performed are done once, just on more qubits. ● Similar to adding two integers: same technique, more bits. • If we do it classically we have to calculate f(x) many times. ● It isn’t how easy it is to calculate f(x), it is how many times. ● Need to go from 0 to N2 , this is a huge number of calculations for a 128 bit number! This could be 2(2*128) or ~1.16 x 1077 ● The results have to be stored somewhere (taking up memory) and then we still have find the period! ● Or we can just use 384 qubits and run through a set of quantum operations once per attempt, so the quantum computer scales quite well. • Likewise, Quantum Fourier Transform also finds the period in one operation.
  • 19. What do you need to program quantum computer? • Fundamentally, there are only three things needed to perform quantum computation: – Initialization of a register (collection of multiple qubits) to a classical value. – Manipulation of the register via (reversible) operations. – Measurement, which “collapses” the system to a classical result. • Hence input and outputs are classical values. • Like programming classical computers, this is harder than it sounds.
  • 20. Programming Quantum Computers? • Quantum computers hold immense power, but how do you program them? – The operate fundamentally different from classical computers, so classical techniques don’t work. • With the exception of one technique [3], all existing proposals are new languages. – New languages may be able to perform quantum computation, but lack power for classical computation. – Quantum computing is typically only part of the solution, as in factoring. – Often geared more towards mathematicians and physicists more than programmers. [3] S. Bettelli, "Towards an architecture for quantum programming," in Mathematics. vol. Ph.D. Trento, Italy: University of Trento, 2002, p. 115.
  • 21. Grover’s algorithm in Bettelli’s:
  • 22. Deutsch’s algorithm in Tafliovich’s:
  • 23. A new solution: Cove • Cove is a framework for programming quantum computers. – This means classical computation is handled by the language it is built on (C#) – It designed to be extended by users. – Key concept: programming against interfaces, not implementations. • The current work includes a simulated quantum computer to execute code. – All simulations of quantum computers experience an exponential slow down.
  • 24. Why is Cove a new contribution? • Provides extensibility not present in Bettelli’s solution. – Like Bettelli, classical computation is handled by the existing language. • Provides an object oriented approach for quantum computing. • Documentation is as important as the framework. – Available online, within code, intellisense, and a help file. • Attempts to avoid numerous usability flaws that are present in all existing proposals to various degrees.
  • 25. Example: Entanglement • Measurement of one qubit impacts the state of another. – This doesn’t happen in a classical computer, bits are manipulated independently- no impact on other bits.
  • 26. Example: Implementation of Sum (documentation of method excluded)
  • 27. Reflections • Unit testing led to a much more solid design and implementation. – Forced code to be written that utilized Cove. – Takes hours to run tests with just a handful of qubits. • Implementation of the local simulation was much harder than anticipated. – Many problems with implementation aren’t documented well: • Reordering operations. • Expanding operations to match register size. – Memory and time constraints limit what can be done. • Ran into memory constraints early on. • Applying an operation to a 20 qubit register requires 220 + (220)2 =1,099,512,676,352 complex numbers! • Makes debugging difficult.
  • 28. Areas for future work • Make the prototype implementation more robust and complete. – Utilize remote resources? • Investigation into the expanded QRAM model. – Essentially how classical and quantum computers interact. • Provide solutions for other algorithms such as Grover’s (unsorted search). • The number of quantum algorithms is small, so that is an area for work as well.
  • 29. Conclusion • Quantum computers can carry out tasks that can never be done on classical computers, no matter how fast or powerful they become. • Existing quantum programming techniques suffer from numerous flaws. • Cove is a new method of programming quantum computers that tries to avoid flaws of existing techniques.
  • 30. Questions? https://cove.purkeypile.com/ (Source code, documentation, dissertation, presentations and more) Matt Purkeypile mpurkeypile@acm.org