Computer Science Final Project


Published on

Published in: Devices & Hardware
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Computer Science Final Project

  1. 1. Quantum computing and cryptography
  2. 2. “Quantum computing ranges an endless concept”
  3. 3. Content well see over● Motivation and goals● Introduction to quantum computing● Quantum computing basis● Postulates overview● Shors algorithm● Introduction to quantum cryptography and BB84● BB84 protocol functioning● Example of the protocol● Explanation of BB-84 Web Simulator with a demonstration● Future of the project● Conclusions
  4. 4. Motivation and goals Motivation  Goals ➢ Discover a little bit more ➢ Comprehend the the quantum world principles of quantum computing ➢ Make out how is evolving the quantum computing ➢ Understand its most from a computer powerful algorithm engineer view ➢ Interpret the future cryptography which is based on quantum principles Practical goals ➢ Implementation of Shors algorithm in QCL ➢ Development of a Web simulator based on BB-84 protocol
  5. 5. Origins of quantum computing● In 1980s decade several physicists, such as Paul Benioff and Richard Feynman, proposed the idea of using quantum laws in the field of computation in order to simulate quantum problems (or dilemmas)● Moreover in a few years we will hit natural limits on the size of transistors • Max out on the number of transistors per chip • Reach the minimum size for transistors
  6. 6. What is quantum computing?● Definition: Use of quantum phenomenon to perform computational operations● Operations are done at an atomic level● It allows the encoding of bits as physical states – Direction of spin of an electron – The direction of polarization of a photon – The energy level of an excited atom
  7. 7. What is a qubit?● A qubit is a bit represented by a quantum system is governed by the laws of quantum physics.● So a qubit (an electron, commonly used as a qubit, is always in one of two spin states) can take two distinct values: – State 0 goes with the spin up – State 1 goes with the spin down
  8. 8. Quantum vs. Transistor● In conventional computing, a bit is 0 or 1. Equivalent to switching a light switch on and off.● But under a quantum basis, a qubit is 0 and/or 1.● This superposition of states is what makes quantum computing fundamentally different and so powerful.
  9. 9. Postulates● A set of 4 mathematical postulates describes quantum computing: – State Space – Evolution – Measurement – Composite systems
  10. 10. State Space Postulate● Associated with any isolated physical system is a complex vector space with inner product (a Hilbert space) known as the state space of the system. The physical state of the system is completely described by its state vector, which is a unit vector in the system’s state space.● The simplest quantum mechanical system is the qubit, which has a 2-d state space. With an orthonormal basis {|0⟩,|1⟩} the most general state vector of a qubit can be expressed as |Ψ⟩ = α|0⟩ + β|1⟩, where α,β Є C and IαI²+IβI² = 1.
  11. 11. Evolution Postulate● The evolution of a closed quantum system is described by a unitary transformation. The state vector |Ψ⟩ of a system at time t₁ is related to its state vector |Ψ⟩ at time t₂ by a unitary operator U which depends on t₁, t₂, |Ψ⟩ = U|Ψ⟩.● The Pauli matrices and the Hadamard gate (H) are all 2x2 unitary matrices, and so describe valid qubit transformations.
  12. 12. Measurement Postulate● We cannot know the exact state of a quantum system because measuring implies disrupting.● Regardless of a certain superposition α|0⟩ + β|1⟩, we get |0⟩ with a probability ||α||² or |1⟩ with a probability ||β||² as a result of the measure.● Lets recall the first postulate where IαI²+IβI² = 1, which means the quantum state is unitary (normalized).
  13. 13. System Composition Postulate● The state |Ψ⟩ of a composite system is the tensor product of the quantum sub-systems: U|Ψ⟩⊗U|Ψ⟩ = (U⊗U)(|Ψ⟩⊗|Ψ⟩)● A 2-qubit system example with |Ψ⟩=α|0⟩+β|1⟩ and |Ψ⟩=γ|0⟩+δ|1⟩.
  14. 14. Bloch SphereThe Bloch Sphere is arepresentation of a qubit, thefundamental building block ofquantum computers.The most general statevector of a qubit can beexpressed aswhere θ is the polar angleand φ is the az-imuthal angleof the unit vector in 3-d realvector space.
  15. 15. Important as well...Quantum computing offers:  reversible computing which means we can recover the input data with the output data.  a framework based on quantum gates (similar to the logic gates) in order to design algorithms.  a Quantum Fourier Transform which is much more powerful than the classical Fast Fourier Transform. (Essential maths for factorizing)
  16. 16. Quantum vs. Fast● The inner implementation of the QFT requires profound math concepts and prolonged understanding.● QFT is vital to factorize numbers in Shors algorithm in the same way as FFT in classical computing algorithms.● Factorizing an N-bit number implies a 2^N-bit register on which a Fourier Transform is applied.● Cost analysis: – Classic way → – Quantum way →
  17. 17. Quantum vs. Fast (II)As a sample of quantumcomputing potential, onthe right and bottom areshown the costrepresentations offactorizing an RSA codeof 170 decimal digits (563bits):
  18. 18. Quantum Computer Language● QCL is the most advanced implemented quantum programming language.● Its syntax resembles syntax of the C programming language and classical data types are similar to data types in C.● A quantum programme example: qureg x1[2]; // 2-qubit quantum register x1 qureg x2[2]; // 2-qubit quantum register x2 H(x1); // Hadamard operation on x1 H(x2[1]); // Hadamard operation on the first qubit of the register x1
  19. 19. Quantum Computer Language (II) ● Workbench goes by console.
  20. 20. Shors algorithm (N)I. Pick a random number a < N.II. Compute gcd(a, N) – greatest common divisor.III. If gcd(a, N) ≠ 1, then there is a non-trivial factor of N, so were done.IV. Otherwise, use the period-finding function to find r, the period of the following function: f(x) = a^x mod N.V. If r is odd, go back to step I.VI. If a^(r /2) ≡ −1 (mod N), go back to step I.VII. gcd(a^(r/2) ± 1, N) returns a nontrivial factor of N. We are done. For instance: gcd(4 ± 1, 15) → 3 (factor of N)
  21. 21. Quantum CryptographyAs of this slide, a slight hop in the same quantum world is done, from computing to cryptography.
  22. 22. BB-84 Protocol● History: – Published in 1984 – Charles Bennett and Gilles Brassard● Resources: – Same quantum mechanics postulates – Utility of light particles (photons) – Taking advantage of optical fiber
  23. 23. BB-84 Essential Tips● Each photon represents a bit of information● Alphabet of communication extended: Basis 0 1 + ↑ → x ↘ ↗● Two actors intervene in the protocol: Alice and Bob● A third actor might be a spy
  24. 24. BB-84 Step by Step1. Alice generates a random key2. Alice codifies each bit into a qubit and then sends these over to Bob3. She uses two alphabets to codify the key 0 1 Rectilinear basis 0º → |0⟩ 90º ↑ |1⟩ Diagonal basis 45º ↗ |0⟩+|1⟩ 135º ↘ |0⟩-|1⟩4. Bob chooses randomly the alphabet to measure
  25. 25. BB-84 Step by Step5. Bob resultsSee whether basis coincides or not. In other words, check compatibility.
  26. 26. BB-84 Estimation ErrorTo clarify how much error Bob produces to the global key: Bob chooses qubit basis randomly 50% 50% Wrong Correct Reads qubit state Reads qubit state 50% 50% 100% Wrong Correct Correct It is estimated that 25% of the key is wrong
  27. 27. Example Alices bit 0 1 1 0 1 0 0 1 Alices basis + + x + x x x +Alices polarization ↑ → ↘ ↑ ↘ ↗ ↗ → Bobs basis + x x x + x + +Bobs measurement ↑ ↗ ↘ ↗ → ↗ → → Public discussionShared Secret Key 0 1 0 1
  28. 28. BB-84 Security● If Eve does the same as Bob: Eve knows 75% of the bits Alice sent. Bob knows 75% of the bits Alice sent.● Nonetheless Alice and Bob are able to detect Eve.● Eve causes an error of 25% in Bobs key.
  29. 29. BB-84 Web Simulator● Concept – As BB-84 is quite unknown, its been developed a Web simulator based on its cryptographic idea.● Technology – Ruby on Rails (Back-end) – Twitter Bootstrap (Front-end) – PostgreSQL (Data Base)
  30. 30. Functionalities
  31. 31. Demonstration➔ Simulate a 32-bit key distribution between Alice and Bob ● Addition of a 10% communication error due to the channel physics ● Setting 50% digit proportion by which Eve is going to be detected (when simulating with an spy in the middle of the channel) Lets start
  32. 32. Time Planification Research on Quantum Computing - 200 h Understanding and implementation of Shors algorithm - 100 h Research on Quantum Cryptography - 100 h Learning Ruby on Rails - 100 h Web Simulator development - 100 h Composition of report - 200 h
  33. 33. Future of the project● Detailing the Discrete Fourier Transform (QFT)● Go deeper about the postulates● Implement Deutsch and Grovers algorithms● Explanation of the different technological attempts to build a quantum computer
  34. 34. Conclusions● Long experience on computer science is reflected to the evolution of the research on quantum computing. Many errors havent been made and wont be made again.● Quantum computers wont come true to a few years more. But quantum cryptography has been proved in several countries efficiently, which means that it wont take that long.● Ruby on Rails is an excellent technology to work with. It permits build up consistent web applications in a few time once one knows how it works.