How can I check if the following are possible states of a qubit?

I would like to check if state

$$|\psi\rangle = \cos{\theta}|0\rangle + i \sin{\theta}|1\rangle$$

is properly defined.

But when I calculated $$\langle \psi | \psi \rangle$$ is get $$\cos^2{\theta} - \sin^2{\theta}$$

so I am facing sin and cos.

What is wrong in my calculation?

• I want to make inner product of each state with itself to show the value is 1(valid state) or not. @MartinVesely Jan 15 '20 at 19:26
• Yes right @MartinVesely Jan 15 '20 at 20:24
• I deleted my comments because now I understand. Please find answer below. Jan 15 '20 at 22:24

Standard inner product on space $$\mathbb{C}^{n}$$ is defined as

$$\langle a|b \rangle = \sum_{i=1}^{n} a_{i}b_{i}^{\dagger},$$

where $$b^{\dagger}$$ is complex conjugate (i.e. for $$x \in \mathbb{C}$$: if $$x = x_{re} + ix_{im}$$ then $$x^{\dagger} = x_{re} - ix_{im}$$).

In your case $$a_{1} = \cos(\theta)$$ and $$a_{2} = i\sin(\theta)$$. Since you are interested in product $$\langle a|a \rangle$$, $$a_{1}^{\dagger} = \cos(\theta)$$ because it is a real number and $$a_{2}^\dagger = -i\sin(\theta)$$ you have

$$\langle a|a \rangle = a_{1}a_{1}^{\dagger}+a_{2}a_{2}^{\dagger} = \cos^{2}(\theta) -i^{2}\sin^{2}(\theta) = \cos^2(\theta) + sin^{2}(\theta) = 1$$

Alternatively you can use normalization condition $$|a|^2+|b|^2 = 1$$:

$$|a|^2 = |\cos(\theta)|^2 = \cos^{2}(\theta)$$

and

$$|b|^2 = |i\sin(\theta)|^2 = |i|^2|\sin^{2}(\theta)| = 1^2\cdot \sin^{2}(\theta)$$

And again you have $$\cos^{2}(\theta) + \sin^{2}(\theta) = 1$$.

Overall, your quatum state is properly defined.

You asked "What is wrong in my calculation?"

My guess is that your mistake is in forgetting that $$\langle \psi | = \cos{\theta}\langle 0| - i \sin{\theta}\langle 1|$$ instead of $$\cos{\theta}\langle 0| + i \sin{\theta}\langle 1|$$ (because $$i$$ becomes $$-i$$ when you take the complex conjugate).