Alice and Bob share a state a|++>+b|−−>, where the first qubit is Alice's and the second qubit is Bob's. Alice measures her qubit in the standard basis and sends the measurement outcome to Bob. If Bob wants his qubit to end up in the state a|0>+b|1>, what gates does he apply to his qubit in the following two cases? Write your answer in terms of X,Z,H,I using comma as a delimiter. (For example, you may write X if the answer is a single gate X, or you can write H,X,Z if the answer is to apply H first, and then X, and then Z.)

a) When Alice's outcome was 0

b) When Alice's outcome was 1

Thank you if you help.

a) H

I NEED HELP

I,H

X,H

wrong

H
X,H

H and

H,Z work as well

¿why H for 0 and X, H for 1?

To determine what gates Bob needs to apply to his qubit in each case, let's analyze the given state and the desired state.

The initial state shared by Alice and Bob is a|++> + b|-->. Here, |+> represents the eigenstate of the X-basis (also known as the computational basis) with a value of 0, and |-> represents the eigenstate of the X-basis with a value of 1. So, we can rewrite the initial state as a(|0> + |1>) + b(|0> - |1>).

Now let's consider the desired state: a|0> + b|1>. We can rewrite this state as a|0> + b(Pauli-X gate applied to |0>) = a|0> + b|1>.

By comparing the initial state and the desired state, we can find the transformation required to go from one to the other in each case.

a) When Alice's outcome was 0:
In this case, Alice measured her qubit in the standard basis and got an outcome of 0. This means that Alice's qubit collapses into the state |0>. To achieve the desired state a|0> + b|1>, Bob's qubit should remain unchanged because the coefficient of |0> is already 'a'. Thus, Bob doesn't need to apply any gates. The answer is I (the identity gate).

b) When Alice's outcome was 1:
In this case, Alice measured her qubit in the standard basis and got an outcome of 1. This means that Alice's qubit collapses into the state |1>. To achieve the desired state a|0> + b|1>, Bob's qubit needs to undergo a change. Since the coefficient of |1> in the initial state is 'b', Bob should apply an X gate (Pauli-X gate) to flip the state |1> to |0>. The answer is X.

Therefore, the answers to the two cases are:
a) No gate needed: I
b) Apply an X gate: X