## Course AEdit

**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 BEdit

**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)

b)

c)

**3**

a)

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

b)

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)

b)

c)

d) We have:

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

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)

b)

c)

**7**

a)

b)

c)

**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:

Bob then run the cNOT:

This can be factored:

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:

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:

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:

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

Now we get the equation:

For this to match, we have:

(1)

(2)

(3)

(4)

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.