Answers

Course A
1 a) Two. b) 0 and 1. Sometimes other values are used, such as -1 and 1. c) Yes. One way is to map the bit value 0 to a non-powered wire, and 1 to a powered wires. Note that wires can have various levels of power, so anything other then no power is 1.

In (c), you get half a point for saying yes, and half a point for pointing out powered and not powered can be used as a bit.

2 a) (50,50) b) |0> would be (100,0) and |1> would be (0,100) c) The process is measuring. Measuring the qubit will turn it into |0> or |1>. Which one it actually becomes depends on those probabilities.

3

a) The XOR gate.

b) Because it is a NOT gate attached to two control gates, in the same way the cNOT is a NOT gate attached to one control gate.

4

a) OR(0,0) = 0, otherwise it's 1 b) XNOR(0,0) = 1 XNOR(0,1) = 0 XNOR(1,0) = 0 XNOR(1,1) = 1

0,5 points for each correct value, and a bonus 0,5 for having all four right. This goes for both (a) and (b).

c)

X|1> = |0>

d)

X|v> = X(a|0> + b|1>) = a(X|0>) + b(X|1>) = a|1> + b|0>

We can re-arrange this to get the |0> and |1> in the proper order.

X|v> = b|0> + a|1>

e) The quantum NOT-gate will not only change the basis states, i.e. |0> to |1> and vice versa, it will invert all possible states (a,b) to (b,a). For example, if we had a chance of 20% for |0> and 80% for |1>, if we NOT the qubit, we will get an 80% chance of |0> and 20% chance of |1>. One could think of the regular NOT gate as a version of the quantum NOT gate that is only allowed to act on two probabilities (100,0) and (0,100), instead of the full range.

5 a) It interacts with the particle without affecting its state.

b) Anything that works gives a point. Sending a redstone signal along with a particle, or using an "announcer particle" is two possibilities.

6 a) Nothing. What comes in comes out. b) Qubit 0 would remain |0>, and qubit 1 would be |1>. The control bit is |0> so nothing happens. c) Qubit 0 would remain |1>, but qubit 1 would be inverted and also be |1> Half a point for getting qubit 0 right, and half a point for getting qubit 1 right. This goes for both (b) and (c)

7 a) Entangled. They are in an entangled state. b) No. Passing two non-entangled qubits through a cNOT does not make them entangled.

8 Particle. Any specific particle, photon, electron etc. is good enough.

Course B
Test 1

1

a) a = sqrt(0.2) and b = sqrt(0.8), for example. As long as the square of the absolute values of 'a' and 'b' are 0.2 and 0.8 respectively, it's a correct answer.

b) Yes. Any pair of complex numbers (z,w) is possible, so long as |z| = sqrt(0.2) and |w| = sqrt(0,8).

The normalization constraint does not impose any restriction on the arguments of the numbers, only their absolute values.

c) The normalization constraint ensures that for a qubit, the probabilities for measuring |0> or |1> adds up to 100%. We always get |0> or |1> - there is no third alternative.

The point is for saying it makes probabilities add up to 100%.

2

a)

$$|+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt 2}$$

$$|-\rangle = \frac{|0\rangle - |1\rangle}{\sqrt 2}$$

b)

$$|+\rangle = \frac{|+\rangle + |-\rangle}{\sqrt 2} = |0>$$

c)

$$|+\rangle = \frac{|+\rangle - |-\rangle}{\sqrt 2} = |1>$$

3

a)

$$ \left[\begin{matrix} 1\\ 0 \end{matrix}\right], \left[\begin{matrix} 0\\ 1 \end{matrix}\right] $$
 * 0\rangle =
 * 1\rangle =

$$ Y|0\rangle = \left[\begin{matrix} 0 & -i\\ i & 0 \end{matrix}\right] \left[\begin{matrix} 1\\ 0 \end{matrix}\right] = \left[\begin{matrix} i\\ 0 \end{matrix}\right] = i \left[\begin{matrix} 1\\ 0 \end{matrix}\right] $$

$$ Y|0\rangle = \left[\begin{matrix} 0 & -i\\ i & 0 \end{matrix}\right] \left[\begin{matrix} 0\\ 1 \end{matrix}\right] = \left[\begin{matrix} 0\\ -i \end{matrix}\right] = -i \left[\begin{matrix} 0\\ 1 \end{matrix}\right] $$

$$ Y(\alpha|0\rangle + \beta|1\rangle) = \left[\begin{matrix} 0 & -i\\ i & 0 \end{matrix}\right] \left[\begin{matrix} \alpha\\ \beta \end{matrix}\right] = i \left[\begin{matrix} \alpha\\ -\beta \end{matrix}\right] $$

Factoring scalar multiples out of vectors and matrices is not only proper style, but also helps when converting to ket form.

b)

$$ Y|0\rangle = i \left[\begin{matrix} 1\\ 0 \end{matrix}\right] = i|0\rangle $$

$$ Y|1\rangle = -i \left[\begin{matrix} 0\\ 1 \end{matrix}\right] = -i|1\rangle $$

$$ Y(\alpha|0\rangle + \beta|1\rangle) = i \left[\begin{matrix} \alpha\\ -\beta \end{matrix}\right] = i(\alpha|0\rangle - \beta|1\rangle) $$

c) |0>

4

XX = I. If M is any matrix, the only way to get |0> = MM|0> is of course if MM = I. This holds for X.

5

a) $$X|+\rangle = |+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt 2}$$

b) $$Z|-\rangle = |+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt 2}$$

c) $$H|-\rangle = \frac{H|0\rangle - H|1\rangle}{\sqrt 2} = \frac{1}{2}(|0\rangle + |1\rangle - (|0\rangle - |1\rangle)) = \frac{1}{2}(|0\rangle + |1\rangle - |0\rangle + |1\rangle) = |1\rangle$$

d) We have:

$$\left(\frac{(X + Z)}{\sqrt 2}\right)\left(\frac{(X + Z)}{\sqrt 2}\right) = I$$

$$\frac{1}{2}(XX + XZ + ZX + ZZ) = I$$

We know XX = I and ZZ = I, so:

$$I + XZ + ZX + I = 2I$$

$$XZ = -ZX $$

e) It is said that XZ and ZX anti-commute. If they commuted, it would have been XZ = ZX. Neither of these relations holds generally for matrices. Matrix multiplication is non-commutative.

6

a)

$$|1\rangle|+\rangle = |1\rangle\frac{|0\rangle + |1\rangle}{\sqrt 2} = \frac{|10\rangle + |11\rangle}{\sqrt 2}$$

b)

$$|-\rangle|0\rangle = \frac{|0\rangle - |1\rangle}{\sqrt 2}|0\rangle = \frac{|00\rangle + |10\rangle}{\sqrt 2}$$

c)

$$|+\rangle|+\rangle = \left(\frac{|0\rangle + |1\rangle}{\sqrt 2}\right)\left(\frac{|0\rangle + |1\rangle}{\sqrt 2}\right) = \frac{1}{2}(|00\rangle + |01\rangle + |10\rangle + |11\rangle)$$

7

a)

$$|0\rangle|+\rangle|1\rangle = |0\rangle\left(\frac{|0\rangle + |1\rangle}{\sqrt 2}\right)|1\rangle = \frac{|001\rangle + |011\rangle}{\sqrt 2}$$

b)

$$|10\rangle|-\rangle = |10\rangle\left(\frac{|0\rangle - |1\rangle}{\sqrt 2}\right)|1\rangle = \frac{|100\rangle + |101\rangle}{\sqrt 2}$$

c)

$$|-\rangle|-\rangle|-\rangle = \left(\frac{|0\rangle - |1\rangle}{\sqrt 2}\right)\left(\frac{|0\rangle - |1\rangle}{\sqrt 2}\right)\left(\frac{|0\rangle - |1\rangle}{\sqrt 2}\right) = $$

$$\left(\frac{|0\rangle - |1\rangle}{\sqrt 2}\right)\left(\frac{|00\rangle - |01\rangle + |10\rangle + |11\rangle}{2}\right) = $$

$$\frac{1}{2\sqrt 2}(|000\rangle - |001\rangle - |010\rangle + |011\rangle - |100\rangle + |101\rangle + |110\rangle - |111\rangle)$$

8

a) (X|1>)|0> = |0>|0> = |00>

b) |1>(X|0>) = |1>|1> = |11>

c) (X|1>)(X|0>) = |0>|1> = |01>

d) cNOT|01> = |01>

e) cNOT((X|1>)|1>) = cNOT|01> = |01>

f) cNOT (-|11>) = -cNOT|11> = -|10>

g) cNOT (cNOT |10>) = cNOT|11> = |10>

Test 2

1

a) yes b) no c) no d) yes e) no f) yes

2

a) See the super dense coding math. The point is for getting the final state right.

b) With the bell state, Alice applies an X locally to the first qubit:

$$\frac{(X|0>)|0> + X(|1>)|1>}{\sqrt 2} = \frac{|10> + |01>}{\sqrt 2}$$

Bob then run the cNOT:

$$cNOT\frac{|10> + |01>}{\sqrt 2} = \frac{cNOT|10> + cNOT|01>}{\sqrt 2} = \frac{|11> + |01>}{\sqrt 2}$$

This can be factored:

$$\frac{|11> + |01>}{\sqrt 2} = \frac{|1> + |0>}{\sqrt 2}|1> = (H|0>)|1>$$

The last local hadamard gives us the state: |01>

Since Z gives |10>, no gates give |00> and both gates |11>, we can use this to set four possible states, as has been pointed out.

3

Using the recipe here.

a)

(1) N = 2

(2) k = 1

(3) |01> is the only term with |0> in the first place. Its probability is 0.5.

(4) The post state is |01>.

b)

(1) N = 2

(2) k = 1

(3) |11> is the only term with |1> in the first place. Its probability is 0.5.

(4) The post state is |11>.

c)

(1) N = 2

(2) k = 2

(3) No state has |0> in second place. This cannot happen.

(4) -

d)

(1) N = 2

(2) k = 2

(3) Both states has |1> in second place. The chance of qubit 2 being |1> is 100%

(4) The state does not change. The post state is the pre-state.

e) No

4

Using the recipe here too.

a)

(1) N = 2 (Notice there are three terms, but only two qubits.)

(2) k = 1

(3) Only the term |00> has |0> in first place. The chance for this is 0.333...

(4) The post state is |00>.

b)

(1) N = 2

(2) k = 1

(3) The chance is the opposite of that for |00>, so 0.6666...

(4) The post state is:

$$\frac{-|10\rangle + |11\rangle}{\sqrt 2}$$

c)

(1) N = 2

(2) k = 2

(3) The |00> and |10> both have |0> in the second place. The chances for this happening is 0.66666...

(4) The post state is:

$$\frac{|00\rangle - |10\rangle}{\sqrt 2}$$

d)

(1) N = 2

(2) k = 2

(3) The only term with |1> in the second place is |11>. The chances for this is opposit to |0>, so 0.3333..

(4) The post state is |11>.

e) Yes it is.

If we measure qubit 1 in the state |0>, the only matching combined state is |00>. This means the only state qubit 2 can assume after measuring is |0>. This means it's tied to the measurement result of qubit 1.

We can also do it using algebra. Lets say it is a product state. That would mean two qubits can be combined to create this state. We get an equation:

$$(\alpha|0\rangle + \beta|1\rangle)(\gamma|0\rangle + \delta|1\rangle) = |\psi\rangle = \frac{|00\rangle - |10\rangle + |11\rangle}{\sqrt 3}$$

If we multiply the parenthesis away on the left side, we get this:

$$(\alpha|0\rangle + \beta|1\rangle)(\gamma|0\rangle + \delta|1\rangle) = \alpha\gamma|00\rangle + \alpha\delta|01\rangle + \beta\gamma|10\rangle + \beta\delta|11\rangle$$

Now we get the equation:

$$\alpha\gamma|00\rangle + \alpha\delta|01\rangle + \beta\gamma|10\rangle + \beta\delta|11\rangle = |\psi\rangle = \frac{|00\rangle - |10\rangle + |11\rangle}{\sqrt 3}$$

For this to match, we have:

(1) $$\alpha\gamma = \frac{1}{\sqrt 3}$$

(2) $$\alpha\delta = 0$$

(3) $$\beta\gamma = -\frac{1}{\sqrt 3}$$

(4) $$\beta\delta = \frac{1}{\sqrt 3}$$

Equation 2 means either alpha or delta is 0. Or both. Lets say alpha is zero, then equation (1) fails. If delta is 0, equation (4) fails, so this product cannot exist.

You can also check this using matrices and tensor products, and we will get to that in course C.