Introduction to Quantum Information

Posted on ,3 min read

Melchior and I are doing a course offered by KAIST on This web notes has solutions to some problems from the course. We’re pretty new to this so the solutions might contain errors. If you do find an error in the solution please write to [email protected].

Week 1

(2) Suppose that a qubit is prepared in state . Then, a measurement is performed in the basis . What is the probability of the outcome +?

(A) The probability of the outcome + can be calculated with the rule , also known as the Born’s rule, where for this particular question, we can see that , , , and .

(3) Suppose that a qubit is prepared in a state . A measurement is performed in the computation basis . Find the expectation value of an observable .

(A) We know that the expectation value of with respect to can be calculated as . Here simplifying and computing would simply make it equal to Therefore the answer would be

(5) For a state , suppose that a phase operation is applied. When a measurement is performed in the basis , find the angle such that the probability of obtaining out is zero.

(A) Wow, this question is really good. The idea is that we’ll need to first apply to , and get a new state, say, , and then solve for the equation , or .

Week 2

In Week 2, I use a bit of the wonderful sympy library for some matrix algebra calculations instead of hand-calculating things.

(2) For a Hadamard gate H and a Pauli matrix Z, compute ZHZ.

>>> import sympy
>>> from sympy.matrices import Matrix
>>> x = 1/sympy.sqrt(2)
>>> H = Matrix([[x, x], [x, - x]])
>>> Z = Z = Matrix([[1, 0], [0, -1]])
>>> Z * H * Z
[ sqrt(2)/2, -sqrt(2)/2],
[-sqrt(2)/2, -sqrt(2)/2]])

As we see, the answer is .

(3) For Pauli matrices X, Y, Z, compute .

>>> from sympy import I, Trace
>>> X = Matrix([[0, 1], [1, 0]])
>>> Y = Matrix([[0, -I], [I, 0]])
>>> Trace(X+Y+Z).simplify()

The answer is .

Several weeks later

We ended up getting a certificate (in my name below because we did it from my Coursera account):

In addition, we’ve come to learn that Scott is doing the course too, but unfortunately we’re not really aware of his progress at the moment.

Future directions