# How to calculate the state given by two qubits?

Let's say two qubits are both in $|+\rangle$ state. We need to find $a_1$, $a_2$, $a_3$, and $a_4$ in $|\phi\rangle = a_1|00\rangle + a_2|01\rangle + a_3|10\rangle + a_4|11\rangle$, how do we find these amplitudes? How do we do it in general case, when each of the qubits are not necessarily in $|+\rangle$ state, but in some $|?\rangle$ state?

Start by writing out what the $|+\rangle$ state actually is: $$|+\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$$ So, two qubits in the state $|+\rangle$ are in the state $$|+\rangle|+\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)\otimes \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$$ You then need to expand this out, making use of the distributivity of the tensor product, and match up with the specified form of $|\phi\rangle$. Since this sounds a bit like a homework problem, I'm not going to do that for you explicitly. (If you've tried something and got stuck, show us what you tried!)
The general case is absolutely equivalent, you just replace $|+\rangle|+\rangle$ with something like $$(b_0|0\rangle+b_1|1\rangle)\otimes (b_2|0\rangle+b_3|1\rangle)$$
• @ArchilZhvania $|\frac{1}{2}|^2+|\frac{1}{2}|^2+|\frac{1}{2}|^2+|\frac{1}{2}|^2=1$. – Sanchayan Dutta Jun 8 '18 at 10:35
• Does the generalization question want $\mid ? \rangle \mid ? \rangle$ with the same ? so $b_2=b_0$ and $b_3=b_1$? – AHusain Jun 9 '18 at 0:18