# How to physically prepare a qubit in a certain state?

I earlier asked the question about definition of a qubit. From it I understood that its the experimental setup that actually defines the qubit. But I don't get it's physical realization. How a qubit $|\psi \rangle =\alpha |0\rangle + \beta|1\rangle$ is prepared with $\alpha, \beta$ being complex numbers ? Mathematically I understand but due to the lack of physical realization I have many fundamental doubts. For example if $|\alpha|^2 > \frac{1}{2}$ I have some partial information that if the qubit is measured in the basis $\{|0\rangle ,|1\rangle \}$ , I have some biased opinion that the state after measurement should be $|0\rangle$. I don't get the fact that there is not complete randomness ( in terms of the state after measurement ) as I have some biased opinion ( as $|\alpha|^2 \ne \frac{1}{2}$ ). In layman terms I understand that if I try get any information about the state of the qubit, I change its state. Then why do I have this biased opinion towards the state after measurement being $|0\rangle$, isn't this some kind of partial information about the qubit.

I myself was confused about how to put forward the question, so if the question is vague, I can improve it.

• There seem to be two unrelated questions here. Are you asking how to prepare a qubit state? Or are you asking why it is possible for the measurement outcomes to have other than 50-50 probabilities? May 6, 2015 at 21:51
• @MarkMitchison my question is why it has to be other than 50-50. I thought the answer might lie in how a qubit is prepared. May 6, 2015 at 22:05

If you want to experimentally create a qubit, you need some actualization. One example is the z-component of the spin of a spin-1/2 particle such as an electron.

There are two independent states which can be denoted $\left(\matrix{ 1 \\ 0}\right)$ and $\left(\matrix{ 0 \\ 1}\right)$ and each of which can be produced by orienting a stern-gerlach device in the z-direction and then some come out the left side, and some come out the right side, and they are reliably produced, so without loss of generality let's say the left side produces $\left(\matrix{ 1 \\ 0}\right)$. So they basically produce states that look like $\left(\matrix{ 1 \\ 0}\right)$ and $\left(\matrix{ 0 \\ 1}\right)$ and by throwing away half your electrons you can reliably make the state $\left(\matrix{ 1 \\ 0}\right)$ or make the state $\left(\matrix{ 0 \\ 1}\right)$ by just putting your collection device on the left (or right) side of the stern-gerlach device. And you can make a stern-gerlach device by making a small region with an inhomogeneous magnetic field oriented (say by shaping some magnetizable metal and magnetizing it to make a permanent magnet) in a fixed direction and sending a beam of electron in to get deflected.

So we could make $\left(\matrix{ 1 \\ 0}\right)$ or we can make $\left(\matrix{ 0 \\ 1}\right)$ (and if we had a spin incoherent source we'd have fifty percent losses). We can do it 100% of the time if we take the wrong branch and apply an operation to flip it. Since flipping is over to the exact opposite spin is also something we can do. You just need to only flip the wrong ones because if you flip them all then the right ones will become wrong.

So if we for sure want $\left(\matrix{ 1 \\ 0}\right)$ we can take the ones deflected right and flip them, and take the ones that went left and not flip them. So either way we end up with something like $\left(\matrix{ 1 \\ 0}\right)$. So that's how to produce that state.

OK. But what if we want to make other states? Well, if we orient the stern-gerlach in some other direction (literally grab it with a clamp and use the clamp to rotate it so that the whole device now points in a different direction) we can make other states. So pick a direction, with a unit vector $\hat r = (x,y,z)$ all the $x,y,$ and $z$ are real numbers and where the hat just means that $x^2+y^2+z^2=1$.

Then the results of the stern-gerlach device are the eigenvectors of $\left(\matrix{ z & x-iy\\ x+iy &-z}\right)$. The eigenvalues are $\pm 1$, so let's find the eigenvectors. If $z^2=1$ then the eigenvectors are $\left(\matrix{ 1 \\ 0}\right)$ and $\left(\matrix{ 0 \\ 1}\right)$ because you either didn't rotate it or you rotated 180 degrees (in which case all you did was make it so what used to go left now goes right and vice versa). Otherwise, if $-1<z<1$ then the eigenvectors are $\left(\matrix{\frac{x-iy}{\sqrt{2-2z}} \\ \sqrt{(1-z)/2}}\right)$ and $\left(\matrix{\frac{-x+iy}{\sqrt{2+2z}} \\ \sqrt{(1+z)/2}}\right)$. And since you wanted to be experimentally accurate, yes there are two eigenvectors, but they depend continuously on $x,y,$ and $z$ so I made it so that the first one listed is the one that comes out of the side that was originally labelled left (the one where $\left(\matrix{1 \\ 0}\right)$ came out before we brought out the clamp).

OK, so we can produce a bunch of states. But what if you had an arbitrary state like $\left(\matrix{ ae^{i\alpha} \\ be^{i\beta}}\right)$ that you want to make. Well, if $b=0$ then we can use $x=0$, $y=0$, and $z=1$. And otherwise $\left(\matrix{ ae^{i\alpha} \\ be^{i\beta}}\right)=e^{i\beta}\sqrt{a^2+b^2}\left(\matrix{ ae^{i(\alpha-\beta)}/\sqrt{a^2+b^2} \\ b/\sqrt{a^2+b^2}}\right)$ so we can let $z=\frac{a^2-b^2}{a^2+b^2}$ which gives a $z$ in the range $0 <z<1$ and gives $b/\sqrt{a^2+b^2}=\sqrt{(1-z)/2}$. Then we can let $x=\left(\sqrt{\frac{2-2z}{a^2+b^2}}\right)a\cos(\alpha-\beta)$ and we can let $y=-\left(\sqrt{\frac{2-2z}{a^2+b^2}}\right)a\sin(\alpha-\beta)$. Then $ae^{i(\alpha-\beta)}/\sqrt{a^2+b^2}=\frac{x-iy}{\sqrt{2-2z}}$. Note that $x^2+y^2+z^2=1$ and all are real so this is a direction in 3D space.

So if we want to make the state $\left(\matrix{ ae^{i\alpha} \\ be^{i\beta}}\right)$ (where $a,b,\alpha$, and $\beta$ are real) we can grab our stern-gerlach machine oriented in the z-direction and rotate it so that the positive z-axis of the original device now points in the direction $\hat r=(x,y,z)=\left(\frac{2ab\cos(\alpha-\beta)}{a^2+b^2},\frac{-2ab\sin(\alpha-\beta)}{(a^2+b^2)^2},\frac{a^2-b^2}{a^2+b^2}\right)$ (this is a direction since they are all real, and $x^2+y^2+z^2=1$). And now the things that originally (before we turned it) came out spin up from the stern-gerlach instead come out in the state $\left(\matrix{ ae^{i(\alpha-\beta)}/\sqrt{a^2+b^2} \\ b/\sqrt{a^2+b^2}}\right).$ And that is really close to $\left(\matrix{ ae^{i\alpha} \\ be^{i\beta}}\right)=e^{i\beta}\sqrt{a^2+b^2}\left(\matrix{ ae^{i(\alpha-\beta)}/\sqrt{a^2+b^2} \\ b/\sqrt{a^2+b^2}}\right)$. In fact the only difference is a scale factor and a phase.

And here experimental methods come to save the day. You can't actually determine the overall size and phase of a state. Only the relative size (and we often just assume all states are of size 1) and the relative phase. So we know they come out with a size proportional to the size they came in (and size 1 if we always want to assume size 1). But the phase of the output will be affected by the phase of the input. If you make a coherent phase input stream of electrons we can have a coherent phase output of electrons. So that's as good as can be done!

Now let's get to how you measure it. Basically you do the same thing. To measure the z component of the spin you use the clamp to rotate your device to point in the z direction. And as always it will deflect the beams left and right. But now you have a coherent source so more than 50% of the probability current can be deflected left if a>b. So more than 50% of the times the electron will be deflected left.

Measurements do not reveal preexisting properties, they are basically special dynamical processes. Ones that produce states that act consistently under repeated use on the same thing. For instance, with the stern-gerlach device if something went left and you don't rotate it and send the same one in again it will go left again. But if you send a beam of particles in that were identically prepared you can get different answers for each one. Because if they were prepared by a stern-gerlach oriented a different direction they are only reliable for stern-gerlach devices oriented that direction.

In a measurement you can't control which outcome you get in general but you know you will get the same result again if you perform the same operation in the same particle again right away.

It's a way to produce particles. And it's a method to make states that behave reliably under at least one situation.

• thanks I could not understand completely , but it gave me the basic idea. will read it again to understand fully. May 10, 2015 at 20:30