Back to our qubit, our spin-1/2 particle. Now that we know that while it can only be measured to have a spin of +1/2 or -1/2, it may in general be in a superposition of these states when we are not measuring it. We could refer to its state in the following manner.

Let *x*_{1} be the eigenstate corresponding to the spin +1/2 state,
and let *x*_{0} be the eigenstate corresponding to the spin -1/2
state. Let *X* be the total state of our state vector, and let
*w*_{1} and *w*_{0} be the complex numbers that weight the
contribution of the base states to our total state, then in general:

| *X* = *w*_{0}*| *x*_{0} + *w*_{1}*| *x*_{1} (*w*_{0}, *w*_{1})

At this point it should be remembered that *w*_{0} and *w*_{1}, the
weighting factors of the base states are complex numbers, and that
when the state of *X* is measured, we are guaranteed to find it to be
in either the state:

0*| *x*_{0} + *w*_{1}*| *x*_{1} (0, *w*_{1})

or the state

This is analogous to a system you may be more familiar with, a vector
with real weighting factors in the a two dimensional plane. Let the
base states for this two dimensional plane be the unit vectors *x*,
and *y*. In this case we know that the state of any vector *V* can be
described in the following manner:

Our state vector is a unit vector in a Hilbert space, which is similar to vector spaces you may be more familiar with, but it differs in that the lengths of the vectors are complex numbers. It is not necessary from a physics perspective for the state vector to be a unit vector (by which I mean it has a length of 1), but it makes for easier calculations further on, so I will assume from here on out that the state vector has length 1. This assumption does not invalidate any claims about the behavior of the state vector. To see how to convert a state vector of any length to length 1 see appendix A.

With all this in mind we have fully defined the basic building block of our quantum computer, the qubit. It is fundamentally different from our classical bit in that it can exist in any superposition of the 0 and 1 states when it is not being measured. (Barenco, Ekert, Sanpera, Machiavello)