quantum computing cheatsheet.txt 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. tl;dr quantum computer:
  2. Uses quantum phenomena, most notably superposition, entanglement and
  3. interference, to accelerate (get better computational complxity) computations
  4. of specific problems, notably e.g. factoring large numbers (Shor's algorithm,
  5. security concern).
  6. The principle of acceleration is instead of performing computation on a single
  7. input to get single output, we can perform computation an a superposition of
  8. multiple inputs and effectively get them evaluated in parallel (acceleration).
  9. With this we get again a superposition of all possible outputs, each with a
  10. certain probabilty to be measured. When we measure the result, we randomly get
  11. one of these results. Interference can be exploited in the design of quantum
  12. algorithms so that the answers we're not interested in "cancel out" (get zero
  13. probability of being measured) so that we only get a result we're interested
  14. in.
  15. For vectors here we use Dirac (bra-ket) notation: |a> means vector named "a".
  16. qubit:
  17. Quantum bit, physically represented by some physics quantum property, e.g.
  18. spin. When measured, collapses into a result of either 1 or 0 (like bit), but
  19. until measured has a more complex internal state (can hold more than 1 bit of
  20. information). This state can be a superposition ("something between") of 1 and
  21. 0 (implying a probability of either one).
  22. The qubit state is a linear combination of two base vectors |0> = [1 0] and
  23. |1> = [0 1]:
  24. state = a * |0> + b * |1>
  25. Where a and b are complex numbers. |a|^2 gives the probability of measuring
  26. 0, |b|^2 gives the probability of measurinf 1 (so |a|^2 + |b|^2 = 1).
  27. Using complex reasoning we can deduce that the whole qubit state can be
  28. represented as a point on a surface of a 3D sphere (Bloch sphere):
  29. z
  30. ^ |0>
  31. _|_
  32. __/ | \__
  33. _/ | \_
  34. / | /q \
  35. | |/ |
  36. | |-------|------ y
  37. | /| |
  38. \_ / | _/
  39. \_/ | __/
  40. / \_|_/
  41. / |
  42. x v |1>
  43. Above the qubit state q can be represented by two angles: D (pitch) and P
  44. (yaw), and the complex numbers a and b can be computed as:
  45. a = cos(D / 2) (can be chosen to be always real)
  46. b = e^(i*F) * sin(D / 2)
  47. quantum gate:
  48. Basic building block of a quantum circuit (most common quantum computation
  49. model).
  50. The number of input quibits, N, is always equal to the number of output
  51. qubits.