Homework 2


Due on September 26, 2018 at midnight.


Important: Make one submission per group. Write Names and Unity IDs on every submission file of all group members. Name the submission files correctly as asked for.

  1. (20 points) Let's create the 1-bit full adder in QMI.

    Turn in file fadd.bash, fadd.q, fadd.e

  2. (20 points) Combine the half and full adders to create a 2-bit adder QUBO.

    Turn in file add2.bash, add2.q, add2.e

  3. (10 points) Let's create the 1-bit full adder from slide 41 on Quirk with inputs c0, a0, b0 and outputs s0 and c1.
    Hints:

    Turn in file adder.txt

  4. (15 points) Combine two adders to create a 2-bit adder in Quirk with inputs c0, a0, a1, b0, b1 and outputs s0, s1, and c2. Make sure to label inputs/outputs.

    Turn in file doubleadder.txt

  5. (15 points) Create a Toffoli gate in Quirk from basic gates by modifying this solution. We now try construct Toffoli variation. Start with the given circuit but substitute gates as follows:

    Turn in file toffoli2.txt

  6. (20 points) Test drive the IBM Quantum Experience and create a Toffoli equivalent circuit.
    Hints:

    Turn in file toffoli.pdf, toffoli.qasm and toffoli.txt.