Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
up vote 5 down vote accepted

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.

share|cite|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.