$$Introduction to Quantum Information Posted on Sep 13, 2022 , 3 min read Melchior and I are doing a course offered by KAIST on coursera.org. 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 ∣0⟩. Then, a measurement is performed in the basis ∣±⟩=2​(∣0⟩±∣1⟩)​. What is the probability of the outcome +? (A) The probability of the outcome + can be calculated with the rule P(+)=⟨ψ∣M+​∣ψ⟩, also known as the Born’s rule, where for this particular question, we can see that ∣ψ⟩=∣0⟩, ⟨ψ∣=⟨0∣, ∣+⟩=2​1​∣0⟩+2​1​∣1⟩, and M+​=∣+⟩⟨+∣. P(+)​=⟨ψ∣M+​∣ψ⟩=⟨0∣⋅∣+⟩⋅⟨+∣⋅∣0⟩=[1​0​]⋅[1/2​1/2​​]⋅[1/2​​1/2​​]⋅[10​]=21​​ (3) Suppose that a qubit is prepared in a state ∣+⟩=(∣0⟩+∣1⟩)/2​. A measurement is performed in the computation basis {∣0⟩,∣1⟩}. Find the expectation value of an observable Z=∣0⟩⟨0∣−∣1⟩⟨1∣. (A) We know that the expectation value of Z with respect to ∣+⟩ can be calculated as ⟨Z⟩∣+⟩​=⟨+∣Z∣+⟩. Here simplifying and computing Z=∣0⟩.⟨0∣−∣1⟩.⟨1∣ would simply make it equal to 0. Therefore the answer would be 0. (5) For a state ∣+⟩=(∣0⟩+∣1⟩)/2​, suppose that a phase operation P(ϕ)=∣0⟩⟨0∣+eiϕ∣1⟩⟨1∣ is applied. When a measurement is performed in the basis ∣±⟩=(∣0⟩±∣1⟩)/2​, 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 P(ϕ) to ∣+⟩, and get a new state, say, ∣ψ⟩, and then solve for the equation ⟨ψ∣M+​∣ψ⟩=0, or ⟨ψ∣M−​∣ψ⟩=1. ∣ψ⟩=P(ϕ)⋅∣+⟩⟨ψ∣M−​∣ψ⟩⇒eiϕ⇒ϕ​=2​1​(∣0⟩+eiϕ⋅∣1⟩)=[2​1​2​eiϕ​]⋅[1/2​−1/2​​]⋅[2​1​−2​1​]⋅[1/2​2​eiϕ​​]=1=−1=π​ 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 Matrix([ [ sqrt(2)/2, -sqrt(2)/2], [-sqrt(2)/2, -sqrt(2)/2]]) As we see, the answer is −H. (3) For Pauli matrices X, Y, Z, compute tr[X+Y+Z]. >>> from sympy import I, Trace >>> X = Matrix([[0, 1], [1, 0]]) >>> Y = Matrix([[0, -I], [I, 0]]) >>> Trace(X+Y+Z).simplify() 0 The answer is 0. 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 Readings: https://www.amazon.de/-/en/Michael-Nielsen/dp/1107002176 https://dl.acm.org/doi/pdf/10.1145/3517340 https://arxiv.org/pdf/quant-ph/0005003.pdf https://quantumai.google/cirq https://quantum-computing.ibm.com/$$