# Qubit, one or two complex numbers?

+ 3 like - 0 dislike
34 views

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?

This post imported from StackExchange Physics at 2014-03-22 16:59 (UCT), posted by SE-user Dänu

+ 5 like - 0 dislike

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.

This post imported from StackExchange Physics at 2014-03-22 16:59 (UCT), posted by SE-user twistor59
answered Jan 2, 2013 by (2,490 points)
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...

This post imported from StackExchange Physics at 2014-03-22 16:59 (UCT), posted by SE-user Dänu
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.

This post imported from StackExchange Physics at 2014-03-22 16:59 (UCT), posted by SE-user twistor59
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.

This post imported from StackExchange Physics at 2014-03-22 16:59 (UCT), posted by SE-user twistor59
@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.

This post imported from StackExchange Physics at 2014-03-22 16:59 (UCT), posted by SE-user Niel de Beaudrap
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.

This post imported from StackExchange Physics at 2014-03-22 16:59 (UCT), posted by SE-user Peter Shor

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$y$\varnothing$icsOverflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.