Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 19 KB

README.md

File metadata and controls

72 lines (52 loc) · 19 KB

intro-quantum-computing

This repo stores some of the code I wrote while reading through a great quantum computing textbook by Thomas Wong. I ran some of it on quantum computers via the IBM Quantum Platform.

version 4

Topics Covered + Circuit Implementations

Adders

  • Quantum Ripple-Adder

  • Quantum Subtracter

  • QFT Adder

Quantum Error Correction

  • Bit-Flip Code

    • Rotations about the x-axis (bit flip error)
    • Measure first, classical operations later: link
    • Controlled operations in superposition, then collapse: link
  • Phase-Flip Code

    • Rotations about the z-axis (phase flip error -- change in relative phase): link
  • Shor Code

    • Shor encoding with bit-flip error correction: link
    • Shor encoding with phase-flip error correction: link

Quantum Teleportation

  • Transmitting the state of 1 qubit using 2 classical bits: link

Deutsch's Algorithm

  • Finding the parity of two bits with one oracle

Deutsch-Jozsa Algorithm

  • Finding the parity of a string of bits

Bernstein-Vazirani Algorithm

  • Finding the value of a bit string s, dotted into an input bit string

Grover's Algorithm

  • Quantum search / brute force
    • Quirk (4 input qubits with answer w = 1011): link

Quantum Fourier Transform

  • Calculate the discrete Fourier transform quantumly!
    • Quirk (6 qubits): link
    • Quirk (IQFT): link

Phase / Eigenvalue Estimation (circuit on cover of textbook)

  • Quantum gates are unitary, so their eigenvalues are of the form e^(ix), where x is real and is the phase of the eigenvalue
  • Upper part input and output is n-bit eigenvector of matrix U --- eigenstate |v>
  • Lower part output is m-bit binary decimal j that gives x = 2pi * j
    • So we estimate the phase --> eigenvalue with m bits of precision
    • Quirk: link

Finding The Period of a Modular Exponentiation

  • Find the (nontrivial) value of x such that a^x mod m = a^0 mod m = 1 mod m
    • Quirk: (3^x mod 7) link