# Qubit, one or two complex numbers?

I'm currently reading up on quantum computing and it seems like I have found some contradiction about how to represent qubits.

It is often stated that a qubit is represented as $a|0\rangle + b|1\rangle = (a, b)$ with both a and b being complex numbers.

However, it is stated just as often, that there is only one complex number needed, namely b, since to ignore the global phase shift means, that a becomes real while b stays complex. See for example: this and this.

What is it now? What don't I get here?

In the representation $|\psi\rangle = a|0\rangle + b|1\rangle$ we must have $|a|^2+|b|^2=1$, so that gives us one constraint. The second is that an overall global phase doesn't make any difference. We can use these two freedoms to chose $a$ and $b$ in a specific way. Traditionally we choose them such that $$|\psi\rangle = \cos \theta|0\rangle+\exp(i\phi)\sin \theta|1\rangle$$

See this wiki article on the Bloch sphere for details.

• In all quantum computing simulations I've seen up to now, there are two complex numbers / data types used to simulate a qubit. Why would someone do this? It is quite an overhead, considering that one of the variables doesn't make any sense... – Dänu Jan 2 '13 at 18:59
• I'm not familiar with the way people simulate qubits. All I can say is that to characterize the quantum mechanical system which is the embodiment of a qubit (say a spin 1/2 particle), all you need is the reduced representation. Maybe someone who's intimately involved with these simulations will provide an answer that could enlighten us as to why they do it like that. – twistor59 Jan 2 '13 at 19:03
• Ah wait...the article I linked explains that if you want to represent mixed states, you're effectively moving inside the Bloch sphere (i.e not restricted to the surface). This would give a reason why it would be convenient to use two complex types in a simulation. – twistor59 Jan 2 '13 at 19:08
• @Dänu: there is more than one way to represent a qubit. Some of the representations involve more redundant information than others, which may obfuscate similarities between states but which makes it easier to compose transformations. Twistor59's answer here accurately describes the minimal representation for pure states, and is fairly standard. The other, involving two complex numbers, extends more easily to performing linear transformations describing the evolution of states. It's not really an enormous amount of overhead in the big scheme of things. – Niel de Beaudrap Jan 2 '13 at 20:12
• To simulate one qubit, you only need one complex number. But to simulate 10 qubits, you need 1023 complex numbers (because of entanglement). Most programs use 1024, since the fact that programming is easier if you have redundancy more than makes up for the fact that you need two extra memory slots. – Peter Shor Jan 2 '13 at 22:43

You are spot on. Ignoring the global phase does mean that $a$ is real while $b$ remains complex. As explained in the post above $\uparrow$. This forces the qubit to be confined to the Bloch sphere (AKA the 2-sphere). However the general description of the qubit is not the 2-sphere, it is the 3-sphere.

When the global phase is included (as it should be) the qubit is a 2-dimensional complex number $|\psi\rangle\in\mathbb{C}^2$. This means the qubit is isomorphic to vectors in $\mathbb{R}^4$. When the complex coefficients have a unit norm, as $|a|^2+|b|^2=1$, the qubit describes a vector in $\mathbb{R}^4$ extending to a point on the surface of the 3-sphere.