# What are the possible $\beta$ in a qubit state $\frac{e^{i\pi/8}}{\sqrt5}|0\rangle+\beta|1\rangle$?

I'm currently going through Introduction to Classical and Quantum Computing, by Thomas Wong, and I'm struggling with exercise 2.8 (page 86):

Exercise 2.8. A qubit is in the state $$\frac{e^{i\pi/8}}{\sqrt{5}}\left| 0 \right> + \beta\left| 1 \right>$$ What is a possible value of $$\beta$$ ?

The answer given for the exercise at the back of the textbook (page 358) is $$2/\sqrt{5}e^{i\theta}$$. Though, when doing the math I arrived at a slightly different answer:

\begin{align} \left( \frac{e^{i\pi/8}}{\sqrt{5}} \right) \left( \frac{e^{-i\pi/8}}{\sqrt{5}} \right) + \beta^2 &=1\\ \frac{e^0}{5} + \beta^2 &= 1\\ \beta^2&=\frac{4}{5}\\ \beta&=\frac{2}{\sqrt{5}} \end{align}

If my understanding is correct, both answers are correct as their total probablity is equal to 1. What I don't understand is how the author arrives at this different answer, and whether or not it's "more valid" than mine.

## 1 Answer

The exercise asks for a possible value for $$\beta$$, which you've given. So your answer is correct.

The fact that you get an answer different from the textbook comes from your first equation: $$\left(\frac{1}{\sqrt{5}}\mathrm{e}^{\mathrm{i}\frac\pi8}\right) \left(\frac{1}{\sqrt{5}}\mathrm{e}^{-\mathrm{i}\frac\pi8}\right) + \beta^2=1$$ By writing this, you implicitely assume that $$\beta$$ is real, which might not be the case. The most general equation should read: $$\left(\frac{1}{\sqrt{5}}\mathrm{e}^{\mathrm{i}\frac\pi8}\right) \left(\frac{1}{\sqrt{5}}\mathrm{e}^{-\mathrm{i}\frac\pi8}\right) + \|\beta\|^2=1$$ This gives you $$\|\beta\|=\frac{2}{\sqrt{5}}$$. Note that this is the only condition that $$\beta$$ must satisfy in order to be a valid value for the qubit's state. Finally, the states such that their norm is equal to $$\frac{2}{\sqrt{5}}$$ are those that can be written as $$\frac{2}{\sqrt{5}}\mathrm{e}^{\mathrm{i}\theta}$$, for $$\theta\in[0\,;\,2\pi)$$. Note that for $$\theta=0$$, this is the value you found.

• Thank you! That makes sense, appreciate it. Commented Feb 28, 2023 at 15:10