Homework 2



Important: Write Name and Unity ID on every submission file. Name the submission file correctly as asked for.

  1. (20 points) Let's create a multiple gate circuit using D-Wave Ocean. We will use NOR gates for this. In this case, we want the output of one of the NOR gates to be one of the inputs for the next NOR gate, whose output will be an input for the next NOR gate, and so on.

    Turn in files doubleor.xlsm, doubleor-impl.py, doubleor-expl.py

  2. (40 points) Create a chain of 5 NOR gates - creating an XOR gate as shown in This Wikipedia page. You'll need to connect the output of one NOR gate with the input of another.

    Turn in file xor.py

  3. (15 points, 3 points each) There are several types of products used in quantum computing math. Show the result of each product below. The answer will either be a scalar, a vector, or a matrix. Do not use bra-ket notation in your answers.

    Submit your answers as \(\textbf{hw2math.pdf}\).

    Note: If you are a LaTeX/Overleaf user, the \(\textbf{braket}\) package defines \(\verb#\bra{}#, \verb#\ket{}#\), and \(\verb#\braket{}#\) macros. You should also check out the \(\textbf{qcircuit}\) package for drawing quantum circuits.

  4. (10 points) Create the NOR gate in Quirk with inputs a and b and output c.
    Hints:

    Turn in file nor.txt.

  5. (15 points) Combine five of those NORs to create an XOR in Quirk, similar to question 2, with inputs a and b, output c, and several ancilla bits. Make sure to label inputs/outputs.

    Turn in file xor.txt.