What is a qubit? - RPIQuantumComputing/QuantumCircuits GitHub Wiki
What is a qubit?
A classical bit can have a value of 0 or 1. An analogy in quantum computing is called the qubit. If you a physics background, a qubit is just a spin-1/2 particle with 0 indicating a $\ket{+z}$ measurement amplitude and 1 indicating a $\ket{-z}$ measurement amplitude. If you do not have a physics background, please do not let the last sentence scare you. Everything will be explained.
Just like a normal bit, qubits have a 0 and 1 state, notationally represented by $\ket{0}$ and $\ket{1}$ for reasons to be explained later. Unlike a normal bit, qubits can also be in superposition state. Mathematically, a superposition is just a weighted sum and, well, that is also what it means here. In this case, the weighted sum is of the 0 and 1 state. Thus, a qubit's superposition state is presentable in the following form: $\ket{\psi} = \alpha\ket{0} + \beta\ket{1}$. Now, according to something called the Born rule, the probability of measuring $\ket{0}$ is the inner product of the qubit's state with the $\ket{0}$ state squared. The same holds for any state, including $\ket{1}$. Note, one can think of an inner product as defining how "close" our state is to our desired basis state. So, the probability of $\ket{0}$ is $|\bra{0}\ket{\psi}|^2 = |\bra{0}(\alpha\ket{0} + \beta\ket{1})|^2 = |\bra{0}\ket{0}\alpha + \bra{0}\ket{1}\beta|^2 = |0 + \beta|^2 = |\beta|^2$. Noting that $\ket{0}$ or $\ket{1}$ is observed exclusively, i.e. the state are orthogonal, makes $\bra{0}\ket{1} = 0, \bra{1}\ket{0} = 0$.
Now, that was a lot of math, but it allows us to find the probability of $\ket{0}$! $|\bra{0}\ket{\psi}|^2 = |\bra{0}(\alpha\ket{0} + \beta\ket{1}|^2 = |\alpha|^2 = \alpha^2$. Doing the same for $\ket{1}$ gives us $\alpha^2 + \beta^2 = 1$, as either the $\ket{0}$ or $\ket{1}$ state must be observed, i.e. the probabilities sum to one. Mathematically, the fact that we don't care about the $\alpha$ or $\beta$ directly, just their square magnitude being a real value, means we can represent it as a complex number, $a + bi$ or $ae^{i\phi}$. You may argue that I just handwaved the fact that we allow $\alpha$ and $\beta$ being complex unnecessarily and you would be correct. The real reason is, well, complex numbers are just plain necessary to explain what we see to describe the physical effect of interference in quantum mechanics. However, that is inmaterial to understanding quantum computing from a mathematical perspective. (And, honeslty, the only way we are going to understand quantum computing IS mathmatically)
We have worked up to presenting the full mathematical description of a qubit: $\ket{\psi} = \alpha e^{i\phi} \ket{0} + \beta e^{i\theta} \ket{1}$. Noting that one can factor out $e^{i\phi}$ because, well, we are taking the square magntiude and, if we can factor it out and the factored term has unit mangitude, it cannot possible effect the probability of anything, what we physically observed. Thus, $\ket{\psi} = \alpha \ket{0} + \beta e^{i\theta} \ket{1}$, when redefining $\theta = \theta - \phi$, with $\alpha^2 + \beta^2 = 1$. Such a state is called the normalize statevector. Why do we call it a statevector? Well, anyone with some Linear Algbera under their belt, probably noticed that $\ket{0}$ and $\ket{1}$ sound awful much alike to basis vectors. And, it is indeed true, $\ket{\psi}$ is a vector and this vector described our qubit's "state," its description.
As you can tell, quantum mechanics is hard not due to the math but due to the fact that we are doing linear algebra without it looking like linear algebra (using something called the bra-ket notation with a bra being $\bra{\psi}$ and a ket being $\ket{\psi}$), we have to just accept we need complex numbers and need to take the ampltitude squared to get probability, and because we throw in many new terms that, if you don't have the math background, sounds complex and scary.
If you are shaky on the math, which I am sure you are, please see our Wiki pages on the required linear algebra. But, I implore you to pursist through the vocab and math, what lies ahead is truely weird and beautiful, at least in my opinion.